From 86f0b47862d045a6cffa8974d60e67350daa79df Mon Sep 17 00:00:00 2001 From: Damien Alexandre Date: Wed, 31 Jan 2024 14:02:48 +0100 Subject: [PATCH] chore(jane): Rebuild the full SDK with latest Jane release and drop PHP 7 / SF 5 (#166) Refs: #164 --- .github/workflows/ci.yml | 4 +- CHANGELOG.md | 5 + composer.json | 14 +- generated/Client.php | 352 +-- ...inAppsApprovePostResponse200Normalizer.php | 162 +- ...psApprovePostResponsedefaultNormalizer.php | 162 +- ...psApprovedListGetResponse200Normalizer.php | 162 +- ...provedListGetResponsedefaultNormalizer.php | 162 +- ...psRequestsListGetResponse200Normalizer.php | 162 +- ...questsListGetResponsedefaultNormalizer.php | 162 +- ...nAppsRestrictPostResponse200Normalizer.php | 162 +- ...sRestrictPostResponsedefaultNormalizer.php | 162 +- ...RestrictedListGetResponse200Normalizer.php | 162 +- ...rictedListGetResponsedefaultNormalizer.php | 162 +- ...ationsArchivePostResponse200Normalizer.php | 135 +- ...nsArchivePostResponsedefaultNormalizer.php | 153 +- ...vertToPrivatePostResponse200Normalizer.php | 135 +- ...ToPrivatePostResponsedefaultNormalizer.php | 153 +- ...sationsCreatePostResponse200Normalizer.php | 157 +- ...onsCreatePostResponsedefaultNormalizer.php | 153 +- ...sationsDeletePostResponse200Normalizer.php | 135 +- ...onsDeletePostResponsedefaultNormalizer.php | 153 +- ...connectSharedPostResponse200Normalizer.php | 135 +- ...ectSharedPostResponsedefaultNormalizer.php | 153 +- ...tedChannelInfoGetResponse200Normalizer.php | 162 +- ...hannelInfoGetResponsedefaultNormalizer.php | 162 +- ...versationPrefsGetResponse200Normalizer.php | 157 +- ...GetResponse200PrefsCanThreadNormalizer.php | 203 +- ...tionPrefsGetResponse200PrefsNormalizer.php | 161 +- ...etResponse200PrefsWhoCanPostNormalizer.php | 203 +- ...ationPrefsGetResponsedefaultNormalizer.php | 153 +- ...ationsGetTeamsGetResponse200Normalizer.php | 191 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...nsGetTeamsGetResponsedefaultNormalizer.php | 153 +- ...sationsInvitePostResponse200Normalizer.php | 135 +- ...onsInvitePostResponsedefaultNormalizer.php | 183 +- ...sationsRenamePostResponse200Normalizer.php | 135 +- ...onsRenamePostResponsedefaultNormalizer.php | 153 +- ...ccessAddGroupPostResponse200Normalizer.php | 162 +- ...sAddGroupPostResponsedefaultNormalizer.php | 162 +- ...cessListGroupsGetResponse200Normalizer.php | 162 +- ...ListGroupsGetResponsedefaultNormalizer.php | 162 +- ...ssRemoveGroupPostResponse200Normalizer.php | 162 +- ...moveGroupPostResponsedefaultNormalizer.php | 162 +- ...rsationsSearchGetResponse200Normalizer.php | 171 +- ...ionsSearchGetResponsedefaultNormalizer.php | 153 +- ...ersationPrefsPostResponse200Normalizer.php | 135 +- ...tionPrefsPostResponsedefaultNormalizer.php | 153 +- ...tionsSetTeamsPostResponse200Normalizer.php | 162 +- ...sSetTeamsPostResponsedefaultNormalizer.php | 162 +- ...ionsUnarchivePostResponse200Normalizer.php | 135 +- ...UnarchivePostResponsedefaultNormalizer.php | 153 +- ...EmojiAddAliasPostResponse200Normalizer.php | 162 +- ...iAddAliasPostResponsedefaultNormalizer.php | 162 +- ...AdminEmojiAddPostResponse200Normalizer.php | 162 +- ...nEmojiAddPostResponsedefaultNormalizer.php | 162 +- ...AdminEmojiListGetResponse200Normalizer.php | 162 +- ...nEmojiListGetResponsedefaultNormalizer.php | 162 +- ...inEmojiRemovePostResponse200Normalizer.php | 162 +- ...ojiRemovePostResponsedefaultNormalizer.php | 162 +- ...inEmojiRenamePostResponse200Normalizer.php | 162 +- ...ojiRenamePostResponsedefaultNormalizer.php | 162 +- ...questsApprovePostResponse200Normalizer.php | 162 +- ...tsApprovePostResponsedefaultNormalizer.php | 162 +- ...tsApprovedListGetResponse200Normalizer.php | 162 +- ...provedListGetResponsedefaultNormalizer.php | 162 +- ...estsDeniedListGetResponse200Normalizer.php | 162 +- ...DeniedListGetResponsedefaultNormalizer.php | 162 +- ...eRequestsDenyPostResponse200Normalizer.php | 162 +- ...uestsDenyPostResponsedefaultNormalizer.php | 162 +- ...teRequestsListGetResponse200Normalizer.php | 162 +- ...questsListGetResponsedefaultNormalizer.php | 162 +- ...eamsAdminsListGetResponse200Normalizer.php | 162 +- ...AdminsListGetResponsedefaultNormalizer.php | 162 +- ...inTeamsCreatePostResponse200Normalizer.php | 162 +- ...amsCreatePostResponsedefaultNormalizer.php | 162 +- ...AdminTeamsListGetResponse200Normalizer.php | 162 +- ...nTeamsListGetResponsedefaultNormalizer.php | 162 +- ...eamsOwnersListGetResponse200Normalizer.php | 162 +- ...OwnersListGetResponsedefaultNormalizer.php | 162 +- ...msSettingsInfoGetResponse200Normalizer.php | 162 +- ...ttingsInfoGetResponsedefaultNormalizer.php | 162 +- ...faultChannelsPostResponse200Normalizer.php | 162 +- ...tChannelsPostResponsedefaultNormalizer.php | 162 +- ...etDescriptionPostResponse200Normalizer.php | 162 +- ...scriptionPostResponsedefaultNormalizer.php | 162 +- ...scoverabilityPostResponse200Normalizer.php | 162 +- ...erabilityPostResponsedefaultNormalizer.php | 162 +- ...ttingsSetIconPostResponse200Normalizer.php | 162 +- ...gsSetIconPostResponsedefaultNormalizer.php | 162 +- ...ttingsSetNamePostResponse200Normalizer.php | 162 +- ...gsSetNamePostResponsedefaultNormalizer.php | 162 +- ...psAddChannelsPostResponse200Normalizer.php | 162 +- ...dChannelsPostResponsedefaultNormalizer.php | 162 +- ...roupsAddTeamsPostResponse200Normalizer.php | 162 +- ...sAddTeamsPostResponsedefaultNormalizer.php | 162 +- ...psListChannelsGetResponse200Normalizer.php | 162 +- ...stChannelsGetResponsedefaultNormalizer.php | 162 +- ...emoveChannelsPostResponse200Normalizer.php | 162 +- ...eChannelsPostResponsedefaultNormalizer.php | 162 +- ...inUsersAssignPostResponse200Normalizer.php | 162 +- ...ersAssignPostResponsedefaultNormalizer.php | 162 +- ...inUsersInvitePostResponse200Normalizer.php | 162 +- ...ersInvitePostResponsedefaultNormalizer.php | 162 +- ...AdminUsersListGetResponse200Normalizer.php | 162 +- ...nUsersListGetResponsedefaultNormalizer.php | 162 +- ...inUsersRemovePostResponse200Normalizer.php | 162 +- ...ersRemovePostResponsedefaultNormalizer.php | 162 +- ...ionInvalidatePostResponse200Normalizer.php | 162 +- ...nvalidatePostResponsedefaultNormalizer.php | 162 +- ...sSessionResetPostResponse200Normalizer.php | 162 +- ...sionResetPostResponsedefaultNormalizer.php | 162 +- ...UsersSetAdminPostResponse200Normalizer.php | 162 +- ...sSetAdminPostResponsedefaultNormalizer.php | 162 +- ...SetExpirationPostResponse200Normalizer.php | 162 +- ...xpirationPostResponsedefaultNormalizer.php | 162 +- ...UsersSetOwnerPostResponse200Normalizer.php | 162 +- ...sSetOwnerPostResponsedefaultNormalizer.php | 162 +- ...ersSetRegularPostResponse200Normalizer.php | 162 +- ...etRegularPostResponsedefaultNormalizer.php | 162 +- .../ApiTestGetResponse200Normalizer.php | 187 +- .../ApiTestGetResponsedefaultNormalizer.php | 208 +- ...orizationsListGetResponse200Normalizer.php | 162 +- ...ationsListGetResponsedefaultNormalizer.php | 162 +- ...nfoGetResponse200InfoAppHomeNormalizer.php | 181 +- ...nfoGetResponse200InfoChannelNormalizer.php | 181 +- ...sInfoGetResponse200InfoGroupNormalizer.php | 181 +- ...ionsInfoGetResponse200InfoImNormalizer.php | 181 +- ...nsInfoGetResponse200InfoMpimNormalizer.php | 181 +- ...ssionsInfoGetResponse200InfoNormalizer.php | 221 +- ...nsInfoGetResponse200InfoTeamNormalizer.php | 169 +- ...ermissionsInfoGetResponse200Normalizer.php | 153 +- ...ssionsInfoGetResponsedefaultNormalizer.php | 173 +- ...issionsRequestGetResponse200Normalizer.php | 135 +- ...onsRequestGetResponsedefaultNormalizer.php | 173 +- ...sResourcesListGetResponse200Normalizer.php | 226 +- ...tGetResponse200ResourcesItemNormalizer.php | 161 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...ourcesListGetResponsedefaultNormalizer.php | 173 +- ...ionsScopesListGetResponse200Normalizer.php | 183 +- ...opesListGetResponse200ScopesNormalizer.php | 482 ++-- ...ScopesListGetResponsedefaultNormalizer.php | 173 +- ...sionsUsersListGetResponse200Normalizer.php | 162 +- ...sUsersListGetResponsedefaultNormalizer.php | 162 +- ...nsUsersRequestGetResponse200Normalizer.php | 162 +- ...ersRequestGetResponsedefaultNormalizer.php | 162 +- .../AppsUninstallGetResponse200Normalizer.php | 135 +- ...sUninstallGetResponsedefaultNormalizer.php | 173 +- .../AuthRevokeGetResponse200Normalizer.php | 153 +- ...AuthRevokeGetResponsedefaultNormalizer.php | 173 +- .../AuthTestGetResponse200Normalizer.php | 267 ++- .../AuthTestGetResponsedefaultNormalizer.php | 173 +- generated/Normalizer/BlocksItemNormalizer.php | 162 +- ...tsInfoGetResponse200BotIconsNormalizer.php | 169 +- .../BotsInfoGetResponse200BotNormalizer.php | 243 +- .../BotsInfoGetResponse200Normalizer.php | 153 +- .../BotsInfoGetResponsedefaultNormalizer.php | 173 +- .../CallsAddPostResponse200Normalizer.php | 162 +- .../CallsAddPostResponsedefaultNormalizer.php | 162 +- .../CallsEndPostResponse200Normalizer.php | 162 +- .../CallsEndPostResponsedefaultNormalizer.php | 162 +- .../CallsInfoGetResponse200Normalizer.php | 162 +- .../CallsInfoGetResponsedefaultNormalizer.php | 162 +- ...rticipantsAddPostResponse200Normalizer.php | 162 +- ...ipantsAddPostResponsedefaultNormalizer.php | 162 +- ...cipantsRemovePostResponse200Normalizer.php | 162 +- ...ntsRemovePostResponsedefaultNormalizer.php | 162 +- .../CallsUpdatePostResponse200Normalizer.php | 162 +- ...llsUpdatePostResponsedefaultNormalizer.php | 162 +- .../ChatDeletePostResponse200Normalizer.php | 169 +- ...hatDeletePostResponsedefaultNormalizer.php | 173 +- ...eduledMessagePostResponse200Normalizer.php | 135 +- ...edMessagePostResponsedefaultNormalizer.php | 173 +- ...atGetPermalinkGetResponse200Normalizer.php | 169 +- ...tPermalinkGetResponsedefaultNormalizer.php | 173 +- ...ChatMeMessagePostResponse200Normalizer.php | 179 +- ...MeMessagePostResponsedefaultNormalizer.php | 173 +- ...PostEphemeralPostResponse200Normalizer.php | 153 +- ...EphemeralPostResponsedefaultNormalizer.php | 173 +- ...atPostMessagePostResponse200Normalizer.php | 185 +- ...stMessagePostResponsedefaultNormalizer.php | 173 +- ...nse200MessageAttachmentsItemNormalizer.php | 183 +- ...essagePostResponse200MessageNormalizer.php | 321 ++- ...heduleMessagePostResponse200Normalizer.php | 235 +- ...leMessagePostResponsedefaultNormalizer.php | 173 +- ...edMessagesListGetResponse200Normalizer.php | 189 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...onse200ScheduledMessagesItemNormalizer.php | 241 +- ...ssagesListGetResponsedefaultNormalizer.php | 173 +- .../ChatUnfurlPostResponse200Normalizer.php | 135 +- ...hatUnfurlPostResponsedefaultNormalizer.php | 173 +- ...UpdatePostResponse200MessageNormalizer.php | 201 +- .../ChatUpdatePostResponse200Normalizer.php | 203 +- ...hatUpdatePostResponsedefaultNormalizer.php | 173 +- ...ationsArchivePostResponse200Normalizer.php | 135 +- ...nsArchivePostResponsedefaultNormalizer.php | 219 +- ...rsationsClosePostResponse200Normalizer.php | 179 +- ...ionsClosePostResponsedefaultNormalizer.php | 219 +- ...sationsCreatePostResponse200Normalizer.php | 153 +- ...onsCreatePostResponsedefaultNormalizer.php | 243 +- ...sationsHistoryGetResponse200Normalizer.php | 263 ++- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...onsHistoryGetResponsedefaultNormalizer.php | 219 +- ...versationsInfoGetResponse200Normalizer.php | 153 +- ...ationsInfoGetResponsedefaultNormalizer.php | 219 +- ...sationsInvitePostResponse200Normalizer.php | 153 +- ...ostResponsedefaultErrorsItemNormalizer.php | 173 +- ...onsInvitePostResponsedefaultNormalizer.php | 271 ++- ...ersationsJoinPostResponse200Normalizer.php | 195 +- ...tResponse200ResponseMetadataNormalizer.php | 159 +- ...tionsJoinPostResponsedefaultNormalizer.php | 219 +- ...ersationsKickPostResponse200Normalizer.php | 135 +- ...tionsKickPostResponsedefaultNormalizer.php | 219 +- ...rsationsLeavePostResponse200Normalizer.php | 157 +- ...ionsLeavePostResponsedefaultNormalizer.php | 219 +- ...versationsListGetResponse200Normalizer.php | 193 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...ationsListGetResponsedefaultNormalizer.php | 219 +- ...ersationsMarkPostResponse200Normalizer.php | 135 +- ...tionsMarkPostResponsedefaultNormalizer.php | 219 +- ...sationsMembersGetResponse200Normalizer.php | 185 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...onsMembersGetResponsedefaultNormalizer.php | 173 +- ...nPostResponse200ChannelItem1Normalizer.php | 339 ++- ...ersationsOpenPostResponse200Normalizer.php | 195 +- ...tionsOpenPostResponsedefaultNormalizer.php | 173 +- ...sationsRenamePostResponse200Normalizer.php | 153 +- ...onsRenamePostResponsedefaultNormalizer.php | 219 +- ...Response200MessagesItemItem0Normalizer.php | 475 ++-- ...Response200MessagesItemItem1Normalizer.php | 339 ++- ...sationsRepliesGetResponse200Normalizer.php | 213 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...onsRepliesGetResponsedefaultNormalizer.php | 219 +- ...onsSetPurposePostResponse200Normalizer.php | 153 +- ...etPurposePostResponsedefaultNormalizer.php | 219 +- ...tionsSetTopicPostResponse200Normalizer.php | 153 +- ...sSetTopicPostResponsedefaultNormalizer.php | 219 +- ...ionsUnarchivePostResponse200Normalizer.php | 135 +- ...UnarchivePostResponsedefaultNormalizer.php | 219 +- .../DialogOpenGetResponse200Normalizer.php | 135 +- ...DialogOpenGetResponsedefaultNormalizer.php | 173 +- .../DndEndDndPostResponse200Normalizer.php | 135 +- ...DndEndDndPostResponsedefaultNormalizer.php | 173 +- .../DndEndSnoozePostResponse200Normalizer.php | 203 +- ...EndSnoozePostResponsedefaultNormalizer.php | 173 +- .../DndInfoGetResponse200Normalizer.php | 255 ++- .../DndInfoGetResponsedefaultNormalizer.php | 173 +- .../DndSetSnoozePostResponse200Normalizer.php | 185 +- ...SetSnoozePostResponsedefaultNormalizer.php | 173 +- .../DndTeamInfoGetResponse200Normalizer.php | 162 +- ...ndTeamInfoGetResponsedefaultNormalizer.php | 162 +- .../EmojiListGetResponse200Normalizer.php | 162 +- .../EmojiListGetResponsedefaultNormalizer.php | 162 +- ...ommentsDeletePostResponse200Normalizer.php | 135 +- ...ntsDeletePostResponsedefaultNormalizer.php | 173 +- .../FilesDeletePostResponse200Normalizer.php | 135 +- ...lesDeletePostResponsedefaultNormalizer.php | 173 +- .../FilesInfoGetResponse200Normalizer.php | 279 ++- .../FilesInfoGetResponsedefaultNormalizer.php | 173 +- .../FilesListGetResponse200Normalizer.php | 187 +- .../FilesListGetResponsedefaultNormalizer.php | 173 +- ...ilesRemoteAddPostResponse200Normalizer.php | 162 +- ...RemoteAddPostResponsedefaultNormalizer.php | 162 +- ...ilesRemoteInfoGetResponse200Normalizer.php | 162 +- ...RemoteInfoGetResponsedefaultNormalizer.php | 162 +- ...ilesRemoteListGetResponse200Normalizer.php | 162 +- ...RemoteListGetResponsedefaultNormalizer.php | 162 +- ...sRemoteRemovePostResponse200Normalizer.php | 162 +- ...oteRemovePostResponsedefaultNormalizer.php | 162 +- ...lesRemoteShareGetResponse200Normalizer.php | 162 +- ...emoteShareGetResponsedefaultNormalizer.php | 162 +- ...sRemoteUpdatePostResponse200Normalizer.php | 162 +- ...oteUpdatePostResponsedefaultNormalizer.php | 162 +- ...vokePublicURLPostResponse200Normalizer.php | 153 +- ...PublicURLPostResponsedefaultNormalizer.php | 173 +- ...aredPublicURLPostResponse200Normalizer.php | 153 +- ...PublicURLPostResponsedefaultNormalizer.php | 173 +- .../FilesUploadPostResponse200Normalizer.php | 153 +- ...lesUploadPostResponsedefaultNormalizer.php | 173 +- generated/Normalizer/JaneObjectNormalizer.php | 149 +- ...rationExchangeGetResponse200Normalizer.php | 302 ++- ...onExchangeGetResponsedefaultNormalizer.php | 173 +- .../OauthAccessGetResponse200Normalizer.php | 162 +- ...authAccessGetResponsedefaultNormalizer.php | 162 +- .../OauthTokenGetResponse200Normalizer.php | 162 +- ...OauthTokenGetResponsedefaultNormalizer.php | 162 +- .../OauthV2AccessGetResponse200Normalizer.php | 162 +- ...thV2AccessGetResponsedefaultNormalizer.php | 162 +- .../ObjsBotProfileIconsNormalizer.php | 169 +- .../Normalizer/ObjsBotProfileNormalizer.php | 239 +- .../Normalizer/ObjsChannelNormalizer.php | 872 ++++--- .../ObjsChannelPurposeNormalizer.php | 169 +- .../Normalizer/ObjsChannelTopicNormalizer.php | 169 +- .../Normalizer/ObjsCommentNormalizer.php | 415 ++-- ...bjsConversationDisplayCountsNormalizer.php | 153 +- .../Normalizer/ObjsConversationNormalizer.php | 1640 +++++++++----- .../ObjsConversationPurposeNormalizer.php | 169 +- .../ObjsConversationSharesItemNormalizer.php | 249 +- .../ObjsConversationTopicNormalizer.php | 169 +- .../ObjsEnterpriseUserNormalizer.php | 239 +- ...rnalOrgMigrationsCurrentItemNormalizer.php | 153 +- .../ObjsExternalOrgMigrationsNormalizer.php | 171 +- generated/Normalizer/ObjsFileNormalizer.php | 2003 +++++++++++------ .../Normalizer/ObjsFileSharesNormalizer.php | 161 +- generated/Normalizer/ObjsIconNormalizer.php | 303 ++- ...geAttachmentsItemActionsItemNormalizer.php | 255 ++- ...ageAttachmentsItemFieldsItemNormalizer.php | 183 +- .../ObjsMessageAttachmentsItemNormalizer.php | 772 +++++-- .../Normalizer/ObjsMessageIconsNormalizer.php | 161 +- .../Normalizer/ObjsMessageNormalizer.php | 1235 ++++++---- .../Normalizer/ObjsMetadataNormalizer.php | 153 +- generated/Normalizer/ObjsPagingNormalizer.php | 243 +- .../Normalizer/ObjsPrimaryOwnerNormalizer.php | 153 +- .../Normalizer/ObjsReactionNormalizer.php | 220 +- .../Normalizer/ObjsReminderNormalizer.php | 249 +- .../Normalizer/ObjsResourcesNormalizer.php | 219 +- .../ObjsResponseMetadataNormalizer.php | 223 +- .../Normalizer/ObjsSubteamNormalizer.php | 529 +++-- .../Normalizer/ObjsSubteamPrefsNormalizer.php | 185 +- generated/Normalizer/ObjsTeamNormalizer.php | 795 ++++--- .../ObjsTeamProfileFieldNormalizer.php | 366 ++- .../ObjsTeamProfileFieldOptionNormalizer.php | 281 ++- .../ObjsTeamSsoProviderNormalizer.php | 183 +- generated/Normalizer/ObjsUserNormalizer.php | 835 ++++--- .../Normalizer/ObjsUserProfileNormalizer.php | 1461 ++++++++---- .../ObjsUserProfileShortNormalizer.php | 341 ++- .../ObjsUserTeamProfileNormalizer.php | 153 +- .../PinsAddPostResponse200Normalizer.php | 135 +- .../PinsAddPostResponsedefaultNormalizer.php | 173 +- ...etResponse200Item0ItemsItem0Normalizer.php | 207 +- ...etResponse200Item0ItemsItem1Normalizer.php | 231 +- .../PinsListGetResponse200Item0Normalizer.php | 217 +- .../PinsListGetResponse200Item1Normalizer.php | 153 +- .../PinsListGetResponsedefaultNormalizer.php | 173 +- .../PinsRemovePostResponse200Normalizer.php | 135 +- ...insRemovePostResponsedefaultNormalizer.php | 173 +- .../ReactionsAddPostResponse200Normalizer.php | 135 +- ...ctionsAddPostResponsedefaultNormalizer.php | 173 +- ...actionsGetGetResponsedefaultNormalizer.php | 173 +- ...GetResponse200ItemsItemItem0Normalizer.php | 169 +- ...GetResponse200ItemsItemItem1Normalizer.php | 153 +- ...GetResponse200ItemsItemItem2Normalizer.php | 169 +- .../ReactionsListGetResponse200Normalizer.php | 213 +- ...ctionsListGetResponsedefaultNormalizer.php | 173 +- ...actionsRemovePostResponse200Normalizer.php | 135 +- ...onsRemovePostResponsedefaultNormalizer.php | 173 +- .../RemindersAddPostResponse200Normalizer.php | 153 +- ...indersAddPostResponsedefaultNormalizer.php | 173 +- ...ndersCompletePostResponse200Normalizer.php | 135 +- ...sCompletePostResponsedefaultNormalizer.php | 173 +- ...mindersDeletePostResponse200Normalizer.php | 135 +- ...ersDeletePostResponsedefaultNormalizer.php | 173 +- .../RemindersInfoGetResponse200Normalizer.php | 153 +- ...indersInfoGetResponsedefaultNormalizer.php | 173 +- .../RemindersListGetResponse200Normalizer.php | 171 +- ...indersListGetResponsedefaultNormalizer.php | 173 +- .../RtmConnectGetResponse200Normalizer.php | 185 +- ...RtmConnectGetResponse200SelfNormalizer.php | 153 +- ...RtmConnectGetResponse200TeamNormalizer.php | 169 +- ...RtmConnectGetResponsedefaultNormalizer.php | 173 +- ...SearchMessagesGetResponse200Normalizer.php | 162 +- ...chMessagesGetResponsedefaultNormalizer.php | 162 +- .../StarsAddPostResponse200Normalizer.php | 135 +- .../StarsAddPostResponsedefaultNormalizer.php | 173 +- ...GetResponse200ItemsItemItem0Normalizer.php | 185 +- ...GetResponse200ItemsItemItem1Normalizer.php | 169 +- ...GetResponse200ItemsItemItem2Normalizer.php | 185 +- ...GetResponse200ItemsItemItem3Normalizer.php | 169 +- ...GetResponse200ItemsItemItem4Normalizer.php | 169 +- ...GetResponse200ItemsItemItem5Normalizer.php | 169 +- .../StarsListGetResponse200Normalizer.php | 191 +- .../StarsListGetResponsedefaultNormalizer.php | 173 +- .../StarsRemovePostResponse200Normalizer.php | 135 +- ...arsRemovePostResponsedefaultNormalizer.php | 173 +- ...LogsGetResponse200LoginsItemNormalizer.php | 369 ++- ...TeamAccessLogsGetResponse200Normalizer.php | 187 +- ...AccessLogsGetResponsedefaultNormalizer.php | 173 +- ...amBillableInfoGetResponse200Normalizer.php | 162 +- ...llableInfoGetResponsedefaultNormalizer.php | 162 +- .../TeamInfoGetResponse200Normalizer.php | 153 +- .../TeamInfoGetResponsedefaultNormalizer.php | 173 +- ...onLogsGetResponse200LogsItemNormalizer.php | 333 ++- ...ntegrationLogsGetResponse200Normalizer.php | 187 +- ...rationLogsGetResponsedefaultNormalizer.php | 173 +- ...TeamProfileGetGetResponse200Normalizer.php | 153 +- ...fileGetGetResponse200ProfileNormalizer.php | 153 +- ...ProfileGetGetResponsedefaultNormalizer.php | 173 +- ...rgroupsCreatePostResponse200Normalizer.php | 153 +- ...upsCreatePostResponsedefaultNormalizer.php | 173 +- ...groupsDisablePostResponse200Normalizer.php | 153 +- ...psDisablePostResponsedefaultNormalizer.php | 173 +- ...rgroupsEnablePostResponse200Normalizer.php | 153 +- ...upsEnablePostResponsedefaultNormalizer.php | 173 +- ...UsergroupsListGetResponse200Normalizer.php | 171 +- ...groupsListGetResponsedefaultNormalizer.php | 173 +- ...rgroupsUpdatePostResponse200Normalizer.php | 153 +- ...upsUpdatePostResponsedefaultNormalizer.php | 173 +- ...roupsUsersListGetResponse200Normalizer.php | 169 +- ...sUsersListGetResponsedefaultNormalizer.php | 173 +- ...psUsersUpdatePostResponse200Normalizer.php | 153 +- ...ersUpdatePostResponsedefaultNormalizer.php | 173 +- ...sConversationsGetResponse200Normalizer.php | 226 +- ...tResponse200ResponseMetadataNormalizer.php | 135 +- ...versationsGetResponsedefaultNormalizer.php | 173 +- ...rsDeletePhotoPostResponse200Normalizer.php | 135 +- ...letePhotoPostResponsedefaultNormalizer.php | 173 +- ...ersGetPresenceGetResponse200Normalizer.php | 314 ++- ...etPresenceGetResponsedefaultNormalizer.php | 183 +- ...sIdentityGetResponse200Item0Normalizer.php | 169 +- ...ntityGetResponse200Item0TeamNormalizer.php | 135 +- ...ntityGetResponse200Item0UserNormalizer.php | 153 +- ...sIdentityGetResponse200Item1Normalizer.php | 169 +- ...ntityGetResponse200Item1TeamNormalizer.php | 135 +- ...ntityGetResponse200Item1UserNormalizer.php | 169 +- ...sIdentityGetResponse200Item2Normalizer.php | 169 +- ...ntityGetResponse200Item2TeamNormalizer.php | 135 +- ...ntityGetResponse200Item2UserNormalizer.php | 257 ++- ...sIdentityGetResponse200Item3Normalizer.php | 169 +- ...ntityGetResponse200Item3TeamNormalizer.php | 311 ++- ...ntityGetResponse200Item3UserNormalizer.php | 153 +- ...rsIdentityGetResponsedefaultNormalizer.php | 173 +- .../UsersInfoGetResponse200Normalizer.php | 183 +- .../UsersInfoGetResponsedefaultNormalizer.php | 173 +- .../UsersListGetResponse200Normalizer.php | 211 +- .../UsersListGetResponsedefaultNormalizer.php | 173 +- ...sLookupByEmailGetResponse200Normalizer.php | 183 +- ...kupByEmailGetResponsedefaultNormalizer.php | 173 +- ...sersProfileGetGetResponse200Normalizer.php | 153 +- ...ProfileGetGetResponsedefaultNormalizer.php | 173 +- ...ersProfileSetPostResponse200Normalizer.php | 189 +- ...rofileSetPostResponsedefaultNormalizer.php | 173 +- ...sersSetActivePostResponse200Normalizer.php | 135 +- ...SetActivePostResponsedefaultNormalizer.php | 173 +- ...UsersSetPhotoPostResponse200Normalizer.php | 153 +- ...tPhotoPostResponse200ProfileNormalizer.php | 275 ++- ...sSetPhotoPostResponsedefaultNormalizer.php | 243 +- ...rsSetPresencePostResponse200Normalizer.php | 135 +- ...tPresencePostResponsedefaultNormalizer.php | 173 +- .../ViewsOpenPostResponse200Normalizer.php | 162 +- ...ViewsOpenPostResponsedefaultNormalizer.php | 162 +- .../ViewsPublishPostResponse200Normalizer.php | 162 +- ...wsPublishPostResponsedefaultNormalizer.php | 162 +- .../ViewsPushPostResponse200Normalizer.php | 162 +- ...ViewsPushPostResponsedefaultNormalizer.php | 162 +- .../ViewsUpdatePostResponse200Normalizer.php | 162 +- ...ewsUpdatePostResponsedefaultNormalizer.php | 162 +- ...StepCompletedPostResponse200Normalizer.php | 162 +- ...CompletedPostResponsedefaultNormalizer.php | 162 +- ...owsStepFailedPostResponse200Normalizer.php | 162 +- ...tepFailedPostResponsedefaultNormalizer.php | 162 +- ...owsUpdateStepPostResponse200Normalizer.php | 162 +- ...pdateStepPostResponsedefaultNormalizer.php | 162 +- generated/Runtime/Client/BaseEndpoint.php | 1 + generated/Runtime/Client/Client.php | 2 +- .../Normalizer/ReferenceNormalizer.php | 37 +- .../Runtime/Normalizer/ValidatorTrait.php | 3 +- 456 files changed, 61278 insertions(+), 26776 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a69a5f3..a192f93d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,11 +44,11 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '7.4', '8.0', '8.1' ] + php-version: [ '8.0', '8.1', '8.2' ] composer-flags: [ '' ] name: [ '' ] include: - - php-version: 7.4 + - php-version: 8.0 composer-flags: '--prefer-lowest' name: '(prefer lowest dependencies)' diff --git a/CHANGELOG.md b/CHANGELOG.md index afe0e473..a4e1b9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changes between versions +## 4.7.0 (2024-01-31) + +* Upgrade JanePHP generated code +* Drop support for PHP 7 and Symfony 5 + ## 4.6.0 (2023-11-10) * Upgrade JanePHP generated code diff --git a/composer.json b/composer.json index d31faa23..f2fb04e9 100644 --- a/composer.json +++ b/composer.json @@ -26,22 +26,22 @@ } }, "require": { - "php": ">=7.4", - "jane-php/open-api-runtime": "~7.1", + "php": ">=8.0", + "jane-php/open-api-runtime": "~7.6.0", "psr/http-client-implementation": "*", "php-http/client-common": "^1.9 || ^2.0", "php-http/discovery": "^1.11", "php-http/multipart-stream-builder": "^1.1" }, "require-dev": { - "jane-php/open-api-2": "~7.1", - "symfony/http-client": "^5.4 || ^6.0", + "jane-php/open-api-2": "~v7.6.0", + "symfony/http-client": "^6.0 || ^7.0", "nyholm/psr7": "^1.2", "friendsofphp/php-cs-fixer": "^3.2.2", - "symfony/phpunit-bridge": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.0 || ^7.0", "opis/json-schema": "^1.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/process": "^5.4 || ^6.0" + "symfony/console": "^6.0 || ^7.0", + "symfony/process": "^6.0 || ^7.0" }, "conflict": { "php-http/httplug": "< 2.0" diff --git a/generated/Client.php b/generated/Client.php index f6a0bc2b..00b82ac1 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -13,7 +13,7 @@ namespace JoliCode\Slack\Api; -class Client extends \JoliCode\Slack\Api\Runtime\Client\Client +class Client extends Runtime\Client\Client { /** * Approve an app for installation on a workspace. @@ -36,7 +36,7 @@ class Client extends \JoliCode\Slack\Api\Runtime\Client\Client */ public function adminAppsApprove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminAppsApprove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminAppsApprove($formParameters, $headerParameters), $fetch); } /** @@ -57,7 +57,7 @@ public function adminAppsApprove(array $formParameters = [], array $headerParame */ public function adminAppsApprovedList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminAppsApprovedList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminAppsApprovedList($queryParameters), $fetch); } /** @@ -77,7 +77,7 @@ public function adminAppsApprovedList(array $queryParameters = [], string $fetch */ public function adminAppsRequestsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminAppsRequestsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminAppsRequestsList($queryParameters), $fetch); } /** @@ -101,7 +101,7 @@ public function adminAppsRequestsList(array $queryParameters = [], string $fetch */ public function adminAppsRestrict(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminAppsRestrict($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminAppsRestrict($formParameters, $headerParameters), $fetch); } /** @@ -122,7 +122,7 @@ public function adminAppsRestrict(array $formParameters = [], array $headerParam */ public function adminAppsRestrictedList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminAppsRestrictedList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminAppsRestrictedList($queryParameters), $fetch); } /** @@ -144,7 +144,7 @@ public function adminAppsRestrictedList(array $queryParameters = [], string $fet */ public function adminConversationsArchive(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsArchive($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsArchive($formParameters, $headerParameters), $fetch); } /** @@ -166,7 +166,7 @@ public function adminConversationsArchive(array $formParameters = [], array $hea */ public function adminConversationsConvertToPrivate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsConvertToPrivate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsConvertToPrivate($formParameters, $headerParameters), $fetch); } /** @@ -192,7 +192,7 @@ public function adminConversationsConvertToPrivate(array $formParameters = [], a */ public function adminConversationsCreate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsCreate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsCreate($formParameters, $headerParameters), $fetch); } /** @@ -214,7 +214,7 @@ public function adminConversationsCreate(array $formParameters = [], array $head */ public function adminConversationsDelete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsDelete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsDelete($formParameters, $headerParameters), $fetch); } /** @@ -237,7 +237,7 @@ public function adminConversationsDelete(array $formParameters = [], array $head */ public function adminConversationsDisconnectShared(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsDisconnectShared($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsDisconnectShared($formParameters, $headerParameters), $fetch); } /** @@ -258,7 +258,7 @@ public function adminConversationsDisconnectShared(array $formParameters = [], a */ public function adminConversationsEkmListOriginalConnectedChannelInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsEkmListOriginalConnectedChannelInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsEkmListOriginalConnectedChannelInfo($queryParameters), $fetch); } /** @@ -280,7 +280,7 @@ public function adminConversationsEkmListOriginalConnectedChannelInfo(array $que */ public function adminConversationsGetConversationPrefs(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsGetConversationPrefs($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsGetConversationPrefs($queryParameters, $headerParameters), $fetch); } /** @@ -304,7 +304,7 @@ public function adminConversationsGetConversationPrefs(array $queryParameters = */ public function adminConversationsGetTeams(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsGetTeams($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsGetTeams($queryParameters, $headerParameters), $fetch); } /** @@ -327,7 +327,7 @@ public function adminConversationsGetTeams(array $queryParameters = [], array $h */ public function adminConversationsInvite(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsInvite($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsInvite($formParameters, $headerParameters), $fetch); } /** @@ -350,7 +350,7 @@ public function adminConversationsInvite(array $formParameters = [], array $head */ public function adminConversationsRename(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsRename($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsRename($formParameters, $headerParameters), $fetch); } /** @@ -370,7 +370,7 @@ public function adminConversationsRename(array $formParameters = [], array $head */ public function adminConversationsRestrictAccessAddGroup(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsRestrictAccessAddGroup($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsRestrictAccessAddGroup($formParameters), $fetch); } /** @@ -389,7 +389,7 @@ public function adminConversationsRestrictAccessAddGroup(array $formParameters = */ public function adminConversationsRestrictAccessListGroups(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsRestrictAccessListGroups($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsRestrictAccessListGroups($queryParameters), $fetch); } /** @@ -409,7 +409,7 @@ public function adminConversationsRestrictAccessListGroups(array $queryParameter */ public function adminConversationsRestrictAccessRemoveGroup(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsRestrictAccessRemoveGroup($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsRestrictAccessRemoveGroup($formParameters), $fetch); } /** @@ -437,7 +437,7 @@ public function adminConversationsRestrictAccessRemoveGroup(array $formParameter */ public function adminConversationsSearch(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsSearch($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsSearch($queryParameters, $headerParameters), $fetch); } /** @@ -460,7 +460,7 @@ public function adminConversationsSearch(array $queryParameters = [], array $hea */ public function adminConversationsSetConversationPrefs(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsSetConversationPrefs($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsSetConversationPrefs($formParameters, $headerParameters), $fetch); } /** @@ -485,7 +485,7 @@ public function adminConversationsSetConversationPrefs(array $formParameters = [ */ public function adminConversationsSetTeams(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsSetTeams($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsSetTeams($formParameters, $headerParameters), $fetch); } /** @@ -507,7 +507,7 @@ public function adminConversationsSetTeams(array $formParameters = [], array $he */ public function adminConversationsUnarchive(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminConversationsUnarchive($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminConversationsUnarchive($formParameters, $headerParameters), $fetch); } /** @@ -526,7 +526,7 @@ public function adminConversationsUnarchive(array $formParameters = [], array $h */ public function adminEmojiAdd(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminEmojiAdd($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminEmojiAdd($formParameters), $fetch); } /** @@ -545,7 +545,7 @@ public function adminEmojiAdd(array $formParameters = [], string $fetch = self:: */ public function adminEmojiAddAlias(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminEmojiAddAlias($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminEmojiAddAlias($formParameters), $fetch); } /** @@ -564,7 +564,7 @@ public function adminEmojiAddAlias(array $formParameters = [], string $fetch = s */ public function adminEmojiList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminEmojiList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminEmojiList($queryParameters), $fetch); } /** @@ -582,7 +582,7 @@ public function adminEmojiList(array $queryParameters = [], string $fetch = self */ public function adminEmojiRemove(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminEmojiRemove($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminEmojiRemove($formParameters), $fetch); } /** @@ -601,7 +601,7 @@ public function adminEmojiRemove(array $formParameters = [], string $fetch = sel */ public function adminEmojiRename(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminEmojiRename($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminEmojiRename($formParameters), $fetch); } /** @@ -624,7 +624,7 @@ public function adminEmojiRename(array $formParameters = [], string $fetch = sel */ public function adminInviteRequestsApprove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminInviteRequestsApprove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminInviteRequestsApprove($formParameters, $headerParameters), $fetch); } /** @@ -648,7 +648,7 @@ public function adminInviteRequestsApprove(array $formParameters = [], array $he */ public function adminInviteRequestsApprovedList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminInviteRequestsApprovedList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminInviteRequestsApprovedList($queryParameters, $headerParameters), $fetch); } /** @@ -672,7 +672,7 @@ public function adminInviteRequestsApprovedList(array $queryParameters = [], arr */ public function adminInviteRequestsDeniedList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminInviteRequestsDeniedList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminInviteRequestsDeniedList($queryParameters, $headerParameters), $fetch); } /** @@ -695,7 +695,7 @@ public function adminInviteRequestsDeniedList(array $queryParameters = [], array */ public function adminInviteRequestsDeny(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminInviteRequestsDeny($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminInviteRequestsDeny($formParameters, $headerParameters), $fetch); } /** @@ -719,7 +719,7 @@ public function adminInviteRequestsDeny(array $formParameters = [], array $heade */ public function adminInviteRequestsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminInviteRequestsList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminInviteRequestsList($queryParameters, $headerParameters), $fetch); } /** @@ -739,7 +739,7 @@ public function adminInviteRequestsList(array $queryParameters = [], array $head */ public function adminTeamsAdminsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsAdminsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsAdminsList($queryParameters), $fetch); } /** @@ -764,7 +764,7 @@ public function adminTeamsAdminsList(array $queryParameters = [], string $fetch */ public function adminTeamsCreate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsCreate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsCreate($formParameters, $headerParameters), $fetch); } /** @@ -787,7 +787,7 @@ public function adminTeamsCreate(array $formParameters = [], array $headerParame */ public function adminTeamsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsList($queryParameters, $headerParameters), $fetch); } /** @@ -807,7 +807,7 @@ public function adminTeamsList(array $queryParameters = [], array $headerParamet */ public function adminTeamsOwnersList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsOwnersList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsOwnersList($queryParameters), $fetch); } /** @@ -829,7 +829,7 @@ public function adminTeamsOwnersList(array $queryParameters = [], string $fetch */ public function adminTeamsSettingsInfo(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsInfo($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsInfo($queryParameters, $headerParameters), $fetch); } /** @@ -848,7 +848,7 @@ public function adminTeamsSettingsInfo(array $queryParameters = [], array $heade */ public function adminTeamsSettingsSetDefaultChannels(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsSetDefaultChannels($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsSetDefaultChannels($formParameters), $fetch); } /** @@ -871,7 +871,7 @@ public function adminTeamsSettingsSetDefaultChannels(array $formParameters = [], */ public function adminTeamsSettingsSetDescription(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsSetDescription($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsSetDescription($formParameters, $headerParameters), $fetch); } /** @@ -894,7 +894,7 @@ public function adminTeamsSettingsSetDescription(array $formParameters = [], arr */ public function adminTeamsSettingsSetDiscoverability(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsSetDiscoverability($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsSetDiscoverability($formParameters, $headerParameters), $fetch); } /** @@ -913,7 +913,7 @@ public function adminTeamsSettingsSetDiscoverability(array $formParameters = [], */ public function adminTeamsSettingsSetIcon(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsSetIcon($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsSetIcon($formParameters), $fetch); } /** @@ -936,7 +936,7 @@ public function adminTeamsSettingsSetIcon(array $formParameters = [], string $fe */ public function adminTeamsSettingsSetName(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminTeamsSettingsSetName($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminTeamsSettingsSetName($formParameters, $headerParameters), $fetch); } /** @@ -960,7 +960,7 @@ public function adminTeamsSettingsSetName(array $formParameters = [], array $hea */ public function adminUsergroupsAddChannels(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsergroupsAddChannels($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsergroupsAddChannels($formParameters, $headerParameters), $fetch); } /** @@ -984,7 +984,7 @@ public function adminUsergroupsAddChannels(array $formParameters = [], array $he */ public function adminUsergroupsAddTeams(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsergroupsAddTeams($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsergroupsAddTeams($formParameters, $headerParameters), $fetch); } /** @@ -1008,7 +1008,7 @@ public function adminUsergroupsAddTeams(array $formParameters = [], array $heade */ public function adminUsergroupsListChannels(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsergroupsListChannels($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsergroupsListChannels($queryParameters, $headerParameters), $fetch); } /** @@ -1031,7 +1031,7 @@ public function adminUsergroupsListChannels(array $queryParameters = [], array $ */ public function adminUsergroupsRemoveChannels(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsergroupsRemoveChannels($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsergroupsRemoveChannels($formParameters, $headerParameters), $fetch); } /** @@ -1057,7 +1057,7 @@ public function adminUsergroupsRemoveChannels(array $formParameters = [], array */ public function adminUsersAssign(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersAssign($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersAssign($formParameters, $headerParameters), $fetch); } /** @@ -1087,7 +1087,7 @@ public function adminUsersAssign(array $formParameters = [], array $headerParame */ public function adminUsersInvite(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersInvite($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersInvite($formParameters, $headerParameters), $fetch); } /** @@ -1111,7 +1111,7 @@ public function adminUsersInvite(array $formParameters = [], array $headerParame */ public function adminUsersList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersList($queryParameters, $headerParameters), $fetch); } /** @@ -1134,7 +1134,7 @@ public function adminUsersList(array $queryParameters = [], array $headerParamet */ public function adminUsersRemove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersRemove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersRemove($formParameters, $headerParameters), $fetch); } /** @@ -1157,7 +1157,7 @@ public function adminUsersRemove(array $formParameters = [], array $headerParame */ public function adminUsersSessionInvalidate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSessionInvalidate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSessionInvalidate($formParameters, $headerParameters), $fetch); } /** @@ -1181,7 +1181,7 @@ public function adminUsersSessionInvalidate(array $formParameters = [], array $h */ public function adminUsersSessionReset(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSessionReset($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSessionReset($formParameters, $headerParameters), $fetch); } /** @@ -1204,7 +1204,7 @@ public function adminUsersSessionReset(array $formParameters = [], array $header */ public function adminUsersSetAdmin(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSetAdmin($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSetAdmin($formParameters, $headerParameters), $fetch); } /** @@ -1228,7 +1228,7 @@ public function adminUsersSetAdmin(array $formParameters = [], array $headerPara */ public function adminUsersSetExpiration(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSetExpiration($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSetExpiration($formParameters, $headerParameters), $fetch); } /** @@ -1251,7 +1251,7 @@ public function adminUsersSetExpiration(array $formParameters = [], array $heade */ public function adminUsersSetOwner(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSetOwner($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSetOwner($formParameters, $headerParameters), $fetch); } /** @@ -1274,7 +1274,7 @@ public function adminUsersSetOwner(array $formParameters = [], array $headerPara */ public function adminUsersSetRegular(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AdminUsersSetRegular($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AdminUsersSetRegular($formParameters, $headerParameters), $fetch); } /** @@ -1292,7 +1292,7 @@ public function adminUsersSetRegular(array $formParameters = [], array $headerPa */ public function apiTest(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ApiTest($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ApiTest($queryParameters), $fetch); } /** @@ -1316,7 +1316,7 @@ public function apiTest(array $queryParameters = [], string $fetch = self::FETCH */ public function appsEventAuthorizationsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsEventAuthorizationsList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsEventAuthorizationsList($queryParameters, $headerParameters), $fetch); } /** @@ -1333,7 +1333,7 @@ public function appsEventAuthorizationsList(array $queryParameters = [], array $ */ public function appsPermissionsInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsInfo($queryParameters), $fetch); } /** @@ -1352,7 +1352,7 @@ public function appsPermissionsInfo(array $queryParameters = [], string $fetch = */ public function appsPermissionsRequest(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsRequest($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsRequest($queryParameters), $fetch); } /** @@ -1371,7 +1371,7 @@ public function appsPermissionsRequest(array $queryParameters = [], string $fetc */ public function appsPermissionsResourcesList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsResourcesList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsResourcesList($queryParameters), $fetch); } /** @@ -1388,7 +1388,7 @@ public function appsPermissionsResourcesList(array $queryParameters = [], string */ public function appsPermissionsScopesList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsScopesList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsScopesList($queryParameters), $fetch); } /** @@ -1407,7 +1407,7 @@ public function appsPermissionsScopesList(array $queryParameters = [], string $f */ public function appsPermissionsUsersList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsUsersList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsUsersList($queryParameters), $fetch); } /** @@ -1427,7 +1427,7 @@ public function appsPermissionsUsersList(array $queryParameters = [], string $fe */ public function appsPermissionsUsersRequest(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsPermissionsUsersRequest($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsPermissionsUsersRequest($queryParameters), $fetch); } /** @@ -1446,7 +1446,7 @@ public function appsPermissionsUsersRequest(array $queryParameters = [], string */ public function appsUninstall(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AppsUninstall($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AppsUninstall($queryParameters), $fetch); } /** @@ -1464,7 +1464,7 @@ public function appsUninstall(array $queryParameters = [], string $fetch = self: */ public function authRevoke(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AuthRevoke($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AuthRevoke($queryParameters), $fetch); } /** @@ -1481,7 +1481,7 @@ public function authRevoke(array $queryParameters = [], string $fetch = self::FE */ public function authTest(array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\AuthTest($headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\AuthTest($headerParameters), $fetch); } /** @@ -1499,7 +1499,7 @@ public function authTest(array $headerParameters = [], string $fetch = self::FET */ public function botsInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\BotsInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\BotsInfo($queryParameters), $fetch); } /** @@ -1528,7 +1528,7 @@ public function botsInfo(array $queryParameters = [], string $fetch = self::FETC */ public function callsAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsAdd($formParameters, $headerParameters), $fetch); } /** @@ -1551,7 +1551,7 @@ public function callsAdd(array $formParameters = [], array $headerParameters = [ */ public function callsEnd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsEnd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsEnd($formParameters, $headerParameters), $fetch); } /** @@ -1573,7 +1573,7 @@ public function callsEnd(array $formParameters = [], array $headerParameters = [ */ public function callsInfo(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsInfo($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsInfo($queryParameters, $headerParameters), $fetch); } /** @@ -1596,7 +1596,7 @@ public function callsInfo(array $queryParameters = [], array $headerParameters = */ public function callsParticipantsAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsParticipantsAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsParticipantsAdd($formParameters, $headerParameters), $fetch); } /** @@ -1619,7 +1619,7 @@ public function callsParticipantsAdd(array $formParameters = [], array $headerPa */ public function callsParticipantsRemove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsParticipantsRemove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsParticipantsRemove($formParameters, $headerParameters), $fetch); } /** @@ -1644,7 +1644,7 @@ public function callsParticipantsRemove(array $formParameters = [], array $heade */ public function callsUpdate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\CallsUpdate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\CallsUpdate($formParameters, $headerParameters), $fetch); } /** @@ -1668,7 +1668,7 @@ public function callsUpdate(array $formParameters = [], array $headerParameters */ public function chatDelete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatDelete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatDelete($formParameters, $headerParameters), $fetch); } /** @@ -1692,7 +1692,7 @@ public function chatDelete(array $formParameters = [], array $headerParameters = */ public function chatDeleteScheduledMessage(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatDeleteScheduledMessage($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatDeleteScheduledMessage($formParameters, $headerParameters), $fetch); } /** @@ -1711,7 +1711,7 @@ public function chatDeleteScheduledMessage(array $formParameters = [], array $he */ public function chatGetPermalink(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatGetPermalink($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatGetPermalink($queryParameters), $fetch); } /** @@ -1734,7 +1734,7 @@ public function chatGetPermalink(array $queryParameters = [], string $fetch = se */ public function chatMeMessage(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatMeMessage($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatMeMessage($formParameters, $headerParameters), $fetch); } /** @@ -1767,7 +1767,7 @@ public function chatMeMessage(array $formParameters = [], array $headerParameter */ public function chatPostEphemeral(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatPostEphemeral($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatPostEphemeral($formParameters, $headerParameters), $fetch); } /** @@ -1804,7 +1804,7 @@ public function chatPostEphemeral(array $formParameters = [], array $headerParam */ public function chatPostMessage(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatPostMessage($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatPostMessage($formParameters, $headerParameters), $fetch); } /** @@ -1837,7 +1837,7 @@ public function chatPostMessage(array $formParameters = [], array $headerParamet */ public function chatScheduleMessage(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatScheduleMessage($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatScheduleMessage($formParameters, $headerParameters), $fetch); } /** @@ -1863,7 +1863,7 @@ public function chatScheduleMessage(array $formParameters = [], array $headerPar */ public function chatScheduledMessagesList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatScheduledMessagesList($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatScheduledMessagesList($queryParameters, $headerParameters), $fetch); } /** @@ -1890,7 +1890,7 @@ public function chatScheduledMessagesList(array $queryParameters = [], array $he */ public function chatUnfurl(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatUnfurl($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatUnfurl($formParameters, $headerParameters), $fetch); } /** @@ -1919,7 +1919,7 @@ public function chatUnfurl(array $formParameters = [], array $headerParameters = */ public function chatUpdate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ChatUpdate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ChatUpdate($formParameters, $headerParameters), $fetch); } /** @@ -1941,7 +1941,7 @@ public function chatUpdate(array $formParameters = [], array $headerParameters = */ public function conversationsArchive(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsArchive($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsArchive($formParameters, $headerParameters), $fetch); } /** @@ -1963,7 +1963,7 @@ public function conversationsArchive(array $formParameters = [], array $headerPa */ public function conversationsClose(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsClose($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsClose($formParameters, $headerParameters), $fetch); } /** @@ -1986,7 +1986,7 @@ public function conversationsClose(array $formParameters = [], array $headerPara */ public function conversationsCreate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsCreate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsCreate($formParameters, $headerParameters), $fetch); } /** @@ -2010,7 +2010,7 @@ public function conversationsCreate(array $formParameters = [], array $headerPar */ public function conversationsHistory(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsHistory($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsHistory($queryParameters), $fetch); } /** @@ -2030,7 +2030,7 @@ public function conversationsHistory(array $queryParameters = [], string $fetch */ public function conversationsInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsInfo($queryParameters), $fetch); } /** @@ -2053,7 +2053,7 @@ public function conversationsInfo(array $queryParameters = [], string $fetch = s */ public function conversationsInvite(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsInvite($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsInvite($formParameters, $headerParameters), $fetch); } /** @@ -2075,7 +2075,7 @@ public function conversationsInvite(array $formParameters = [], array $headerPar */ public function conversationsJoin(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsJoin($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsJoin($formParameters, $headerParameters), $fetch); } /** @@ -2098,7 +2098,7 @@ public function conversationsJoin(array $formParameters = [], array $headerParam */ public function conversationsKick(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsKick($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsKick($formParameters, $headerParameters), $fetch); } /** @@ -2120,7 +2120,7 @@ public function conversationsKick(array $formParameters = [], array $headerParam */ public function conversationsLeave(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsLeave($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsLeave($formParameters, $headerParameters), $fetch); } /** @@ -2142,7 +2142,7 @@ public function conversationsLeave(array $formParameters = [], array $headerPara */ public function conversationsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsList($queryParameters), $fetch); } /** @@ -2165,7 +2165,7 @@ public function conversationsList(array $queryParameters = [], string $fetch = s */ public function conversationsMark(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsMark($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsMark($formParameters, $headerParameters), $fetch); } /** @@ -2185,7 +2185,7 @@ public function conversationsMark(array $formParameters = [], array $headerParam */ public function conversationsMembers(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsMembers($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsMembers($queryParameters), $fetch); } /** @@ -2209,7 +2209,7 @@ public function conversationsMembers(array $queryParameters = [], string $fetch */ public function conversationsOpen(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsOpen($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsOpen($formParameters, $headerParameters), $fetch); } /** @@ -2232,7 +2232,7 @@ public function conversationsOpen(array $formParameters = [], array $headerParam */ public function conversationsRename(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsRename($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsRename($formParameters, $headerParameters), $fetch); } /** @@ -2256,7 +2256,7 @@ public function conversationsRename(array $formParameters = [], array $headerPar */ public function conversationsReplies(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsReplies($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsReplies($queryParameters), $fetch); } /** @@ -2279,7 +2279,7 @@ public function conversationsReplies(array $queryParameters = [], string $fetch */ public function conversationsSetPurpose(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsSetPurpose($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsSetPurpose($formParameters, $headerParameters), $fetch); } /** @@ -2302,7 +2302,7 @@ public function conversationsSetPurpose(array $formParameters = [], array $heade */ public function conversationsSetTopic(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsSetTopic($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsSetTopic($formParameters, $headerParameters), $fetch); } /** @@ -2324,7 +2324,7 @@ public function conversationsSetTopic(array $formParameters = [], array $headerP */ public function conversationsUnarchive(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ConversationsUnarchive($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ConversationsUnarchive($formParameters, $headerParameters), $fetch); } /** @@ -2347,7 +2347,7 @@ public function conversationsUnarchive(array $formParameters = [], array $header */ public function dialogOpen(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DialogOpen($queryParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DialogOpen($queryParameters, $headerParameters), $fetch); } /** @@ -2364,7 +2364,7 @@ public function dialogOpen(array $queryParameters = [], array $headerParameters */ public function dndEndDnd(array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DndEndDnd($headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DndEndDnd($headerParameters), $fetch); } /** @@ -2381,7 +2381,7 @@ public function dndEndDnd(array $headerParameters = [], string $fetch = self::FE */ public function dndEndSnooze(array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DndEndSnooze($headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DndEndSnooze($headerParameters), $fetch); } /** @@ -2399,7 +2399,7 @@ public function dndEndSnooze(array $headerParameters = [], string $fetch = self: */ public function dndInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DndInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DndInfo($queryParameters), $fetch); } /** @@ -2417,7 +2417,7 @@ public function dndInfo(array $queryParameters = [], string $fetch = self::FETCH */ public function dndSetSnooze(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DndSetSnooze($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DndSetSnooze($formParameters), $fetch); } /** @@ -2435,7 +2435,7 @@ public function dndSetSnooze(array $formParameters = [], string $fetch = self::F */ public function dndTeamInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\DndTeamInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\DndTeamInfo($queryParameters), $fetch); } /** @@ -2452,7 +2452,7 @@ public function dndTeamInfo(array $queryParameters = [], string $fetch = self::F */ public function emojiList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\EmojiList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\EmojiList($queryParameters), $fetch); } /** @@ -2475,7 +2475,7 @@ public function emojiList(array $queryParameters = [], string $fetch = self::FET */ public function filesCommentsDelete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesCommentsDelete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesCommentsDelete($formParameters, $headerParameters), $fetch); } /** @@ -2497,7 +2497,7 @@ public function filesCommentsDelete(array $formParameters = [], array $headerPar */ public function filesDelete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesDelete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesDelete($formParameters, $headerParameters), $fetch); } /** @@ -2519,7 +2519,7 @@ public function filesDelete(array $formParameters = [], array $headerParameters */ public function filesInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesInfo($queryParameters), $fetch); } /** @@ -2544,7 +2544,7 @@ public function filesInfo(array $queryParameters = [], string $fetch = self::FET */ public function filesList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesList($queryParameters), $fetch); } /** @@ -2567,7 +2567,7 @@ public function filesList(array $queryParameters = [], string $fetch = self::FET */ public function filesRemoteAdd(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteAdd($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteAdd($formParameters), $fetch); } /** @@ -2586,7 +2586,7 @@ public function filesRemoteAdd(array $formParameters = [], string $fetch = self: */ public function filesRemoteInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteInfo($queryParameters), $fetch); } /** @@ -2608,7 +2608,7 @@ public function filesRemoteInfo(array $queryParameters = [], string $fetch = sel */ public function filesRemoteList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteList($queryParameters), $fetch); } /** @@ -2627,7 +2627,7 @@ public function filesRemoteList(array $queryParameters = [], string $fetch = sel */ public function filesRemoteRemove(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteRemove($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteRemove($formParameters), $fetch); } /** @@ -2647,7 +2647,7 @@ public function filesRemoteRemove(array $formParameters = [], string $fetch = se */ public function filesRemoteShare(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteShare($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteShare($queryParameters), $fetch); } /** @@ -2671,7 +2671,7 @@ public function filesRemoteShare(array $queryParameters = [], string $fetch = se */ public function filesRemoteUpdate(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRemoteUpdate($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRemoteUpdate($formParameters), $fetch); } /** @@ -2693,7 +2693,7 @@ public function filesRemoteUpdate(array $formParameters = [], string $fetch = se */ public function filesRevokePublicURL(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesRevokePublicURL($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesRevokePublicURL($formParameters, $headerParameters), $fetch); } /** @@ -2715,7 +2715,7 @@ public function filesRevokePublicURL(array $formParameters = [], array $headerPa */ public function filesSharedPublicURL(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesSharedPublicURL($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesSharedPublicURL($formParameters, $headerParameters), $fetch); } /** @@ -2740,7 +2740,7 @@ public function filesSharedPublicURL(array $formParameters = [], array $headerPa */ public function filesUpload(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\FilesUpload($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\FilesUpload($formParameters), $fetch); } /** @@ -2760,7 +2760,7 @@ public function filesUpload(array $formParameters = [], string $fetch = self::FE */ public function migrationExchange(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\MigrationExchange($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\MigrationExchange($queryParameters), $fetch); } /** @@ -2781,7 +2781,7 @@ public function migrationExchange(array $queryParameters = [], string $fetch = s */ public function oauthAccess(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\OauthAccess($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\OauthAccess($queryParameters), $fetch); } /** @@ -2802,7 +2802,7 @@ public function oauthAccess(array $queryParameters = [], string $fetch = self::F */ public function oauthToken(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\OauthToken($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\OauthToken($queryParameters), $fetch); } /** @@ -2822,7 +2822,7 @@ public function oauthToken(array $queryParameters = [], string $fetch = self::FE */ public function oauthV2Access(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\OauthV2Access($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\OauthV2Access($queryParameters), $fetch); } /** @@ -2845,7 +2845,7 @@ public function oauthV2Access(array $queryParameters = [], string $fetch = self: */ public function pinsAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\PinsAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\PinsAdd($formParameters, $headerParameters), $fetch); } /** @@ -2863,7 +2863,7 @@ public function pinsAdd(array $formParameters = [], array $headerParameters = [] */ public function pinsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\PinsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\PinsList($queryParameters), $fetch); } /** @@ -2886,7 +2886,7 @@ public function pinsList(array $queryParameters = [], string $fetch = self::FETC */ public function pinsRemove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\PinsRemove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\PinsRemove($formParameters, $headerParameters), $fetch); } /** @@ -2910,7 +2910,7 @@ public function pinsRemove(array $formParameters = [], array $headerParameters = */ public function reactionsAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ReactionsAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ReactionsAdd($formParameters, $headerParameters), $fetch); } /** @@ -2932,7 +2932,7 @@ public function reactionsAdd(array $formParameters = [], array $headerParameters */ public function reactionsGet(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ReactionsGet($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ReactionsGet($queryParameters), $fetch); } /** @@ -2955,7 +2955,7 @@ public function reactionsGet(array $queryParameters = [], string $fetch = self:: */ public function reactionsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ReactionsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ReactionsList($queryParameters), $fetch); } /** @@ -2981,7 +2981,7 @@ public function reactionsList(array $queryParameters = [], string $fetch = self: */ public function reactionsRemove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ReactionsRemove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ReactionsRemove($formParameters, $headerParameters), $fetch); } /** @@ -3005,7 +3005,7 @@ public function reactionsRemove(array $formParameters = [], array $headerParamet */ public function remindersAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RemindersAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RemindersAdd($formParameters, $headerParameters), $fetch); } /** @@ -3027,7 +3027,7 @@ public function remindersAdd(array $formParameters = [], array $headerParameters */ public function remindersComplete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RemindersComplete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RemindersComplete($formParameters, $headerParameters), $fetch); } /** @@ -3049,7 +3049,7 @@ public function remindersComplete(array $formParameters = [], array $headerParam */ public function remindersDelete(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RemindersDelete($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RemindersDelete($formParameters, $headerParameters), $fetch); } /** @@ -3067,7 +3067,7 @@ public function remindersDelete(array $formParameters = [], array $headerParamet */ public function remindersInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RemindersInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RemindersInfo($queryParameters), $fetch); } /** @@ -3084,7 +3084,7 @@ public function remindersInfo(array $queryParameters = [], string $fetch = self: */ public function remindersList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RemindersList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RemindersList($queryParameters), $fetch); } /** @@ -3103,7 +3103,7 @@ public function remindersList(array $queryParameters = [], string $fetch = self: */ public function rtmConnect(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\RtmConnect($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\RtmConnect($queryParameters), $fetch); } /** @@ -3126,7 +3126,7 @@ public function rtmConnect(array $queryParameters = [], string $fetch = self::FE */ public function searchMessages(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\SearchMessages($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\SearchMessages($queryParameters), $fetch); } /** @@ -3151,7 +3151,7 @@ public function searchMessages(array $queryParameters = [], string $fetch = self */ public function starsAdd(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\StarsAdd($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\StarsAdd($formParameters, $headerParameters), $fetch); } /** @@ -3172,7 +3172,7 @@ public function starsAdd(array $formParameters = [], array $headerParameters = [ */ public function starsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\StarsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\StarsList($queryParameters), $fetch); } /** @@ -3197,7 +3197,7 @@ public function starsList(array $queryParameters = [], string $fetch = self::FET */ public function starsRemove(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\StarsRemove($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\StarsRemove($formParameters, $headerParameters), $fetch); } /** @@ -3217,7 +3217,7 @@ public function starsRemove(array $formParameters = [], array $headerParameters */ public function teamAccessLogs(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\TeamAccessLogs($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\TeamAccessLogs($queryParameters), $fetch); } /** @@ -3235,7 +3235,7 @@ public function teamAccessLogs(array $queryParameters = [], string $fetch = self */ public function teamBillableInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\TeamBillableInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\TeamBillableInfo($queryParameters), $fetch); } /** @@ -3253,7 +3253,7 @@ public function teamBillableInfo(array $queryParameters = [], string $fetch = se */ public function teamInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\TeamInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\TeamInfo($queryParameters), $fetch); } /** @@ -3276,7 +3276,7 @@ public function teamInfo(array $queryParameters = [], string $fetch = self::FETC */ public function teamIntegrationLogs(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\TeamIntegrationLogs($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\TeamIntegrationLogs($queryParameters), $fetch); } /** @@ -3294,7 +3294,7 @@ public function teamIntegrationLogs(array $queryParameters = [], string $fetch = */ public function teamProfileGet(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\TeamProfileGet($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\TeamProfileGet($queryParameters), $fetch); } /** @@ -3320,7 +3320,7 @@ public function teamProfileGet(array $queryParameters = [], string $fetch = self */ public function usergroupsCreate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsCreate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsCreate($formParameters, $headerParameters), $fetch); } /** @@ -3343,7 +3343,7 @@ public function usergroupsCreate(array $formParameters = [], array $headerParame */ public function usergroupsDisable(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsDisable($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsDisable($formParameters, $headerParameters), $fetch); } /** @@ -3366,7 +3366,7 @@ public function usergroupsDisable(array $formParameters = [], array $headerParam */ public function usergroupsEnable(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsEnable($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsEnable($formParameters, $headerParameters), $fetch); } /** @@ -3387,7 +3387,7 @@ public function usergroupsEnable(array $formParameters = [], array $headerParame */ public function usergroupsList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsList($queryParameters), $fetch); } /** @@ -3414,7 +3414,7 @@ public function usergroupsList(array $queryParameters = [], string $fetch = self */ public function usergroupsUpdate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsUpdate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsUpdate($formParameters, $headerParameters), $fetch); } /** @@ -3433,7 +3433,7 @@ public function usergroupsUpdate(array $formParameters = [], array $headerParame */ public function usergroupsUsersList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsUsersList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsUsersList($queryParameters), $fetch); } /** @@ -3457,7 +3457,7 @@ public function usergroupsUsersList(array $queryParameters = [], string $fetch = */ public function usergroupsUsersUpdate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsergroupsUsersUpdate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsergroupsUsersUpdate($formParameters, $headerParameters), $fetch); } /** @@ -3479,7 +3479,7 @@ public function usergroupsUsersUpdate(array $formParameters = [], array $headerP */ public function usersConversations(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersConversations($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersConversations($queryParameters), $fetch); } /** @@ -3496,7 +3496,7 @@ public function usersConversations(array $queryParameters = [], string $fetch = */ public function usersDeletePhoto(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersDeletePhoto($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersDeletePhoto($formParameters), $fetch); } /** @@ -3514,7 +3514,7 @@ public function usersDeletePhoto(array $formParameters = [], string $fetch = sel */ public function usersGetPresence(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersGetPresence($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersGetPresence($queryParameters), $fetch); } /** @@ -3531,7 +3531,7 @@ public function usersGetPresence(array $queryParameters = [], string $fetch = se */ public function usersIdentity(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersIdentity($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersIdentity($queryParameters), $fetch); } /** @@ -3550,7 +3550,7 @@ public function usersIdentity(array $queryParameters = [], string $fetch = self: */ public function usersInfo(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersInfo($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersInfo($queryParameters), $fetch); } /** @@ -3571,7 +3571,7 @@ public function usersInfo(array $queryParameters = [], string $fetch = self::FET */ public function usersList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersList($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersList($queryParameters), $fetch); } /** @@ -3589,7 +3589,7 @@ public function usersList(array $queryParameters = [], string $fetch = self::FET */ public function usersLookupByEmail(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersLookupByEmail($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersLookupByEmail($queryParameters), $fetch); } /** @@ -3608,7 +3608,7 @@ public function usersLookupByEmail(array $queryParameters = [], string $fetch = */ public function usersProfileGet(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersProfileGet($queryParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersProfileGet($queryParameters), $fetch); } /** @@ -3633,7 +3633,7 @@ public function usersProfileGet(array $queryParameters = [], string $fetch = sel */ public function usersProfileSet(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersProfileSet($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersProfileSet($formParameters, $headerParameters), $fetch); } /** @@ -3650,7 +3650,7 @@ public function usersProfileSet(array $formParameters = [], array $headerParamet */ public function usersSetActive(array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersSetActive($headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersSetActive($headerParameters), $fetch); } /** @@ -3671,7 +3671,7 @@ public function usersSetActive(array $headerParameters = [], string $fetch = sel */ public function usersSetPhoto(array $formParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersSetPhoto($formParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersSetPhoto($formParameters), $fetch); } /** @@ -3693,7 +3693,7 @@ public function usersSetPhoto(array $formParameters = [], string $fetch = self:: */ public function usersSetPresence(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\UsersSetPresence($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\UsersSetPresence($formParameters, $headerParameters), $fetch); } /** @@ -3716,7 +3716,7 @@ public function usersSetPresence(array $formParameters = [], array $headerParame */ public function viewsOpen(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ViewsOpen($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ViewsOpen($formParameters, $headerParameters), $fetch); } /** @@ -3740,7 +3740,7 @@ public function viewsOpen(array $formParameters = [], array $headerParameters = */ public function viewsPublish(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ViewsPublish($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ViewsPublish($formParameters, $headerParameters), $fetch); } /** @@ -3763,7 +3763,7 @@ public function viewsPublish(array $formParameters = [], array $headerParameters */ public function viewsPush(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ViewsPush($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ViewsPush($formParameters, $headerParameters), $fetch); } /** @@ -3788,7 +3788,7 @@ public function viewsPush(array $formParameters = [], array $headerParameters = */ public function viewsUpdate(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\ViewsUpdate($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\ViewsUpdate($formParameters, $headerParameters), $fetch); } /** @@ -3811,7 +3811,7 @@ public function viewsUpdate(array $formParameters = [], array $headerParameters */ public function workflowsStepCompleted(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\WorkflowsStepCompleted($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\WorkflowsStepCompleted($formParameters, $headerParameters), $fetch); } /** @@ -3834,7 +3834,7 @@ public function workflowsStepCompleted(array $formParameters = [], array $header */ public function workflowsStepFailed(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\WorkflowsStepFailed($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\WorkflowsStepFailed($formParameters, $headerParameters), $fetch); } /** @@ -3860,7 +3860,7 @@ public function workflowsStepFailed(array $formParameters = [], array $headerPar */ public function workflowsUpdateStep(array $formParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \JoliCode\Slack\Api\Endpoint\WorkflowsUpdateStep($formParameters, $headerParameters), $fetch); + return $this->executeEndpoint(new Endpoint\WorkflowsUpdateStep($formParameters, $headerParameters), $fetch); } public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = []) @@ -3878,7 +3878,7 @@ public static function create($httpClient = null, array $additionalPlugins = [], } $requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory(); $streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory(); - $normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \JoliCode\Slack\Api\Normalizer\JaneObjectNormalizer()]; + $normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new Normalizer\JaneObjectNormalizer()]; if (\count($additionalNormalizers) > 0) { $normalizers = array_merge($normalizers, $additionalNormalizers); } diff --git a/generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php b/generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php index 3f012a94..2b9d1975 100644 --- a/generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminAppsApprovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsApprovePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminAppsApprovePostResponsedefaultNormalizer.php index 4309198f..edbc75ea 100644 --- a/generated/Normalizer/AdminAppsApprovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminAppsApprovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsApprovedListGetResponse200Normalizer.php b/generated/Normalizer/AdminAppsApprovedListGetResponse200Normalizer.php index a9e908d4..608bb42e 100644 --- a/generated/Normalizer/AdminAppsApprovedListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminAppsApprovedListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsApprovedListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminAppsApprovedListGetResponsedefaultNormalizer.php index bf9be5ae..90b3e2bc 100644 --- a/generated/Normalizer/AdminAppsApprovedListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminAppsApprovedListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsApprovedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRequestsListGetResponse200Normalizer.php b/generated/Normalizer/AdminAppsRequestsListGetResponse200Normalizer.php index 68508f00..b5e1cef6 100644 --- a/generated/Normalizer/AdminAppsRequestsListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminAppsRequestsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRequestsListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminAppsRequestsListGetResponsedefaultNormalizer.php index cf9eaf52..294a8b1a 100644 --- a/generated/Normalizer/AdminAppsRequestsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminAppsRequestsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRequestsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRestrictPostResponse200Normalizer.php b/generated/Normalizer/AdminAppsRestrictPostResponse200Normalizer.php index e3455579..3f5d0d5b 100644 --- a/generated/Normalizer/AdminAppsRestrictPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminAppsRestrictPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRestrictPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRestrictPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRestrictPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRestrictPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminAppsRestrictPostResponsedefaultNormalizer.php index 117f1b69..176eee84 100644 --- a/generated/Normalizer/AdminAppsRestrictPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminAppsRestrictPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRestrictPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRestrictPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRestrictPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRestrictedListGetResponse200Normalizer.php b/generated/Normalizer/AdminAppsRestrictedListGetResponse200Normalizer.php index e3436577..eb71e079 100644 --- a/generated/Normalizer/AdminAppsRestrictedListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminAppsRestrictedListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRestrictedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRestrictedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRestrictedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminAppsRestrictedListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminAppsRestrictedListGetResponsedefaultNormalizer.php index cb593a58..460262d5 100644 --- a/generated/Normalizer/AdminAppsRestrictedListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminAppsRestrictedListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminAppsRestrictedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminAppsRestrictedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminAppsRestrictedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminAppsRestrictedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsArchivePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsArchivePostResponse200Normalizer.php index 65e200ec..76b676fe 100644 --- a/generated/Normalizer/AdminConversationsArchivePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsArchivePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsArchivePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsArchivePostResponsedefaultNormalizer.php index f112ed24..ac887e54 100644 --- a/generated/Normalizer/AdminConversationsArchivePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsArchivePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsConvertToPrivatePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsConvertToPrivatePostResponse200Normalizer.php index 2dbb1d32..e992a90e 100644 --- a/generated/Normalizer/AdminConversationsConvertToPrivatePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsConvertToPrivatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsConvertToPrivatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsConvertToPrivatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsConvertToPrivatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsConvertToPrivatePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsConvertToPrivatePostResponsedefaultNormalizer.php index 500ba475..9f02d983 100644 --- a/generated/Normalizer/AdminConversationsConvertToPrivatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsConvertToPrivatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsConvertToPrivatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsConvertToPrivatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsConvertToPrivatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsConvertToPrivatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsCreatePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsCreatePostResponse200Normalizer.php index 40bd3416..cafb2599 100644 --- a/generated/Normalizer/AdminConversationsCreatePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsCreatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,65 +24,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { + $object->setChannelId($data['channel_id']); + } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { + $object->setChannelId(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { - $object->setChannelId($data['channel_id']); - } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { - $object->setChannelId(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('channelId') && null !== $object->getChannelId()) { + $data['channel_id'] = $object->getChannelId(); + } + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('channelId') && null !== $object->getChannelId()) { - $data['channel_id'] = $object->getChannelId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === $type; } - $data['ok'] = $object->getOk(); - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { + $object->setChannelId($data['channel_id']); + } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { + $object->setChannelId(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('channelId') && null !== $object->getChannelId()) { + $data['channel_id'] = $object->getChannelId(); + } + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsCreatePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsCreatePostResponsedefaultNormalizer.php index 532dcb28..74acf5d9 100644 --- a/generated/Normalizer/AdminConversationsCreatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsCreatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsDeletePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsDeletePostResponse200Normalizer.php index b8666fdd..a1343b1e 100644 --- a/generated/Normalizer/AdminConversationsDeletePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsDeletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsDeletePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsDeletePostResponsedefaultNormalizer.php index 34793f5f..c2731538 100644 --- a/generated/Normalizer/AdminConversationsDeletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsDeletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsDisconnectSharedPostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsDisconnectSharedPostResponse200Normalizer.php index f3a2991c..c764348b 100644 --- a/generated/Normalizer/AdminConversationsDisconnectSharedPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsDisconnectSharedPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsDisconnectSharedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsDisconnectSharedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsDisconnectSharedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsDisconnectSharedPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsDisconnectSharedPostResponsedefaultNormalizer.php index 342691e0..2f47dfad 100644 --- a/generated/Normalizer/AdminConversationsDisconnectSharedPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsDisconnectSharedPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsDisconnectSharedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsDisconnectSharedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsDisconnectSharedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsDisconnectSharedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer.php b/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer.php index ca2a2f33..e82db99a 100644 --- a/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer.php index e56cf748..5f217cad 100644 --- a/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200Normalizer.php b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200Normalizer.php index 3af3e2ad..3287d17a 100644 --- a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,65 +24,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetConversationPrefsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetConversationPrefsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { + $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs', 'json', $context)); + } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { + $object->setPrefs(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { - $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs', 'json', $context)); - } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { - $object->setPrefs(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('prefs') && null !== $object->getPrefs()) { + $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetConversationPrefsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('prefs') && null !== $object->getPrefs()) { - $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === $type; } - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { + $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs', 'json', $context)); + } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { + $object->setPrefs(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('prefs') && null !== $object->getPrefs()) { + $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer.php b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer.php index f63a331b..6511faaf 100644 --- a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,83 +24,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $values = []; + foreach ($data['type'] as $value) { + $values[] = $value; + } + $object->setType($values); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_1 = []; + foreach ($data['user'] as $value_1) { + $values_1[] = $value_1; + } + $object->setUser($values_1); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $values = []; - foreach ($data['type'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $values = []; + foreach ($object->getType() as $value) { + $values[] = $value; + } + $data['type'] = $values; } - $object->setType($values); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $values_1 = []; - foreach ($data['user'] as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_1 = []; + foreach ($object->getUser() as $value_1) { + $values_1[] = $value_1; + } + $data['user'] = $values_1; } - $object->setUser($values_1); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $values = []; - foreach ($object->getType() as $value) { - $values[] = $value; - } - $data['type'] = $values; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === $type; } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $values_1 = []; - foreach ($object->getUser() as $value_1) { - $values_1[] = $value_1; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $values = []; + foreach ($data['type'] as $value) { + $values[] = $value; + } + $object->setType($values); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_1 = []; + foreach ($data['user'] as $value_1) { + $values_1[] = $value_1; + } + $object->setUser($values_1); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); } - $data['user'] = $values_1; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $values = []; + foreach ($object->getType() as $value) { + $values[] = $value; + } + $data['type'] = $values; + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_1 = []; + foreach ($object->getUser() as $value_1) { + $values_1[] = $value_1; + } + $data['user'] = $values_1; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer.php b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer.php index fa4d336d..f6178f4e 100644 --- a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,67 +24,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200Prefs(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200Prefs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('can_thread', $data) && null !== $data['can_thread']) { + $object->setCanThread($this->denormalizer->denormalize($data['can_thread'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread', 'json', $context)); + } elseif (\array_key_exists('can_thread', $data) && null === $data['can_thread']) { + $object->setCanThread(null); + } + if (\array_key_exists('who_can_post', $data) && null !== $data['who_can_post']) { + $object->setWhoCanPost($this->denormalizer->denormalize($data['who_can_post'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost', 'json', $context)); + } elseif (\array_key_exists('who_can_post', $data) && null === $data['who_can_post']) { + $object->setWhoCanPost(null); + } + return $object; } - if (\array_key_exists('can_thread', $data) && null !== $data['can_thread']) { - $object->setCanThread($this->denormalizer->denormalize($data['can_thread'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread', 'json', $context)); - } elseif (\array_key_exists('can_thread', $data) && null === $data['can_thread']) { - $object->setCanThread(null); - } - if (\array_key_exists('who_can_post', $data) && null !== $data['who_can_post']) { - $object->setWhoCanPost($this->denormalizer->denormalize($data['who_can_post'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost', 'json', $context)); - } elseif (\array_key_exists('who_can_post', $data) && null === $data['who_can_post']) { - $object->setWhoCanPost(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('canThread') && null !== $object->getCanThread()) { + $data['can_thread'] = $this->normalizer->normalize($object->getCanThread(), 'json', $context); + } + if ($object->isInitialized('whoCanPost') && null !== $object->getWhoCanPost()) { + $data['who_can_post'] = $this->normalizer->normalize($object->getWhoCanPost(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('canThread') && null !== $object->getCanThread()) { - $data['can_thread'] = $this->normalizer->normalize($object->getCanThread(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === $type; } - if ($object->isInitialized('whoCanPost') && null !== $object->getWhoCanPost()) { - $data['who_can_post'] = $this->normalizer->normalize($object->getWhoCanPost(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200Prefs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('can_thread', $data) && null !== $data['can_thread']) { + $object->setCanThread($this->denormalizer->denormalize($data['can_thread'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread', 'json', $context)); + } elseif (\array_key_exists('can_thread', $data) && null === $data['can_thread']) { + $object->setCanThread(null); + } + if (\array_key_exists('who_can_post', $data) && null !== $data['who_can_post']) { + $object->setWhoCanPost($this->denormalizer->denormalize($data['who_can_post'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost', 'json', $context)); + } elseif (\array_key_exists('who_can_post', $data) && null === $data['who_can_post']) { + $object->setWhoCanPost(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('canThread') && null !== $object->getCanThread()) { + $data['can_thread'] = $this->normalizer->normalize($object->getCanThread(), 'json', $context); + } + if ($object->isInitialized('whoCanPost') && null !== $object->getWhoCanPost()) { + $data['who_can_post'] = $this->normalizer->normalize($object->getWhoCanPost(), 'json', $context); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer.php b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer.php index 73dc299e..835ce0bb 100644 --- a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,83 +24,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $values = []; + foreach ($data['type'] as $value) { + $values[] = $value; + } + $object->setType($values); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_1 = []; + foreach ($data['user'] as $value_1) { + $values_1[] = $value_1; + } + $object->setUser($values_1); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $values = []; - foreach ($data['type'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $values = []; + foreach ($object->getType() as $value) { + $values[] = $value; + } + $data['type'] = $values; } - $object->setType($values); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $values_1 = []; - foreach ($data['user'] as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_1 = []; + foreach ($object->getUser() as $value_1) { + $values_1[] = $value_1; + } + $data['user'] = $values_1; } - $object->setUser($values_1); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $values = []; - foreach ($object->getType() as $value) { - $values[] = $value; - } - $data['type'] = $values; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === $type; } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $values_1 = []; - foreach ($object->getUser() as $value_1) { - $values_1[] = $value_1; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $values = []; + foreach ($data['type'] as $value) { + $values[] = $value; + } + $object->setType($values); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_1 = []; + foreach ($data['user'] as $value_1) { + $values_1[] = $value_1; + } + $object->setUser($values_1); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); } - $data['user'] = $values_1; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $values = []; + foreach ($object->getType() as $value) { + $values[] = $value; + } + $data['type'] = $values; + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_1 = []; + foreach ($object->getUser() as $value_1) { + $values_1[] = $value_1; + } + $data['user'] = $values_1; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer.php index ed906506..ad31d9ab 100644 --- a/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetConversationPrefsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetTeamsGetResponse200Normalizer.php b/generated/Normalizer/AdminConversationsGetTeamsGetResponse200Normalizer.php index da3a1ede..5029f4d9 100644 --- a/generated/Normalizer/AdminConversationsGetTeamsGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsGetTeamsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetTeamsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetTeamsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('team_ids', $data) && null !== $data['team_ids']) { + $values = []; + foreach ($data['team_ids'] as $value) { + $values[] = $value; + } + $object->setTeamIds($values); + } elseif (\array_key_exists('team_ids', $data) && null === $data['team_ids']) { + $object->setTeamIds(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); - } - if (\array_key_exists('team_ids', $data) && null !== $data['team_ids']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } $values = []; - foreach ($data['team_ids'] as $value) { + foreach ($object->getTeamIds() as $value) { $values[] = $value; } - $object->setTeamIds($values); - } elseif (\array_key_exists('team_ids', $data) && null === $data['team_ids']) { - $object->setTeamIds(null); + $data['team_ids'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetTeamsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === $type; } - $values = []; - foreach ($object->getTeamIds() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' === \get_class($data); } - $data['team_ids'] = $values; - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('team_ids', $data) && null !== $data['team_ids']) { + $values = []; + foreach ($data['team_ids'] as $value) { + $values[] = $value; + } + $object->setTeamIds($values); + } elseif (\array_key_exists('team_ids', $data) && null === $data['team_ids']) { + $object->setTeamIds(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + $values = []; + foreach ($object->getTeamIds() as $value) { + $values[] = $value; + } + $data['team_ids'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer.php index 3a3b7fc7..313e1be0 100644 --- a/generated/Normalizer/AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsGetTeamsGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsGetTeamsGetResponsedefaultNormalizer.php index 306dc44b..b64ef4c2 100644 --- a/generated/Normalizer/AdminConversationsGetTeamsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsGetTeamsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsGetTeamsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsGetTeamsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsGetTeamsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsGetTeamsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsInvitePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsInvitePostResponse200Normalizer.php index 51f6ff02..64684460 100644 --- a/generated/Normalizer/AdminConversationsInvitePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsInvitePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsInvitePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsInvitePostResponsedefaultNormalizer.php index fbc72224..43a80f41 100644 --- a/generated/Normalizer/AdminConversationsInvitePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsInvitePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRenamePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsRenamePostResponse200Normalizer.php index 7464073a..1bbd20a9 100644 --- a/generated/Normalizer/AdminConversationsRenamePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsRenamePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRenamePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsRenamePostResponsedefaultNormalizer.php index 68a36dcd..3f2f4522 100644 --- a/generated/Normalizer/AdminConversationsRenamePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsRenamePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer.php index 8eba2c74..07f64c31 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer.php index 2b91c52d..93d63381 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessAddGroupPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer.php index 51f8664f..1d5f6dd2 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer.php index 6c685949..b3de9089 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessListGroupsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer.php index 21d188f4..d9170cdf 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer.php index a3275f12..bb3faf09 100644 --- a/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSearchGetResponse200Normalizer.php b/generated/Normalizer/AdminConversationsSearchGetResponse200Normalizer.php index 8663d957..a0492bab 100644 --- a/generated/Normalizer/AdminConversationsSearchGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsSearchGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSearchGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSearchGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel', 'json', $context); + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('channels', $data) && null !== $data['channels']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['channels'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel', 'json', $context); + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setChannels($values); - } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { - $object->setChannels(null); - } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + $data['channels'] = $values; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSearchGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getChannels() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === $type; } - $data['channels'] = $values; - $data['next_cursor'] = $object->getNextCursor(); - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel', 'json', $context); + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['channels'] = $values; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSearchGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsSearchGetResponsedefaultNormalizer.php index f545fcd5..023d17f8 100644 --- a/generated/Normalizer/AdminConversationsSearchGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsSearchGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSearchGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSearchGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSearchGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSearchGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponse200Normalizer.php index bed5e566..ced0ab7e 100644 --- a/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSetConversationPrefsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSetConversationPrefsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSetConversationPrefsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer.php index 8ea4c8c5..01011ea8 100644 --- a/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetConversationPrefsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSetTeamsPostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsSetTeamsPostResponse200Normalizer.php index 0b9b4c29..06270384 100644 --- a/generated/Normalizer/AdminConversationsSetTeamsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsSetTeamsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSetTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSetTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSetTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsSetTeamsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsSetTeamsPostResponsedefaultNormalizer.php index 2b04fe83..22ab596f 100644 --- a/generated/Normalizer/AdminConversationsSetTeamsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsSetTeamsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsSetTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsSetTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsSetTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsSetTeamsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsUnarchivePostResponse200Normalizer.php b/generated/Normalizer/AdminConversationsUnarchivePostResponse200Normalizer.php index 1f8ca48c..48f2a6ec 100644 --- a/generated/Normalizer/AdminConversationsUnarchivePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminConversationsUnarchivePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminConversationsUnarchivePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminConversationsUnarchivePostResponsedefaultNormalizer.php index e729bbc9..5a1118d2 100644 --- a/generated/Normalizer/AdminConversationsUnarchivePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminConversationsUnarchivePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminConversationsUnarchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiAddAliasPostResponse200Normalizer.php b/generated/Normalizer/AdminEmojiAddAliasPostResponse200Normalizer.php index dc128ac3..8af0a3e1 100644 --- a/generated/Normalizer/AdminEmojiAddAliasPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminEmojiAddAliasPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiAddAliasPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiAddAliasPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiAddAliasPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiAddAliasPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminEmojiAddAliasPostResponsedefaultNormalizer.php index 1706a7e1..9ddf36de 100644 --- a/generated/Normalizer/AdminEmojiAddAliasPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminEmojiAddAliasPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiAddAliasPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiAddAliasPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiAddAliasPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddAliasPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiAddPostResponse200Normalizer.php b/generated/Normalizer/AdminEmojiAddPostResponse200Normalizer.php index 3183615b..50974d8e 100644 --- a/generated/Normalizer/AdminEmojiAddPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminEmojiAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiAddPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminEmojiAddPostResponsedefaultNormalizer.php index 6a100d2d..209bcf7b 100644 --- a/generated/Normalizer/AdminEmojiAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminEmojiAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiListGetResponse200Normalizer.php b/generated/Normalizer/AdminEmojiListGetResponse200Normalizer.php index a2cb1eae..08e2add3 100644 --- a/generated/Normalizer/AdminEmojiListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminEmojiListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminEmojiListGetResponsedefaultNormalizer.php index 6e4d9f54..b3c65452 100644 --- a/generated/Normalizer/AdminEmojiListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminEmojiListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiRemovePostResponse200Normalizer.php b/generated/Normalizer/AdminEmojiRemovePostResponse200Normalizer.php index 72afe82d..70bad396 100644 --- a/generated/Normalizer/AdminEmojiRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminEmojiRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminEmojiRemovePostResponsedefaultNormalizer.php index 3d0a97f6..af64d39c 100644 --- a/generated/Normalizer/AdminEmojiRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminEmojiRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiRenamePostResponse200Normalizer.php b/generated/Normalizer/AdminEmojiRenamePostResponse200Normalizer.php index 6d055710..82bae960 100644 --- a/generated/Normalizer/AdminEmojiRenamePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminEmojiRenamePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminEmojiRenamePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminEmojiRenamePostResponsedefaultNormalizer.php index 0836c901..53308e63 100644 --- a/generated/Normalizer/AdminEmojiRenamePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminEmojiRenamePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminEmojiRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminEmojiRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminEmojiRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminEmojiRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsApprovePostResponse200Normalizer.php b/generated/Normalizer/AdminInviteRequestsApprovePostResponse200Normalizer.php index b8a38269..4d95be41 100644 --- a/generated/Normalizer/AdminInviteRequestsApprovePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminInviteRequestsApprovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsApprovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsApprovePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminInviteRequestsApprovePostResponsedefaultNormalizer.php index 41f5aa29..a4b20f07 100644 --- a/generated/Normalizer/AdminInviteRequestsApprovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminInviteRequestsApprovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsApprovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsApprovedListGetResponse200Normalizer.php b/generated/Normalizer/AdminInviteRequestsApprovedListGetResponse200Normalizer.php index 5dabd3d0..fc8731e9 100644 --- a/generated/Normalizer/AdminInviteRequestsApprovedListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminInviteRequestsApprovedListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsApprovedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsApprovedListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminInviteRequestsApprovedListGetResponsedefaultNormalizer.php index 69864548..518fd3ec 100644 --- a/generated/Normalizer/AdminInviteRequestsApprovedListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminInviteRequestsApprovedListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsApprovedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsApprovedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsDeniedListGetResponse200Normalizer.php b/generated/Normalizer/AdminInviteRequestsDeniedListGetResponse200Normalizer.php index 598019f2..f7baf96c 100644 --- a/generated/Normalizer/AdminInviteRequestsDeniedListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminInviteRequestsDeniedListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsDeniedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsDeniedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsDeniedListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsDeniedListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminInviteRequestsDeniedListGetResponsedefaultNormalizer.php index a208c690..61558c0b 100644 --- a/generated/Normalizer/AdminInviteRequestsDeniedListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminInviteRequestsDeniedListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsDeniedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsDeniedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsDeniedListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDeniedListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsDenyPostResponse200Normalizer.php b/generated/Normalizer/AdminInviteRequestsDenyPostResponse200Normalizer.php index 52563580..2e1afbf6 100644 --- a/generated/Normalizer/AdminInviteRequestsDenyPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminInviteRequestsDenyPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsDenyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsDenyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsDenyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsDenyPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminInviteRequestsDenyPostResponsedefaultNormalizer.php index e3ad5f21..7f6d5eba 100644 --- a/generated/Normalizer/AdminInviteRequestsDenyPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminInviteRequestsDenyPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsDenyPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsDenyPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsDenyPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsDenyPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsListGetResponse200Normalizer.php b/generated/Normalizer/AdminInviteRequestsListGetResponse200Normalizer.php index b5aa2c11..435ab845 100644 --- a/generated/Normalizer/AdminInviteRequestsListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminInviteRequestsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminInviteRequestsListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminInviteRequestsListGetResponsedefaultNormalizer.php index 6f211ef4..c06fe495 100644 --- a/generated/Normalizer/AdminInviteRequestsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminInviteRequestsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminInviteRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminInviteRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminInviteRequestsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminInviteRequestsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsAdminsListGetResponse200Normalizer.php b/generated/Normalizer/AdminTeamsAdminsListGetResponse200Normalizer.php index e81a8abb..46948b83 100644 --- a/generated/Normalizer/AdminTeamsAdminsListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsAdminsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsAdminsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsAdminsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsAdminsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsAdminsListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsAdminsListGetResponsedefaultNormalizer.php index 78db2ed7..f66db9d0 100644 --- a/generated/Normalizer/AdminTeamsAdminsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsAdminsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsAdminsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsAdminsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsAdminsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsAdminsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsCreatePostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsCreatePostResponse200Normalizer.php index 8b3d01c8..d3c9a140 100644 --- a/generated/Normalizer/AdminTeamsCreatePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsCreatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsCreatePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsCreatePostResponsedefaultNormalizer.php index 8c3ec1aa..eec5c33d 100644 --- a/generated/Normalizer/AdminTeamsCreatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsCreatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsListGetResponse200Normalizer.php b/generated/Normalizer/AdminTeamsListGetResponse200Normalizer.php index fa35f3c3..0c980b42 100644 --- a/generated/Normalizer/AdminTeamsListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsListGetResponsedefaultNormalizer.php index 14fc6f13..72f68fc5 100644 --- a/generated/Normalizer/AdminTeamsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsOwnersListGetResponse200Normalizer.php b/generated/Normalizer/AdminTeamsOwnersListGetResponse200Normalizer.php index 14800ea5..0cead937 100644 --- a/generated/Normalizer/AdminTeamsOwnersListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsOwnersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsOwnersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsOwnersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsOwnersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsOwnersListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsOwnersListGetResponsedefaultNormalizer.php index ab896431..c7cd1778 100644 --- a/generated/Normalizer/AdminTeamsOwnersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsOwnersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsOwnersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsOwnersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsOwnersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsOwnersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsInfoGetResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsInfoGetResponse200Normalizer.php index 90077714..08363199 100644 --- a/generated/Normalizer/AdminTeamsSettingsInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsInfoGetResponsedefaultNormalizer.php index 296a514b..037a9321 100644 --- a/generated/Normalizer/AdminTeamsSettingsInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer.php index 594a163c..6560ad02 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer.php index 232483cf..e9fa6044 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponse200Normalizer.php index 340e109c..1aeb7ee6 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDescriptionPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDescriptionPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDescriptionPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer.php index 8d430651..f4343f9d 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDescriptionPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer.php index 59449cb0..aa96e3f5 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer.php index c081d986..d853af76 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetIconPostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsSetIconPostResponse200Normalizer.php index 69b0fbe7..5d6ef630 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetIconPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetIconPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetIconPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetIconPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetIconPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetIconPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsSetIconPostResponsedefaultNormalizer.php index 03c8366a..4591e94b 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetIconPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetIconPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetIconPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetIconPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetIconPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetIconPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetNamePostResponse200Normalizer.php b/generated/Normalizer/AdminTeamsSettingsSetNamePostResponse200Normalizer.php index cb5918c6..a21a1b52 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetNamePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetNamePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetNamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetNamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetNamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminTeamsSettingsSetNamePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminTeamsSettingsSetNamePostResponsedefaultNormalizer.php index ddec0f85..d61420d1 100644 --- a/generated/Normalizer/AdminTeamsSettingsSetNamePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminTeamsSettingsSetNamePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminTeamsSettingsSetNamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminTeamsSettingsSetNamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminTeamsSettingsSetNamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminTeamsSettingsSetNamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsAddChannelsPostResponse200Normalizer.php b/generated/Normalizer/AdminUsergroupsAddChannelsPostResponse200Normalizer.php index e1963003..a46e8f26 100644 --- a/generated/Normalizer/AdminUsergroupsAddChannelsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsergroupsAddChannelsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsAddChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsAddChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsAddChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsAddChannelsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsergroupsAddChannelsPostResponsedefaultNormalizer.php index 112c46e1..8f7ccdf2 100644 --- a/generated/Normalizer/AdminUsergroupsAddChannelsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsergroupsAddChannelsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsAddChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsAddChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsAddChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsAddTeamsPostResponse200Normalizer.php b/generated/Normalizer/AdminUsergroupsAddTeamsPostResponse200Normalizer.php index f81b7ff6..61515ac1 100644 --- a/generated/Normalizer/AdminUsergroupsAddTeamsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsergroupsAddTeamsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsAddTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsAddTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsAddTeamsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsAddTeamsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsergroupsAddTeamsPostResponsedefaultNormalizer.php index 440725a0..a8d4aaa5 100644 --- a/generated/Normalizer/AdminUsergroupsAddTeamsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsergroupsAddTeamsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsAddTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsAddTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsAddTeamsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsAddTeamsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsListChannelsGetResponse200Normalizer.php b/generated/Normalizer/AdminUsergroupsListChannelsGetResponse200Normalizer.php index 25b879c4..b05d69fe 100644 --- a/generated/Normalizer/AdminUsergroupsListChannelsGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsergroupsListChannelsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsListChannelsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsListChannelsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsListChannelsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsListChannelsGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsergroupsListChannelsGetResponsedefaultNormalizer.php index e78e5d15..09179841 100644 --- a/generated/Normalizer/AdminUsergroupsListChannelsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsergroupsListChannelsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsListChannelsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsListChannelsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsListChannelsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsListChannelsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponse200Normalizer.php b/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponse200Normalizer.php index 9aacb812..66145bea 100644 --- a/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsRemoveChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsRemoveChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsRemoveChannelsPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer.php index a0f91f00..61c28f7b 100644 --- a/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsergroupsRemoveChannelsPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersAssignPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersAssignPostResponse200Normalizer.php index 3b3aa57f..a5dd9527 100644 --- a/generated/Normalizer/AdminUsersAssignPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersAssignPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersAssignPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersAssignPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersAssignPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersAssignPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersAssignPostResponsedefaultNormalizer.php index 080ff29b..d28ab72d 100644 --- a/generated/Normalizer/AdminUsersAssignPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersAssignPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersAssignPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersAssignPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersAssignPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersAssignPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersInvitePostResponse200Normalizer.php b/generated/Normalizer/AdminUsersInvitePostResponse200Normalizer.php index 51a96cd0..b9f04f27 100644 --- a/generated/Normalizer/AdminUsersInvitePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersInvitePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersInvitePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersInvitePostResponsedefaultNormalizer.php index 0a446de8..67f9a03e 100644 --- a/generated/Normalizer/AdminUsersInvitePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersInvitePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersListGetResponse200Normalizer.php b/generated/Normalizer/AdminUsersListGetResponse200Normalizer.php index 1a644b53..bbf86431 100644 --- a/generated/Normalizer/AdminUsersListGetResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersListGetResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersListGetResponsedefaultNormalizer.php index 3d4b0578..27a9ac1c 100644 --- a/generated/Normalizer/AdminUsersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersRemovePostResponse200Normalizer.php b/generated/Normalizer/AdminUsersRemovePostResponse200Normalizer.php index b3a4cd45..243c5000 100644 --- a/generated/Normalizer/AdminUsersRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersRemovePostResponsedefaultNormalizer.php index 031d63ee..d9297de2 100644 --- a/generated/Normalizer/AdminUsersRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSessionInvalidatePostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSessionInvalidatePostResponse200Normalizer.php index 91a82507..0a460606 100644 --- a/generated/Normalizer/AdminUsersSessionInvalidatePostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSessionInvalidatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSessionInvalidatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSessionInvalidatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSessionInvalidatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSessionInvalidatePostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSessionInvalidatePostResponsedefaultNormalizer.php index 24baf492..230ed58d 100644 --- a/generated/Normalizer/AdminUsersSessionInvalidatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSessionInvalidatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSessionInvalidatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSessionInvalidatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSessionInvalidatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionInvalidatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSessionResetPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSessionResetPostResponse200Normalizer.php index df77d6f8..208b5a40 100644 --- a/generated/Normalizer/AdminUsersSessionResetPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSessionResetPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSessionResetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSessionResetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSessionResetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSessionResetPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSessionResetPostResponsedefaultNormalizer.php index c049fffd..030d0e9b 100644 --- a/generated/Normalizer/AdminUsersSessionResetPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSessionResetPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSessionResetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSessionResetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSessionResetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSessionResetPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetAdminPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSetAdminPostResponse200Normalizer.php index 3f4bcc88..44c075a4 100644 --- a/generated/Normalizer/AdminUsersSetAdminPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSetAdminPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetAdminPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetAdminPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetAdminPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetAdminPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSetAdminPostResponsedefaultNormalizer.php index 1097416b..74073207 100644 --- a/generated/Normalizer/AdminUsersSetAdminPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSetAdminPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetAdminPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetAdminPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetAdminPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetAdminPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetExpirationPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSetExpirationPostResponse200Normalizer.php index ea033f72..95a12aaa 100644 --- a/generated/Normalizer/AdminUsersSetExpirationPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSetExpirationPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetExpirationPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetExpirationPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetExpirationPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetExpirationPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSetExpirationPostResponsedefaultNormalizer.php index f65469eb..7caef0ed 100644 --- a/generated/Normalizer/AdminUsersSetExpirationPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSetExpirationPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetExpirationPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetExpirationPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetExpirationPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetExpirationPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetOwnerPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSetOwnerPostResponse200Normalizer.php index 85f18a9f..2755aeed 100644 --- a/generated/Normalizer/AdminUsersSetOwnerPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSetOwnerPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetOwnerPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetOwnerPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetOwnerPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetOwnerPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSetOwnerPostResponsedefaultNormalizer.php index 6a4d4fc0..c702c776 100644 --- a/generated/Normalizer/AdminUsersSetOwnerPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSetOwnerPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetOwnerPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetOwnerPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetOwnerPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetOwnerPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetRegularPostResponse200Normalizer.php b/generated/Normalizer/AdminUsersSetRegularPostResponse200Normalizer.php index dfae47dd..c101bfa2 100644 --- a/generated/Normalizer/AdminUsersSetRegularPostResponse200Normalizer.php +++ b/generated/Normalizer/AdminUsersSetRegularPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetRegularPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetRegularPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetRegularPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/AdminUsersSetRegularPostResponsedefaultNormalizer.php b/generated/Normalizer/AdminUsersSetRegularPostResponsedefaultNormalizer.php index 21e69353..1dbc7684 100644 --- a/generated/Normalizer/AdminUsersSetRegularPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/AdminUsersSetRegularPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AdminUsersSetRegularPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AdminUsersSetRegularPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AdminUsersSetRegularPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AdminUsersSetRegularPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ApiTestGetResponse200Normalizer.php b/generated/Normalizer/ApiTestGetResponse200Normalizer.php index 502f5ae7..8a143178 100644 --- a/generated/Normalizer/ApiTestGetResponse200Normalizer.php +++ b/generated/Normalizer/ApiTestGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ApiTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ApiTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('args', $data) && null !== $data['args']) { + $object->setArgs($data['args']); + unset($data['args']); + } elseif (\array_key_exists('args', $data) && null === $data['args']) { + $object->setArgs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('args', $data) && null !== $data['args']) { - $object->setArgs($data['args']); - unset($data['args']); - } elseif (\array_key_exists('args', $data) && null === $data['args']) { - $object->setArgs(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $data['args'] = $object->getArgs(); } + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ApiTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('args') && null !== $object->getArgs()) { - $data['args'] = $object->getArgs(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' === \get_class($data); } - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('args', $data) && null !== $data['args']) { + $object->setArgs($data['args']); + unset($data['args']); + } elseif (\array_key_exists('args', $data) && null === $data['args']) { + $object->setArgs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $data['args'] = $object->getArgs(); + } + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ApiTestGetResponsedefaultNormalizer.php b/generated/Normalizer/ApiTestGetResponsedefaultNormalizer.php index 63e096b4..14afda5b 100644 --- a/generated/Normalizer/ApiTestGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ApiTestGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,84 +24,165 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ApiTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ApiTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('args', $data) && null !== $data['args']) { + $object->setArgs($data['args']); + unset($data['args']); + } elseif (\array_key_exists('args', $data) && null === $data['args']) { + $object->setArgs(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('args', $data) && null !== $data['args']) { - $object->setArgs($data['args']); - unset($data['args']); - } elseif (\array_key_exists('args', $data) && null === $data['args']) { - $object->setArgs(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $data['args'] = $object->getArgs(); } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ApiTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('args') && null !== $object->getArgs()) { - $data['args'] = $object->getArgs(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === $type; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ApiTestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('args', $data) && null !== $data['args']) { + $object->setArgs($data['args']); + unset($data['args']); + } elseif (\array_key_exists('args', $data) && null === $data['args']) { + $object->setArgs(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $data['args'] = $object->getArgs(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsEventAuthorizationsListGetResponse200Normalizer.php b/generated/Normalizer/AppsEventAuthorizationsListGetResponse200Normalizer.php index 0a0b2072..27f722fc 100644 --- a/generated/Normalizer/AppsEventAuthorizationsListGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsEventAuthorizationsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsEventAuthorizationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsEventAuthorizationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsEventAuthorizationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsEventAuthorizationsListGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsEventAuthorizationsListGetResponsedefaultNormalizer.php index 05de7758..946c1001 100644 --- a/generated/Normalizer/AppsEventAuthorizationsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsEventAuthorizationsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsEventAuthorizationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsEventAuthorizationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsEventAuthorizationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsEventAuthorizationsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer.php index 326ca17c..dc40b4bf 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoAppHome(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoAppHome(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $values = []; - foreach ($data['scopes'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('resources') && null !== $object->getResources()) { - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === $type; } - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoAppHome(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } - $data['scopes'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoChannelNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoChannelNormalizer.php index 6fc3aaef..22433655 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoChannelNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoChannelNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoChannel(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoChannel(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $values = []; - foreach ($data['scopes'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('resources') && null !== $object->getResources()) { - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === $type; } - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoChannel(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } - $data['scopes'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoGroupNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoGroupNormalizer.php index afcaa9b7..805dac1e 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoGroupNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoGroupNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoGroup(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoGroup(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $values = []; - foreach ($data['scopes'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('resources') && null !== $object->getResources()) { - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === $type; } - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoGroup(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } - $data['scopes'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoImNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoImNormalizer.php index f36d1d94..c6048581 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoImNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoImNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoImNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoImNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoIm(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoIm(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $values = []; - foreach ($data['scopes'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoImNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('resources') && null !== $object->getResources()) { - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === $type; } - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoIm(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } - $data['scopes'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoMpimNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoMpimNormalizer.php index 3657f387..ff391d0d 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoMpimNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoMpimNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoMpimNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoMpimNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoMpim(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoMpim(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $values = []; - foreach ($data['scopes'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoMpimNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('resources') && null !== $object->getResources()) { - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === $type; } - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoMpim(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } - $data['scopes'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('scopes') && null !== $object->getScopes()) { + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoNormalizer.php index 8c09d127..33a095fc 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200Info(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200Info(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { + $object->setAppHome($this->denormalizer->denormalize($data['app_home'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome', 'json', $context)); + } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { + $object->setAppHome(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($this->denormalizer->denormalize($data['group'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup', 'json', $context)); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('im', $data) && null !== $data['im']) { + $object->setIm($this->denormalizer->denormalize($data['im'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm', 'json', $context)); + } elseif (\array_key_exists('im', $data) && null === $data['im']) { + $object->setIm(null); + } + if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { + $object->setMpim($this->denormalizer->denormalize($data['mpim'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim', 'json', $context)); + } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { + $object->setMpim(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + return $object; } - if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { - $object->setAppHome($this->denormalizer->denormalize($data['app_home'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome', 'json', $context)); - } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { - $object->setAppHome(null); - } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['app_home'] = $this->normalizer->normalize($object->getAppHome(), 'json', $context); + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); + $data['im'] = $this->normalizer->normalize($object->getIm(), 'json', $context); + $data['mpim'] = $this->normalizer->normalize($object->getMpim(), 'json', $context); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + + return $data; } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($this->denormalizer->denormalize($data['group'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup', 'json', $context)); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false]; } - if (\array_key_exists('im', $data) && null !== $data['im']) { - $object->setIm($this->denormalizer->denormalize($data['im'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm', 'json', $context)); - } elseif (\array_key_exists('im', $data) && null === $data['im']) { - $object->setIm(null); + } +} else { + class AppsPermissionsInfoGetResponse200InfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === $type; } - if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { - $object->setMpim($this->denormalizer->denormalize($data['mpim'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim', 'json', $context)); - } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { - $object->setMpim(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' === \get_class($data); } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200Info(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { + $object->setAppHome($this->denormalizer->denormalize($data['app_home'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome', 'json', $context)); + } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { + $object->setAppHome(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($this->denormalizer->denormalize($data['group'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup', 'json', $context)); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('im', $data) && null !== $data['im']) { + $object->setIm($this->denormalizer->denormalize($data['im'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm', 'json', $context)); + } elseif (\array_key_exists('im', $data) && null === $data['im']) { + $object->setIm(null); + } + if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { + $object->setMpim($this->denormalizer->denormalize($data['mpim'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim', 'json', $context)); + } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { + $object->setMpim(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['app_home'] = $this->normalizer->normalize($object->getAppHome(), 'json', $context); + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); + $data['im'] = $this->normalizer->normalize($object->getIm(), 'json', $context); + $data['mpim'] = $this->normalizer->normalize($object->getMpim(), 'json', $context); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['app_home'] = $this->normalizer->normalize($object->getAppHome(), 'json', $context); - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); - $data['im'] = $this->normalizer->normalize($object->getIm(), 'json', $context); - $data['mpim'] = $this->normalizer->normalize($object->getMpim(), 'json', $context); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoTeamNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoTeamNormalizer.php index 4a096dbf..e1f680cf 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoTeamNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200InfoTeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200InfoTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200InfoTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoTeam(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoTeam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + return $object; } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { - $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); $values = []; - foreach ($data['scopes'] as $value) { + foreach ($object->getScopes() as $value) { $values[] = $value; } - $object->setScopes($values); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); + $data['scopes'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200InfoTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); - $values = []; - foreach ($object->getScopes() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === $type; } - $data['scopes'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200InfoTeam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $object->setResources($this->denormalizer->denormalize($data['resources'], 'JoliCode\\Slack\\Api\\Model\\ObjsResources', 'json', $context)); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $values = []; + foreach ($data['scopes'] as $value) { + $values[] = $value; + } + $object->setScopes($values); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + $values = []; + foreach ($object->getScopes() as $value) { + $values[] = $value; + } + $data['scopes'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponse200Normalizer.php index 2038d593..f4b34335 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('info', $data) && null !== $data['info']) { + $object->setInfo($this->denormalizer->denormalize($data['info'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info', 'json', $context)); + } elseif (\array_key_exists('info', $data) && null === $data['info']) { + $object->setInfo(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('info', $data) && null !== $data['info']) { - $object->setInfo($this->denormalizer->denormalize($data['info'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info', 'json', $context)); - } elseif (\array_key_exists('info', $data) && null === $data['info']) { - $object->setInfo(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['info'] = $this->normalizer->normalize($object->getInfo(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['info'] = $this->normalizer->normalize($object->getInfo(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('info', $data) && null !== $data['info']) { + $object->setInfo($this->denormalizer->denormalize($data['info'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info', 'json', $context)); + } elseif (\array_key_exists('info', $data) && null === $data['info']) { + $object->setInfo(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['info'] = $this->normalizer->normalize($object->getInfo(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsInfoGetResponsedefaultNormalizer.php index a3f96a88..a3ee257c 100644 --- a/generated/Normalizer/AppsPermissionsInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AppsPermissionsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsRequestGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsRequestGetResponse200Normalizer.php index 6c7d0871..d0033ddd 100644 --- a/generated/Normalizer/AppsPermissionsRequestGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsRequestGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsRequestGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsRequestGetResponsedefaultNormalizer.php index ca6087fa..1e347b92 100644 --- a/generated/Normalizer/AppsPermissionsRequestGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsRequestGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AppsPermissionsRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsRequestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200Normalizer.php index b2c2e940..30adf087 100644 --- a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,92 +24,181 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsResourcesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsResourcesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $values = []; + foreach ($data['resources'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem', 'json', $context); + } + $object->setResources($values); + unset($data['resources']); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata', 'json', $context)); + unset($data['response_metadata']); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('resources', $data) && null !== $data['resources']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); $values = []; - foreach ($data['resources'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem', 'json', $context); + foreach ($object->getResources() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setResources($values); - unset($data['resources']); - } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { - $object->setResources(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata', 'json', $context)); - unset($data['response_metadata']); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; + $data['resources'] = $values; + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsResourcesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $values = []; - foreach ($object->getResources() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === $type; } - $data['resources'] = $values; - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' === \get_class($data); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('resources', $data) && null !== $data['resources']) { + $values = []; + foreach ($data['resources'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem', 'json', $context); + } + $object->setResources($values); + unset($data['resources']); + } elseif (\array_key_exists('resources', $data) && null === $data['resources']) { + $object->setResources(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata', 'json', $context)); + unset($data['response_metadata']); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $values = []; + foreach ($object->getResources() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['resources'] = $values; + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer.php b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer.php index 1d225ac0..9cfc173f 100644 --- a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer.php +++ b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,67 +24,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResourcesItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResourcesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === $type; } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResourcesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer.php index 66cbad82..064229f9 100644 --- a/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsResourcesListGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsResourcesListGetResponsedefaultNormalizer.php index c2a29b37..920b9a65 100644 --- a/generated/Normalizer/AppsPermissionsResourcesListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsResourcesListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsResourcesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsResourcesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AppsPermissionsResourcesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsResourcesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsScopesListGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsScopesListGetResponse200Normalizer.php index be7fb830..d87e2149 100644 --- a/generated/Normalizer/AppsPermissionsScopesListGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsScopesListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsScopesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsScopesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $object->setScopes($this->denormalizer->denormalize($data['scopes'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes', 'json', $context)); + unset($data['scopes']); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { - $object->setScopes($this->denormalizer->denormalize($data['scopes'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes', 'json', $context)); - unset($data['scopes']); - } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { - $object->setScopes(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['scopes'] = $this->normalizer->normalize($object->getScopes(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsScopesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['scopes'] = $this->normalizer->normalize($object->getScopes(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('scopes', $data) && null !== $data['scopes']) { + $object->setScopes($this->denormalizer->denormalize($data['scopes'], 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes', 'json', $context)); + unset($data['scopes']); + } elseif (\array_key_exists('scopes', $data) && null === $data['scopes']) { + $object->setScopes(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['scopes'] = $this->normalizer->normalize($object->getScopes(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsScopesListGetResponse200ScopesNormalizer.php b/generated/Normalizer/AppsPermissionsScopesListGetResponse200ScopesNormalizer.php index b5fade86..cfbc2bab 100644 --- a/generated/Normalizer/AppsPermissionsScopesListGetResponse200ScopesNormalizer.php +++ b/generated/Normalizer/AppsPermissionsScopesListGetResponse200ScopesNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,180 +24,357 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsScopesListGetResponse200ScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsScopesListGetResponse200ScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200Scopes(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200Scopes(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { + $values = []; + foreach ($data['app_home'] as $value) { + $values[] = $value; + } + $object->setAppHome($values); + unset($data['app_home']); + } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { + $object->setAppHome(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $values_1 = []; + foreach ($data['channel'] as $value_1) { + $values_1[] = $value_1; + } + $object->setChannel($values_1); + unset($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $values_2 = []; + foreach ($data['group'] as $value_2) { + $values_2[] = $value_2; + } + $object->setGroup($values_2); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('im', $data) && null !== $data['im']) { + $values_3 = []; + foreach ($data['im'] as $value_3) { + $values_3[] = $value_3; + } + $object->setIm($values_3); + unset($data['im']); + } elseif (\array_key_exists('im', $data) && null === $data['im']) { + $object->setIm(null); + } + if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { + $values_4 = []; + foreach ($data['mpim'] as $value_4) { + $values_4[] = $value_4; + } + $object->setMpim($values_4); + unset($data['mpim']); + } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { + $object->setMpim(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $values_5 = []; + foreach ($data['team'] as $value_5) { + $values_5[] = $value_5; + } + $object->setTeam($values_5); + unset($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_6 = []; + foreach ($data['user'] as $value_6) { + $values_6[] = $value_6; + } + $object->setUser($values_6); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + foreach ($data as $key => $value_7) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_7; + } + } + return $object; } - if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { - $values = []; - foreach ($data['app_home'] as $value) { - $values[] = $value; - } - $object->setAppHome($values); - unset($data['app_home']); - } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { - $object->setAppHome(null); - } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $values_1 = []; - foreach ($data['channel'] as $value_1) { - $values_1[] = $value_1; - } - $object->setChannel($values_1); - unset($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $values_2 = []; - foreach ($data['group'] as $value_2) { - $values_2[] = $value_2; - } - $object->setGroup($values_2); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - if (\array_key_exists('im', $data) && null !== $data['im']) { - $values_3 = []; - foreach ($data['im'] as $value_3) { - $values_3[] = $value_3; - } - $object->setIm($values_3); - unset($data['im']); - } elseif (\array_key_exists('im', $data) && null === $data['im']) { - $object->setIm(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('appHome') && null !== $object->getAppHome()) { + $values = []; + foreach ($object->getAppHome() as $value) { + $values[] = $value; + } + $data['app_home'] = $values; + } + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $values_1 = []; + foreach ($object->getChannel() as $value_1) { + $values_1[] = $value_1; + } + $data['channel'] = $values_1; + } + if ($object->isInitialized('group') && null !== $object->getGroup()) { + $values_2 = []; + foreach ($object->getGroup() as $value_2) { + $values_2[] = $value_2; + } + $data['group'] = $values_2; + } + if ($object->isInitialized('im') && null !== $object->getIm()) { + $values_3 = []; + foreach ($object->getIm() as $value_3) { + $values_3[] = $value_3; + } + $data['im'] = $values_3; + } + if ($object->isInitialized('mpim') && null !== $object->getMpim()) { + $values_4 = []; + foreach ($object->getMpim() as $value_4) { + $values_4[] = $value_4; + } + $data['mpim'] = $values_4; + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $values_5 = []; + foreach ($object->getTeam() as $value_5) { + $values_5[] = $value_5; + } + $data['team'] = $values_5; + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_6 = []; + foreach ($object->getUser() as $value_6) { + $values_6[] = $value_6; + } + $data['user'] = $values_6; + } + foreach ($object as $key => $value_7) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_7; + } + } + + return $data; } - if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { - $values_4 = []; - foreach ($data['mpim'] as $value_4) { - $values_4[] = $value_4; - } - $object->setMpim($values_4); - unset($data['mpim']); - } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { - $object->setMpim(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $values_5 = []; - foreach ($data['team'] as $value_5) { - $values_5[] = $value_5; - } - $object->setTeam($values_5); - unset($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class AppsPermissionsScopesListGetResponse200ScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $values_6 = []; - foreach ($data['user'] as $value_6) { - $values_6[] = $value_6; - } - $object->setUser($values_6); - unset($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' === \get_class($data); } - foreach ($data as $key => $value_7) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_7; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponse200Scopes(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_home', $data) && null !== $data['app_home']) { + $values = []; + foreach ($data['app_home'] as $value) { + $values[] = $value; + } + $object->setAppHome($values); + unset($data['app_home']); + } elseif (\array_key_exists('app_home', $data) && null === $data['app_home']) { + $object->setAppHome(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $values_1 = []; + foreach ($data['channel'] as $value_1) { + $values_1[] = $value_1; + } + $object->setChannel($values_1); + unset($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $values_2 = []; + foreach ($data['group'] as $value_2) { + $values_2[] = $value_2; + } + $object->setGroup($values_2); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('im', $data) && null !== $data['im']) { + $values_3 = []; + foreach ($data['im'] as $value_3) { + $values_3[] = $value_3; + } + $object->setIm($values_3); + unset($data['im']); + } elseif (\array_key_exists('im', $data) && null === $data['im']) { + $object->setIm(null); + } + if (\array_key_exists('mpim', $data) && null !== $data['mpim']) { + $values_4 = []; + foreach ($data['mpim'] as $value_4) { + $values_4[] = $value_4; + } + $object->setMpim($values_4); + unset($data['mpim']); + } elseif (\array_key_exists('mpim', $data) && null === $data['mpim']) { + $object->setMpim(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $values_5 = []; + foreach ($data['team'] as $value_5) { + $values_5[] = $value_5; + } + $object->setTeam($values_5); + unset($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $values_6 = []; + foreach ($data['user'] as $value_6) { + $values_6[] = $value_6; + } + $object->setUser($values_6); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + foreach ($data as $key => $value_7) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_7; + } } - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('appHome') && null !== $object->getAppHome()) { - $values = []; - foreach ($object->getAppHome() as $value) { - $values[] = $value; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('appHome') && null !== $object->getAppHome()) { + $values = []; + foreach ($object->getAppHome() as $value) { + $values[] = $value; + } + $data['app_home'] = $values; } - $data['app_home'] = $values; - } - if ($object->isInitialized('channel') && null !== $object->getChannel()) { - $values_1 = []; - foreach ($object->getChannel() as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $values_1 = []; + foreach ($object->getChannel() as $value_1) { + $values_1[] = $value_1; + } + $data['channel'] = $values_1; } - $data['channel'] = $values_1; - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $values_2 = []; - foreach ($object->getGroup() as $value_2) { - $values_2[] = $value_2; + if ($object->isInitialized('group') && null !== $object->getGroup()) { + $values_2 = []; + foreach ($object->getGroup() as $value_2) { + $values_2[] = $value_2; + } + $data['group'] = $values_2; } - $data['group'] = $values_2; - } - if ($object->isInitialized('im') && null !== $object->getIm()) { - $values_3 = []; - foreach ($object->getIm() as $value_3) { - $values_3[] = $value_3; + if ($object->isInitialized('im') && null !== $object->getIm()) { + $values_3 = []; + foreach ($object->getIm() as $value_3) { + $values_3[] = $value_3; + } + $data['im'] = $values_3; } - $data['im'] = $values_3; - } - if ($object->isInitialized('mpim') && null !== $object->getMpim()) { - $values_4 = []; - foreach ($object->getMpim() as $value_4) { - $values_4[] = $value_4; + if ($object->isInitialized('mpim') && null !== $object->getMpim()) { + $values_4 = []; + foreach ($object->getMpim() as $value_4) { + $values_4[] = $value_4; + } + $data['mpim'] = $values_4; } - $data['mpim'] = $values_4; - } - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $values_5 = []; - foreach ($object->getTeam() as $value_5) { - $values_5[] = $value_5; + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $values_5 = []; + foreach ($object->getTeam() as $value_5) { + $values_5[] = $value_5; + } + $data['team'] = $values_5; } - $data['team'] = $values_5; - } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $values_6 = []; - foreach ($object->getUser() as $value_6) { - $values_6[] = $value_6; + if ($object->isInitialized('user') && null !== $object->getUser()) { + $values_6 = []; + foreach ($object->getUser() as $value_6) { + $values_6[] = $value_6; + } + $data['user'] = $values_6; } - $data['user'] = $values_6; - } - foreach ($object as $key => $value_7) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_7; + foreach ($object as $key => $value_7) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_7; + } } - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsScopesListGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsScopesListGetResponsedefaultNormalizer.php index c9e5fea6..4429cf04 100644 --- a/generated/Normalizer/AppsPermissionsScopesListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsScopesListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsScopesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsScopesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AppsPermissionsScopesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsScopesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsUsersListGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsUsersListGetResponse200Normalizer.php index 3950bda1..36b8a80d 100644 --- a/generated/Normalizer/AppsPermissionsUsersListGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsUsersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsUsersListGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsUsersListGetResponsedefaultNormalizer.php index 8e77a98e..7a4d674b 100644 --- a/generated/Normalizer/AppsPermissionsUsersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsUsersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsUsersRequestGetResponse200Normalizer.php b/generated/Normalizer/AppsPermissionsUsersRequestGetResponse200Normalizer.php index c008fe4d..ea24401f 100644 --- a/generated/Normalizer/AppsPermissionsUsersRequestGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsPermissionsUsersRequestGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsUsersRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsUsersRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsUsersRequestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsPermissionsUsersRequestGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsPermissionsUsersRequestGetResponsedefaultNormalizer.php index e2721e84..8bc608f7 100644 --- a/generated/Normalizer/AppsPermissionsUsersRequestGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsPermissionsUsersRequestGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsPermissionsUsersRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsPermissionsUsersRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsPermissionsUsersRequestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsPermissionsUsersRequestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AppsUninstallGetResponse200Normalizer.php b/generated/Normalizer/AppsUninstallGetResponse200Normalizer.php index b31b8e92..9587ca16 100644 --- a/generated/Normalizer/AppsUninstallGetResponse200Normalizer.php +++ b/generated/Normalizer/AppsUninstallGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsUninstallGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsUninstallGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AppsUninstallGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AppsUninstallGetResponsedefaultNormalizer.php b/generated/Normalizer/AppsUninstallGetResponsedefaultNormalizer.php index 7d945535..1219bc4a 100644 --- a/generated/Normalizer/AppsUninstallGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AppsUninstallGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppsUninstallGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AppsUninstallGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AppsUninstallGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AppsUninstallGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AuthRevokeGetResponse200Normalizer.php b/generated/Normalizer/AuthRevokeGetResponse200Normalizer.php index 5c4a6656..00cb9ef2 100644 --- a/generated/Normalizer/AuthRevokeGetResponse200Normalizer.php +++ b/generated/Normalizer/AuthRevokeGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AuthRevokeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AuthRevokeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('revoked', $data) && null !== $data['revoked']) { + $object->setRevoked($data['revoked']); + } elseif (\array_key_exists('revoked', $data) && null === $data['revoked']) { + $object->setRevoked(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('revoked', $data) && null !== $data['revoked']) { - $object->setRevoked($data['revoked']); - } elseif (\array_key_exists('revoked', $data) && null === $data['revoked']) { - $object->setRevoked(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['revoked'] = $object->getRevoked(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class AuthRevokeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['revoked'] = $object->getRevoked(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('revoked', $data) && null !== $data['revoked']) { + $object->setRevoked($data['revoked']); + } elseif (\array_key_exists('revoked', $data) && null === $data['revoked']) { + $object->setRevoked(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['revoked'] = $object->getRevoked(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AuthRevokeGetResponsedefaultNormalizer.php b/generated/Normalizer/AuthRevokeGetResponsedefaultNormalizer.php index 12351a13..ea350a7d 100644 --- a/generated/Normalizer/AuthRevokeGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AuthRevokeGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AuthRevokeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AuthRevokeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AuthRevokeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthRevokeGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/AuthTestGetResponse200Normalizer.php b/generated/Normalizer/AuthTestGetResponse200Normalizer.php index 0b9a2a2b..785c1e01 100644 --- a/generated/Normalizer/AuthTestGetResponse200Normalizer.php +++ b/generated/Normalizer/AuthTestGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,103 +24,203 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AuthTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AuthTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('is_enterprise_install', $data) && null !== $data['is_enterprise_install']) { + $object->setIsEnterpriseInstall($data['is_enterprise_install']); + } elseif (\array_key_exists('is_enterprise_install', $data) && null === $data['is_enterprise_install']) { + $object->setIsEnterpriseInstall(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + return $object; } - if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { - $object->setBotId($data['bot_id']); - } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { - $object->setBotId(null); - } - if (\array_key_exists('is_enterprise_install', $data) && null !== $data['is_enterprise_install']) { - $object->setIsEnterpriseInstall($data['is_enterprise_install']); - } elseif (\array_key_exists('is_enterprise_install', $data) && null === $data['is_enterprise_install']) { - $object->setIsEnterpriseInstall(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); + } + if ($object->isInitialized('isEnterpriseInstall') && null !== $object->getIsEnterpriseInstall()) { + $data['is_enterprise_install'] = $object->getIsEnterpriseInstall(); + } + $data['ok'] = $object->getOk(); + $data['team'] = $object->getTeam(); + $data['team_id'] = $object->getTeamId(); + $data['url'] = $object->getUrl(); + $data['user'] = $object->getUser(); + $data['user_id'] = $object->getUserId(); + + return $data; } - if (\array_key_exists('url', $data) && null !== $data['url']) { - $object->setUrl($data['url']); - } elseif (\array_key_exists('url', $data) && null === $data['url']) { - $object->setUrl(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false]; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + } +} else { + class AuthTestGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === $type; } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('is_enterprise_install', $data) && null !== $data['is_enterprise_install']) { + $object->setIsEnterpriseInstall($data['is_enterprise_install']); + } elseif (\array_key_exists('is_enterprise_install', $data) && null === $data['is_enterprise_install']) { + $object->setIsEnterpriseInstall(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('botId') && null !== $object->getBotId()) { - $data['bot_id'] = $object->getBotId(); + return $object; } - if ($object->isInitialized('isEnterpriseInstall') && null !== $object->getIsEnterpriseInstall()) { - $data['is_enterprise_install'] = $object->getIsEnterpriseInstall(); + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); + } + if ($object->isInitialized('isEnterpriseInstall') && null !== $object->getIsEnterpriseInstall()) { + $data['is_enterprise_install'] = $object->getIsEnterpriseInstall(); + } + $data['ok'] = $object->getOk(); + $data['team'] = $object->getTeam(); + $data['team_id'] = $object->getTeamId(); + $data['url'] = $object->getUrl(); + $data['user'] = $object->getUser(); + $data['user_id'] = $object->getUserId(); + + return $data; } - $data['ok'] = $object->getOk(); - $data['team'] = $object->getTeam(); - $data['team_id'] = $object->getTeamId(); - $data['url'] = $object->getUrl(); - $data['user'] = $object->getUser(); - $data['user_id'] = $object->getUserId(); - - return $data; - } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/AuthTestGetResponsedefaultNormalizer.php b/generated/Normalizer/AuthTestGetResponsedefaultNormalizer.php index 4f0bb285..7f0c02ac 100644 --- a/generated/Normalizer/AuthTestGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/AuthTestGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AuthTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class AuthTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class AuthTestGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\AuthTestGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/BlocksItemNormalizer.php b/generated/Normalizer/BlocksItemNormalizer.php index 3982a6aa..d9becfb4 100644 --- a/generated/Normalizer/BlocksItemNormalizer.php +++ b/generated/Normalizer/BlocksItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class BlocksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class BlocksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\BlocksItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BlocksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + unset($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - unset($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['type'] = $object->getType(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class BlocksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BlocksItem' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BlocksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + unset($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['type'] = $object->getType(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false]; + } } } diff --git a/generated/Normalizer/BotsInfoGetResponse200BotIconsNormalizer.php b/generated/Normalizer/BotsInfoGetResponse200BotIconsNormalizer.php index d4e591f9..fabeadc9 100644 --- a/generated/Normalizer/BotsInfoGetResponse200BotIconsNormalizer.php +++ b/generated/Normalizer/BotsInfoGetResponse200BotIconsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class BotsInfoGetResponse200BotIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class BotsInfoGetResponse200BotIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200BotIcons(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200BotIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { + $object->setImage36($data['image_36']); + } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { + $object->setImage36(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + return $object; } - if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { - $object->setImage36($data['image_36']); - } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { - $object->setImage36(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['image_36'] = $object->getImage36(); + $data['image_48'] = $object->getImage48(); + $data['image_72'] = $object->getImage72(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false]; } - if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { - $object->setImage48($data['image_48']); - } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { - $object->setImage48(null); + } +} else { + class BotsInfoGetResponse200BotIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === $type; } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $object->setImage72($data['image_72']); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200BotIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { + $object->setImage36($data['image_36']); + } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { + $object->setImage36(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['image_36'] = $object->getImage36(); - $data['image_48'] = $object->getImage48(); - $data['image_72'] = $object->getImage72(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['image_36'] = $object->getImage36(); + $data['image_48'] = $object->getImage48(); + $data['image_72'] = $object->getImage72(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false]; + } } } diff --git a/generated/Normalizer/BotsInfoGetResponse200BotNormalizer.php b/generated/Normalizer/BotsInfoGetResponse200BotNormalizer.php index a1b1b9eb..04a37113 100644 --- a/generated/Normalizer/BotsInfoGetResponse200BotNormalizer.php +++ b/generated/Normalizer/BotsInfoGetResponse200BotNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class BotsInfoGetResponse200BotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class BotsInfoGetResponse200BotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200Bot(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200Bot(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + return $object; } - if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { - $object->setAppId($data['app_id']); - } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { - $object->setAppId(null); - } - if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { - $object->setDeleted($data['deleted']); - } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { - $object->setDeleted(null); - } - if (\array_key_exists('icons', $data) && null !== $data['icons']) { - $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons', 'json', $context)); - } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { - $object->setIcons(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['app_id'] = $object->getAppId(); + $data['deleted'] = $object->getDeleted(); + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + $data['updated'] = $object->getUpdated(); + if ($object->isInitialized('userId') && null !== $object->getUserId()) { + $data['user_id'] = $object->getUserId(); + } + + return $data; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false]; } - if (\array_key_exists('updated', $data) && null !== $data['updated']) { - $object->setUpdated($data['updated']); - } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { - $object->setUpdated(null); + } +} else { + class BotsInfoGetResponse200BotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === $type; } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200Bot(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['app_id'] = $object->getAppId(); - $data['deleted'] = $object->getDeleted(); - $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - $data['updated'] = $object->getUpdated(); - if ($object->isInitialized('userId') && null !== $object->getUserId()) { - $data['user_id'] = $object->getUserId(); + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['app_id'] = $object->getAppId(); + $data['deleted'] = $object->getDeleted(); + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + $data['updated'] = $object->getUpdated(); + if ($object->isInitialized('userId') && null !== $object->getUserId()) { + $data['user_id'] = $object->getUserId(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false]; + } } } diff --git a/generated/Normalizer/BotsInfoGetResponse200Normalizer.php b/generated/Normalizer/BotsInfoGetResponse200Normalizer.php index e58c50ed..7b4c3add 100644 --- a/generated/Normalizer/BotsInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/BotsInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class BotsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class BotsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('bot', $data) && null !== $data['bot']) { + $object->setBot($this->denormalizer->denormalize($data['bot'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot', 'json', $context)); + } elseif (\array_key_exists('bot', $data) && null === $data['bot']) { + $object->setBot(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('bot', $data) && null !== $data['bot']) { - $object->setBot($this->denormalizer->denormalize($data['bot'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot', 'json', $context)); - } elseif (\array_key_exists('bot', $data) && null === $data['bot']) { - $object->setBot(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['bot'] = $this->normalizer->normalize($object->getBot(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class BotsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['bot'] = $this->normalizer->normalize($object->getBot(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('bot', $data) && null !== $data['bot']) { + $object->setBot($this->denormalizer->denormalize($data['bot'], 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot', 'json', $context)); + } elseif (\array_key_exists('bot', $data) && null === $data['bot']) { + $object->setBot(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['bot'] = $this->normalizer->normalize($object->getBot(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/BotsInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/BotsInfoGetResponsedefaultNormalizer.php index 96aa20ca..8678a44e 100644 --- a/generated/Normalizer/BotsInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/BotsInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class BotsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class BotsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class BotsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\BotsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsAddPostResponse200Normalizer.php b/generated/Normalizer/CallsAddPostResponse200Normalizer.php index 9eac2242..d4d12c24 100644 --- a/generated/Normalizer/CallsAddPostResponse200Normalizer.php +++ b/generated/Normalizer/CallsAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsAddPostResponsedefaultNormalizer.php b/generated/Normalizer/CallsAddPostResponsedefaultNormalizer.php index ce6354a3..27a6ca34 100644 --- a/generated/Normalizer/CallsAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsEndPostResponse200Normalizer.php b/generated/Normalizer/CallsEndPostResponse200Normalizer.php index 34e9915a..89ec61f4 100644 --- a/generated/Normalizer/CallsEndPostResponse200Normalizer.php +++ b/generated/Normalizer/CallsEndPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsEndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsEndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsEndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsEndPostResponsedefaultNormalizer.php b/generated/Normalizer/CallsEndPostResponsedefaultNormalizer.php index ddcca14a..682ca918 100644 --- a/generated/Normalizer/CallsEndPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsEndPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsEndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsEndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsEndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsEndPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsInfoGetResponse200Normalizer.php b/generated/Normalizer/CallsInfoGetResponse200Normalizer.php index 8759e4b8..e8c9739a 100644 --- a/generated/Normalizer/CallsInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/CallsInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/CallsInfoGetResponsedefaultNormalizer.php index c9fbf56f..a9db2a04 100644 --- a/generated/Normalizer/CallsInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsParticipantsAddPostResponse200Normalizer.php b/generated/Normalizer/CallsParticipantsAddPostResponse200Normalizer.php index 934c0c4d..dee53af3 100644 --- a/generated/Normalizer/CallsParticipantsAddPostResponse200Normalizer.php +++ b/generated/Normalizer/CallsParticipantsAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsParticipantsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsParticipantsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsParticipantsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsParticipantsAddPostResponsedefaultNormalizer.php b/generated/Normalizer/CallsParticipantsAddPostResponsedefaultNormalizer.php index 769b702a..4e8587ac 100644 --- a/generated/Normalizer/CallsParticipantsAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsParticipantsAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsParticipantsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsParticipantsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsParticipantsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsParticipantsRemovePostResponse200Normalizer.php b/generated/Normalizer/CallsParticipantsRemovePostResponse200Normalizer.php index fa64c82f..afed6a2d 100644 --- a/generated/Normalizer/CallsParticipantsRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/CallsParticipantsRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsParticipantsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsParticipantsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsParticipantsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsParticipantsRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/CallsParticipantsRemovePostResponsedefaultNormalizer.php index cf948169..52e80863 100644 --- a/generated/Normalizer/CallsParticipantsRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsParticipantsRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsParticipantsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsParticipantsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsParticipantsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsParticipantsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/CallsUpdatePostResponse200Normalizer.php b/generated/Normalizer/CallsUpdatePostResponse200Normalizer.php index 21a4cf03..c83254ce 100644 --- a/generated/Normalizer/CallsUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/CallsUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/CallsUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/CallsUpdatePostResponsedefaultNormalizer.php index 24957c7e..3846fff8 100644 --- a/generated/Normalizer/CallsUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/CallsUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CallsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class CallsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class CallsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\CallsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatDeletePostResponse200Normalizer.php b/generated/Normalizer/ChatDeletePostResponse200Normalizer.php index 01d5fd59..be3b12fa 100644 --- a/generated/Normalizer/ChatDeletePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatDeletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['ok'] = $object->getOk(); + $data['ts'] = $object->getTs(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === $type; } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['ok'] = $object->getOk(); - $data['ts'] = $object->getTs(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['ok'] = $object->getOk(); + $data['ts'] = $object->getTs(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatDeletePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatDeletePostResponsedefaultNormalizer.php index 38314eaf..b8536fa2 100644 --- a/generated/Normalizer/ChatDeletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatDeletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatDeleteScheduledMessagePostResponse200Normalizer.php b/generated/Normalizer/ChatDeleteScheduledMessagePostResponse200Normalizer.php index 55fb2665..85e10aa0 100644 --- a/generated/Normalizer/ChatDeleteScheduledMessagePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatDeleteScheduledMessagePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatDeleteScheduledMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatDeleteScheduledMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatDeleteScheduledMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatDeleteScheduledMessagePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatDeleteScheduledMessagePostResponsedefaultNormalizer.php index a01522b8..54b9e21f 100644 --- a/generated/Normalizer/ChatDeleteScheduledMessagePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatDeleteScheduledMessagePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatDeleteScheduledMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatDeleteScheduledMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatDeleteScheduledMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatDeleteScheduledMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatGetPermalinkGetResponse200Normalizer.php b/generated/Normalizer/ChatGetPermalinkGetResponse200Normalizer.php index 7a99a19f..b234e0bc 100644 --- a/generated/Normalizer/ChatGetPermalinkGetResponse200Normalizer.php +++ b/generated/Normalizer/ChatGetPermalinkGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatGetPermalinkGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatGetPermalinkGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['ok'] = $object->getOk(); + $data['permalink'] = $object->getPermalink(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatGetPermalinkGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === $type; } - if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { - $object->setPermalink($data['permalink']); - } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { - $object->setPermalink(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['ok'] = $object->getOk(); - $data['permalink'] = $object->getPermalink(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['ok'] = $object->getOk(); + $data['permalink'] = $object->getPermalink(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatGetPermalinkGetResponsedefaultNormalizer.php b/generated/Normalizer/ChatGetPermalinkGetResponsedefaultNormalizer.php index 89d7555e..45464e04 100644 --- a/generated/Normalizer/ChatGetPermalinkGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatGetPermalinkGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatGetPermalinkGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatGetPermalinkGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatGetPermalinkGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatGetPermalinkGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatMeMessagePostResponse200Normalizer.php b/generated/Normalizer/ChatMeMessagePostResponse200Normalizer.php index 35537096..7f977cc5 100644 --- a/generated/Normalizer/ChatMeMessagePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatMeMessagePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,73 +24,143 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatMeMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatMeMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('ts') && null !== $object->getTs()) { + $data['ts'] = $object->getTs(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatMeMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('channel') && null !== $object->getChannel()) { - $data['channel'] = $object->getChannel(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === $type; } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('ts') && null !== $object->getTs()) { - $data['ts'] = $object->getTs(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('ts') && null !== $object->getTs()) { + $data['ts'] = $object->getTs(); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatMeMessagePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatMeMessagePostResponsedefaultNormalizer.php index f403b543..9ae045e0 100644 --- a/generated/Normalizer/ChatMeMessagePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatMeMessagePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatMeMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatMeMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatMeMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatMeMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatPostEphemeralPostResponse200Normalizer.php b/generated/Normalizer/ChatPostEphemeralPostResponse200Normalizer.php index 6a2d3cf9..fa242c41 100644 --- a/generated/Normalizer/ChatPostEphemeralPostResponse200Normalizer.php +++ b/generated/Normalizer/ChatPostEphemeralPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatPostEphemeralPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatPostEphemeralPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('message_ts', $data) && null !== $data['message_ts']) { + $object->setMessageTs($data['message_ts']); + } elseif (\array_key_exists('message_ts', $data) && null === $data['message_ts']) { + $object->setMessageTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('message_ts', $data) && null !== $data['message_ts']) { - $object->setMessageTs($data['message_ts']); - } elseif (\array_key_exists('message_ts', $data) && null === $data['message_ts']) { - $object->setMessageTs(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['message_ts'] = $object->getMessageTs(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatPostEphemeralPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['message_ts'] = $object->getMessageTs(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('message_ts', $data) && null !== $data['message_ts']) { + $object->setMessageTs($data['message_ts']); + } elseif (\array_key_exists('message_ts', $data) && null === $data['message_ts']) { + $object->setMessageTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['message_ts'] = $object->getMessageTs(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatPostEphemeralPostResponsedefaultNormalizer.php b/generated/Normalizer/ChatPostEphemeralPostResponsedefaultNormalizer.php index 59a34368..5d495b15 100644 --- a/generated/Normalizer/ChatPostEphemeralPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatPostEphemeralPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatPostEphemeralPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatPostEphemeralPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatPostEphemeralPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostEphemeralPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatPostMessagePostResponse200Normalizer.php b/generated/Normalizer/ChatPostMessagePostResponse200Normalizer.php index 273c528e..93324d8a 100644 --- a/generated/Normalizer/ChatPostMessagePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatPostMessagePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatPostMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatPostMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); + $data['ts'] = $object->getTs(); + + return $data; } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatPostMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === $type; } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); - $data['ok'] = $object->getOk(); - $data['ts'] = $object->getTs(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); + $data['ts'] = $object->getTs(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatPostMessagePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatPostMessagePostResponsedefaultNormalizer.php index 4de28e0c..106d1845 100644 --- a/generated/Normalizer/ChatPostMessagePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatPostMessagePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatPostMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatPostMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatPostMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatPostMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer.php b/generated/Normalizer/ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer.php index 5cce1ac1..5cc8f58a 100644 --- a/generated/Normalizer/ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer.php +++ b/generated/Normalizer/ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200MessageAttachmentsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200MessageAttachmentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { + $object->setFallback($data['fallback']); + } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { + $object->setFallback(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + return $object; } - if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { - $object->setFallback($data['fallback']); - } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { - $object->setFallback(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('fallback') && null !== $object->getFallback()) { + $data['fallback'] = $object->getFallback(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('fallback') && null !== $object->getFallback()) { - $data['fallback'] = $object->getFallback(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === $type; } - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' === \get_class($data); } - if ($object->isInitialized('text') && null !== $object->getText()) { - $data['text'] = $object->getText(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200MessageAttachmentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { + $object->setFallback($data['fallback']); + } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { + $object->setFallback(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('fallback') && null !== $object->getFallback()) { + $data['fallback'] = $object->getFallback(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduleMessagePostResponse200MessageNormalizer.php b/generated/Normalizer/ChatScheduleMessagePostResponse200MessageNormalizer.php index 21a1c0d3..ee9dab53 100644 --- a/generated/Normalizer/ChatScheduleMessagePostResponse200MessageNormalizer.php +++ b/generated/Normalizer/ChatScheduleMessagePostResponse200MessageNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,121 +24,239 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduleMessagePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduleMessagePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200Message(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200Message(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem', 'json', $context); + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { + $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); + } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { + $object->setBotProfile(null); + } + if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { + $object->setSubtype($data['subtype']); + } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { + $object->setSubtype(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + return $object; } - if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { - $values = []; - foreach ($data['attachments'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem', 'json', $context); - } - $object->setAttachments($values); - } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { - $object->setAttachments(null); - } - if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { - $object->setBotId($data['bot_id']); - } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { - $object->setBotId(null); - } - if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { - $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); - } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { - $object->setBotProfile(null); - } - if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { - $object->setSubtype($data['subtype']); - } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { - $object->setSubtype(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $object->setUsername($data['username']); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['attachments'] = $values; + } + $data['bot_id'] = $object->getBotId(); + if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { + $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); + } + if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { + $data['subtype'] = $object->getSubtype(); + } + $data['team'] = $object->getTeam(); + $data['text'] = $object->getText(); + $data['type'] = $object->getType(); + $data['user'] = $object->getUser(); + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatScheduleMessagePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { - $values = []; - foreach ($object->getAttachments() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['attachments'] = $values; - } - $data['bot_id'] = $object->getBotId(); - if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { - $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === $type; } - if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { - $data['subtype'] = $object->getSubtype(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' === \get_class($data); } - $data['team'] = $object->getTeam(); - $data['text'] = $object->getText(); - $data['type'] = $object->getType(); - $data['user'] = $object->getUser(); - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200Message(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem', 'json', $context); + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { + $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); + } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { + $object->setBotProfile(null); + } + if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { + $object->setSubtype($data['subtype']); + } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { + $object->setSubtype(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['attachments'] = $values; + } + $data['bot_id'] = $object->getBotId(); + if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { + $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); + } + if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { + $data['subtype'] = $object->getSubtype(); + } + $data['team'] = $object->getTeam(); + $data['text'] = $object->getText(); + $data['type'] = $object->getType(); + $data['user'] = $object->getUser(); + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduleMessagePostResponse200Normalizer.php b/generated/Normalizer/ChatScheduleMessagePostResponse200Normalizer.php index e703ccfc..908dabda 100644 --- a/generated/Normalizer/ChatScheduleMessagePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatScheduleMessagePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,93 +24,183 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduleMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduleMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { + $value = $data['post_at']; + if (\is_int($data['post_at'])) { + $value = $data['post_at']; + } elseif (\is_string($data['post_at'])) { + $value = $data['post_at']; + } + $object->setPostAt($value); + } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { + $object->setPostAt(null); + } + if (\array_key_exists('scheduled_message_id', $data) && null !== $data['scheduled_message_id']) { + $object->setScheduledMessageId($data['scheduled_message_id']); + } elseif (\array_key_exists('scheduled_message_id', $data) && null === $data['scheduled_message_id']) { + $object->setScheduledMessageId(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); + $value = $object->getPostAt(); + if (\is_int($object->getPostAt())) { + $value = $object->getPostAt(); + } elseif (\is_string($object->getPostAt())) { + $value = $object->getPostAt(); + } + $data['post_at'] = $value; + $data['scheduled_message_id'] = $object->getScheduledMessageId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false]; } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); + } +} else { + class ChatScheduleMessagePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === $type; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' === \get_class($data); } - if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { - $value = $data['post_at']; - if (\is_int($data['post_at'])) { - $value = $data['post_at']; - } elseif (\is_string($data['post_at'])) { + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { $value = $data['post_at']; + if (\is_int($data['post_at'])) { + $value = $data['post_at']; + } elseif (\is_string($data['post_at'])) { + $value = $data['post_at']; + } + $object->setPostAt($value); + } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { + $object->setPostAt(null); + } + if (\array_key_exists('scheduled_message_id', $data) && null !== $data['scheduled_message_id']) { + $object->setScheduledMessageId($data['scheduled_message_id']); + } elseif (\array_key_exists('scheduled_message_id', $data) && null === $data['scheduled_message_id']) { + $object->setScheduledMessageId(null); } - $object->setPostAt($value); - } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { - $object->setPostAt(null); - } - if (\array_key_exists('scheduled_message_id', $data) && null !== $data['scheduled_message_id']) { - $object->setScheduledMessageId($data['scheduled_message_id']); - } elseif (\array_key_exists('scheduled_message_id', $data) && null === $data['scheduled_message_id']) { - $object->setScheduledMessageId(null); - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); - $data['ok'] = $object->getOk(); - $value = $object->getPostAt(); - if (\is_int($object->getPostAt())) { - $value = $object->getPostAt(); - } elseif (\is_string($object->getPostAt())) { + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); $value = $object->getPostAt(); - } - $data['post_at'] = $value; - $data['scheduled_message_id'] = $object->getScheduledMessageId(); + if (\is_int($object->getPostAt())) { + $value = $object->getPostAt(); + } elseif (\is_string($object->getPostAt())) { + $value = $object->getPostAt(); + } + $data['post_at'] = $value; + $data['scheduled_message_id'] = $object->getScheduledMessageId(); - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduleMessagePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatScheduleMessagePostResponsedefaultNormalizer.php index 3a6647e2..278161bd 100644 --- a/generated/Normalizer/ChatScheduleMessagePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatScheduleMessagePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduleMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduleMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatScheduleMessagePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduleMessagePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduledMessagesListGetResponse200Normalizer.php b/generated/Normalizer/ChatScheduledMessagesListGetResponse200Normalizer.php index a9114d76..d5a2f8c3 100644 --- a/generated/Normalizer/ChatScheduledMessagesListGetResponse200Normalizer.php +++ b/generated/Normalizer/ChatScheduledMessagesListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduledMessagesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduledMessagesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('scheduled_messages', $data) && null !== $data['scheduled_messages']) { + $values = []; + foreach ($data['scheduled_messages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem', 'json', $context); + } + $object->setScheduledMessages($values); + } elseif (\array_key_exists('scheduled_messages', $data) && null === $data['scheduled_messages']) { + $object->setScheduledMessages(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); - } - if (\array_key_exists('scheduled_messages', $data) && null !== $data['scheduled_messages']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); $values = []; - foreach ($data['scheduled_messages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem', 'json', $context); + foreach ($object->getScheduledMessages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setScheduledMessages($values); - } elseif (\array_key_exists('scheduled_messages', $data) && null === $data['scheduled_messages']) { - $object->setScheduledMessages(null); + $data['scheduled_messages'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatScheduledMessagesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); - $values = []; - foreach ($object->getScheduledMessages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === $type; } - $data['scheduled_messages'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('scheduled_messages', $data) && null !== $data['scheduled_messages']) { + $values = []; + foreach ($data['scheduled_messages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem', 'json', $context); + } + $object->setScheduledMessages($values); + } elseif (\array_key_exists('scheduled_messages', $data) && null === $data['scheduled_messages']) { + $object->setScheduledMessages(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + $values = []; + foreach ($object->getScheduledMessages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['scheduled_messages'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer.php index 1f10f829..c039b444 100644 --- a/generated/Normalizer/ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer.php b/generated/Normalizer/ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer.php index 8400d37e..20b0245a 100644 --- a/generated/Normalizer/ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer.php +++ b/generated/Normalizer/ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { + $object->setChannelId($data['channel_id']); + } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { + $object->setChannelId(null); + } + if (\array_key_exists('date_created', $data) && null !== $data['date_created']) { + $object->setDateCreated($data['date_created']); + } elseif (\array_key_exists('date_created', $data) && null === $data['date_created']) { + $object->setDateCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { + $value = $data['post_at']; + if (\is_int($data['post_at'])) { + $value = $data['post_at']; + } elseif (\is_string($data['post_at'])) { + $value = $data['post_at']; + } + $object->setPostAt($value); + } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { + $object->setPostAt(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + return $object; } - if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { - $object->setChannelId($data['channel_id']); - } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { - $object->setChannelId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel_id'] = $object->getChannelId(); + $data['date_created'] = $object->getDateCreated(); + $data['id'] = $object->getId(); + $value = $object->getPostAt(); + if (\is_int($object->getPostAt())) { + $value = $object->getPostAt(); + } elseif (\is_string($object->getPostAt())) { + $value = $object->getPostAt(); + } + $data['post_at'] = $value; + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + + return $data; } - if (\array_key_exists('date_created', $data) && null !== $data['date_created']) { - $object->setDateCreated($data['date_created']); - } elseif (\array_key_exists('date_created', $data) && null === $data['date_created']) { - $object->setDateCreated(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false]; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + } +} else { + class ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === $type; } - if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { - $value = $data['post_at']; - if (\is_int($data['post_at'])) { - $value = $data['post_at']; - } elseif (\is_string($data['post_at'])) { + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_id', $data) && null !== $data['channel_id']) { + $object->setChannelId($data['channel_id']); + } elseif (\array_key_exists('channel_id', $data) && null === $data['channel_id']) { + $object->setChannelId(null); + } + if (\array_key_exists('date_created', $data) && null !== $data['date_created']) { + $object->setDateCreated($data['date_created']); + } elseif (\array_key_exists('date_created', $data) && null === $data['date_created']) { + $object->setDateCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('post_at', $data) && null !== $data['post_at']) { $value = $data['post_at']; + if (\is_int($data['post_at'])) { + $value = $data['post_at']; + } elseif (\is_string($data['post_at'])) { + $value = $data['post_at']; + } + $object->setPostAt($value); + } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { + $object->setPostAt(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); } - $object->setPostAt($value); - } elseif (\array_key_exists('post_at', $data) && null === $data['post_at']) { - $object->setPostAt(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel_id'] = $object->getChannelId(); - $data['date_created'] = $object->getDateCreated(); - $data['id'] = $object->getId(); - $value = $object->getPostAt(); - if (\is_int($object->getPostAt())) { + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel_id'] = $object->getChannelId(); + $data['date_created'] = $object->getDateCreated(); + $data['id'] = $object->getId(); $value = $object->getPostAt(); - } elseif (\is_string($object->getPostAt())) { - $value = $object->getPostAt(); - } - $data['post_at'] = $value; - if ($object->isInitialized('text') && null !== $object->getText()) { - $data['text'] = $object->getText(); - } + if (\is_int($object->getPostAt())) { + $value = $object->getPostAt(); + } elseif (\is_string($object->getPostAt())) { + $value = $object->getPostAt(); + } + $data['post_at'] = $value; + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false]; + } } } diff --git a/generated/Normalizer/ChatScheduledMessagesListGetResponsedefaultNormalizer.php b/generated/Normalizer/ChatScheduledMessagesListGetResponsedefaultNormalizer.php index b00ef91a..dd88dd29 100644 --- a/generated/Normalizer/ChatScheduledMessagesListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatScheduledMessagesListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatScheduledMessagesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatScheduledMessagesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatScheduledMessagesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatScheduledMessagesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatUnfurlPostResponse200Normalizer.php b/generated/Normalizer/ChatUnfurlPostResponse200Normalizer.php index 460547a5..27da228c 100644 --- a/generated/Normalizer/ChatUnfurlPostResponse200Normalizer.php +++ b/generated/Normalizer/ChatUnfurlPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatUnfurlPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatUnfurlPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ChatUnfurlPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatUnfurlPostResponsedefaultNormalizer.php b/generated/Normalizer/ChatUnfurlPostResponsedefaultNormalizer.php index 27667539..d24eb48a 100644 --- a/generated/Normalizer/ChatUnfurlPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatUnfurlPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatUnfurlPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatUnfurlPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatUnfurlPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUnfurlPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ChatUpdatePostResponse200MessageNormalizer.php b/generated/Normalizer/ChatUpdatePostResponse200MessageNormalizer.php index cd78a96d..e30d30ce 100644 --- a/generated/Normalizer/ChatUpdatePostResponse200MessageNormalizer.php +++ b/generated/Normalizer/ChatUpdatePostResponse200MessageNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,81 +24,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatUpdatePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatUpdatePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200Message(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200Message(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $value; + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { + $object->setBlocks($data['blocks']); + } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { + $object->setBlocks(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + return $object; } - if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { - $values = []; - foreach ($data['attachments'] as $value) { - $values[] = $value; - } - $object->setAttachments($values); - } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { - $object->setAttachments(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $value; + } + $data['attachments'] = $values; + } + if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { + $data['blocks'] = $object->getBlocks(); + } + $data['text'] = $object->getText(); + + return $data; } - if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { - $object->setBlocks($data['blocks']); - } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { - $object->setBlocks(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false]; } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); + } +} else { + class ChatUpdatePostResponse200MessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { - $values = []; - foreach ($object->getAttachments() as $value) { - $values[] = $value; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['attachments'] = $values; - } - if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { - $data['blocks'] = $object->getBlocks(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200Message(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $value; + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { + $object->setBlocks($data['blocks']); + } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { + $object->setBlocks(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + + return $object; } - $data['text'] = $object->getText(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $value; + } + $data['attachments'] = $values; + } + if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { + $data['blocks'] = $object->getBlocks(); + } + $data['text'] = $object->getText(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false]; + } } } diff --git a/generated/Normalizer/ChatUpdatePostResponse200Normalizer.php b/generated/Normalizer/ChatUpdatePostResponse200Normalizer.php index b6db89b7..32aa1c87 100644 --- a/generated/Normalizer/ChatUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/ChatUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,81 +24,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); + $data['text'] = $object->getText(); + $data['ts'] = $object->getTs(); + + return $data; } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === $type; } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' === \get_class($data); } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['ok'] = $object->getOk(); + $data['text'] = $object->getText(); + $data['ts'] = $object->getTs(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); - $data['ok'] = $object->getOk(); - $data['text'] = $object->getText(); - $data['ts'] = $object->getTs(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ChatUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/ChatUpdatePostResponsedefaultNormalizer.php index 68d9b476..448cb9f5 100644 --- a/generated/Normalizer/ChatUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ChatUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ChatUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ChatUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ChatUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ChatUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsArchivePostResponse200Normalizer.php b/generated/Normalizer/ConversationsArchivePostResponse200Normalizer.php index a2d21394..fe5d3b13 100644 --- a/generated/Normalizer/ConversationsArchivePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsArchivePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsArchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsArchivePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsArchivePostResponsedefaultNormalizer.php index aeb144f5..4145d373 100644 --- a/generated/Normalizer/ConversationsArchivePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsArchivePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsArchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsArchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsClosePostResponse200Normalizer.php b/generated/Normalizer/ConversationsClosePostResponse200Normalizer.php index eb1729a5..8ccae323 100644 --- a/generated/Normalizer/ConversationsClosePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsClosePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,73 +24,143 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsClosePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsClosePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('already_closed', $data) && null !== $data['already_closed']) { + $object->setAlreadyClosed($data['already_closed']); + } elseif (\array_key_exists('already_closed', $data) && null === $data['already_closed']) { + $object->setAlreadyClosed(null); + } + if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { + $object->setNoOp($data['no_op']); + } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { + $object->setNoOp(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('already_closed', $data) && null !== $data['already_closed']) { - $object->setAlreadyClosed($data['already_closed']); - } elseif (\array_key_exists('already_closed', $data) && null === $data['already_closed']) { - $object->setAlreadyClosed(null); - } - if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { - $object->setNoOp($data['no_op']); - } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { - $object->setNoOp(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('alreadyClosed') && null !== $object->getAlreadyClosed()) { + $data['already_closed'] = $object->getAlreadyClosed(); + } + if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { + $data['no_op'] = $object->getNoOp(); + } + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsClosePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('alreadyClosed') && null !== $object->getAlreadyClosed()) { - $data['already_closed'] = $object->getAlreadyClosed(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === $type; } - if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { - $data['no_op'] = $object->getNoOp(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' === \get_class($data); } - $data['ok'] = $object->getOk(); - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('already_closed', $data) && null !== $data['already_closed']) { + $object->setAlreadyClosed($data['already_closed']); + } elseif (\array_key_exists('already_closed', $data) && null === $data['already_closed']) { + $object->setAlreadyClosed(null); + } + if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { + $object->setNoOp($data['no_op']); + } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { + $object->setNoOp(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('alreadyClosed') && null !== $object->getAlreadyClosed()) { + $data['already_closed'] = $object->getAlreadyClosed(); + } + if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { + $data['no_op'] = $object->getNoOp(); + } + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsClosePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsClosePostResponsedefaultNormalizer.php index 41f13e6b..9bdf16ed 100644 --- a/generated/Normalizer/ConversationsClosePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsClosePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsClosePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsClosePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsClosePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsClosePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsCreatePostResponse200Normalizer.php b/generated/Normalizer/ConversationsCreatePostResponse200Normalizer.php index 8349ec31..23364f05 100644 --- a/generated/Normalizer/ConversationsCreatePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsCreatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsCreatePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsCreatePostResponsedefaultNormalizer.php index 2bf6bd98..934fd6d6 100644 --- a/generated/Normalizer/ConversationsCreatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsCreatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('detail', $data) && null !== $data['detail']) { + $object->setDetail($data['detail']); + } elseif (\array_key_exists('detail', $data) && null === $data['detail']) { + $object->setDetail(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('detail', $data) && null !== $data['detail']) { - $object->setDetail($data['detail']); - } elseif (\array_key_exists('detail', $data) && null === $data['detail']) { - $object->setDetail(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('detail') && null !== $object->getDetail()) { + $data['detail'] = $object->getDetail(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('detail', $data) && null !== $data['detail']) { + $object->setDetail($data['detail']); + } elseif (\array_key_exists('detail', $data) && null === $data['detail']) { + $object->setDetail(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('detail') && null !== $object->getDetail()) { + $data['detail'] = $object->getDetail(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsHistoryGetResponse200Normalizer.php b/generated/Normalizer/ConversationsHistoryGetResponse200Normalizer.php index 721e5994..7e3ec3fe 100644 --- a/generated/Normalizer/ConversationsHistoryGetResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsHistoryGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,103 +24,203 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsHistoryGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsHistoryGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_actions_count', $data) && null !== $data['channel_actions_count']) { + $object->setChannelActionsCount($data['channel_actions_count']); + } elseif (\array_key_exists('channel_actions_count', $data) && null === $data['channel_actions_count']) { + $object->setChannelActionsCount(null); + } + if (\array_key_exists('channel_actions_ts', $data) && null !== $data['channel_actions_ts']) { + $object->setChannelActionsTs($data['channel_actions_ts']); + } elseif (\array_key_exists('channel_actions_ts', $data) && null === $data['channel_actions_ts']) { + $object->setChannelActionsTs(null); + } + if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { + $object->setHasMore($data['has_more']); + } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { + $object->setHasMore(null); + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context); + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { + $object->setPinCount($data['pin_count']); + } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { + $object->setPinCount(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('channel_actions_count', $data) && null !== $data['channel_actions_count']) { - $object->setChannelActionsCount($data['channel_actions_count']); - } elseif (\array_key_exists('channel_actions_count', $data) && null === $data['channel_actions_count']) { - $object->setChannelActionsCount(null); - } - if (\array_key_exists('channel_actions_ts', $data) && null !== $data['channel_actions_ts']) { - $object->setChannelActionsTs($data['channel_actions_ts']); - } elseif (\array_key_exists('channel_actions_ts', $data) && null === $data['channel_actions_ts']) { - $object->setChannelActionsTs(null); - } - if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { - $object->setHasMore($data['has_more']); - } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { - $object->setHasMore(null); - } - if (\array_key_exists('messages', $data) && null !== $data['messages']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel_actions_count'] = $object->getChannelActionsCount(); + $data['channel_actions_ts'] = $object->getChannelActionsTs(); + $data['has_more'] = $object->getHasMore(); $values = []; - foreach ($data['messages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context); + foreach ($object->getMessages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setMessages($values); - } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { - $object->setMessages(null); + $data['messages'] = $values; + $data['ok'] = $object->getOk(); + $data['pin_count'] = $object->getPinCount(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false]; } - if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { - $object->setPinCount($data['pin_count']); - } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { - $object->setPinCount(null); + } +} else { + class ConversationsHistoryGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === $type; } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel_actions_count', $data) && null !== $data['channel_actions_count']) { + $object->setChannelActionsCount($data['channel_actions_count']); + } elseif (\array_key_exists('channel_actions_count', $data) && null === $data['channel_actions_count']) { + $object->setChannelActionsCount(null); + } + if (\array_key_exists('channel_actions_ts', $data) && null !== $data['channel_actions_ts']) { + $object->setChannelActionsTs($data['channel_actions_ts']); + } elseif (\array_key_exists('channel_actions_ts', $data) && null === $data['channel_actions_ts']) { + $object->setChannelActionsTs(null); + } + if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { + $object->setHasMore($data['has_more']); + } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { + $object->setHasMore(null); + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context); + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { + $object->setPinCount($data['pin_count']); + } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { + $object->setPinCount(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel_actions_count'] = $object->getChannelActionsCount(); - $data['channel_actions_ts'] = $object->getChannelActionsTs(); - $data['has_more'] = $object->getHasMore(); - $values = []; - foreach ($object->getMessages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['messages'] = $values; - $data['ok'] = $object->getOk(); - $data['pin_count'] = $object->getPinCount(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel_actions_count'] = $object->getChannelActionsCount(); + $data['channel_actions_ts'] = $object->getChannelActionsTs(); + $data['has_more'] = $object->getHasMore(); + $values = []; + foreach ($object->getMessages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['messages'] = $values; + $data['ok'] = $object->getOk(); + $data['pin_count'] = $object->getPinCount(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsHistoryGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ConversationsHistoryGetResponse200ResponseMetadataNormalizer.php index 685d1358..55615069 100644 --- a/generated/Normalizer/ConversationsHistoryGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ConversationsHistoryGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsHistoryGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsHistoryGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsHistoryGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ConversationsHistoryGetResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsHistoryGetResponsedefaultNormalizer.php index 8690cbf0..41801725 100644 --- a/generated/Normalizer/ConversationsHistoryGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsHistoryGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsHistoryGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsHistoryGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsHistoryGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsHistoryGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsInfoGetResponse200Normalizer.php b/generated/Normalizer/ConversationsInfoGetResponse200Normalizer.php index 3f49d204..35972725 100644 --- a/generated/Normalizer/ConversationsInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsInfoGetResponsedefaultNormalizer.php index b54357f7..3378a0d7 100644 --- a/generated/Normalizer/ConversationsInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsInvitePostResponse200Normalizer.php b/generated/Normalizer/ConversationsInvitePostResponse200Normalizer.php index 397b6919..940d637e 100644 --- a/generated/Normalizer/ConversationsInvitePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsInvitePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsInvitePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsInvitePostResponsedefaultErrorsItemNormalizer.php b/generated/Normalizer/ConversationsInvitePostResponsedefaultErrorsItemNormalizer.php index 940761ae..528c0c85 100644 --- a/generated/Normalizer/ConversationsInvitePostResponsedefaultErrorsItemNormalizer.php +++ b/generated/Normalizer/ConversationsInvitePostResponsedefaultErrorsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsInvitePostResponsedefaultErrorsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsInvitePostResponsedefaultErrorsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefaultErrorsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefaultErrorsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false]; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + } +} else { + class ConversationsInvitePostResponsedefaultErrorsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefaultErrorsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false]; + } } } diff --git a/generated/Normalizer/ConversationsInvitePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsInvitePostResponsedefaultNormalizer.php index ecfc811b..221d50db 100644 --- a/generated/Normalizer/ConversationsInvitePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsInvitePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,105 +24,207 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('errors', $data) && null !== $data['errors']) { + $values = []; + foreach ($data['errors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem', 'json', $context); + } + $object->setErrors($values); + } elseif (\array_key_exists('errors', $data) && null === $data['errors']) { + $object->setErrors(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('errors', $data) && null !== $data['errors']) { - $values = []; - foreach ($data['errors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem', 'json', $context); - } - $object->setErrors($values); - } elseif (\array_key_exists('errors', $data) && null === $data['errors']) { - $object->setErrors(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('errors') && null !== $object->getErrors()) { + $values = []; + foreach ($object->getErrors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['errors'] = $values; + } + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsInvitePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === $type; } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' === \get_class($data); } - if ($object->isInitialized('errors') && null !== $object->getErrors()) { - $values = []; - foreach ($object->getErrors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['errors'] = $values; - } - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); - } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsInvitePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('errors', $data) && null !== $data['errors']) { + $values = []; + foreach ($data['errors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem', 'json', $context); + } + $object->setErrors($values); + } elseif (\array_key_exists('errors', $data) && null === $data['errors']) { + $object->setErrors(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('errors') && null !== $object->getErrors()) { + $values = []; + foreach ($object->getErrors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['errors'] = $values; + } + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsJoinPostResponse200Normalizer.php b/generated/Normalizer/ConversationsJoinPostResponse200Normalizer.php index 45485402..0e4ec9ce 100644 --- a/generated/Normalizer/ConversationsJoinPostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsJoinPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsJoinPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsJoinPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('warning', $data) && null !== $data['warning']) { + $object->setWarning($data['warning']); + } elseif (\array_key_exists('warning', $data) && null === $data['warning']) { + $object->setWarning(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['warning'] = $object->getWarning(); + } + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false]; } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + } +} else { + class ConversationsJoinPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === $type; } - if (\array_key_exists('warning', $data) && null !== $data['warning']) { - $object->setWarning($data['warning']); - } elseif (\array_key_exists('warning', $data) && null === $data['warning']) { - $object->setWarning(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + if (\array_key_exists('warning', $data) && null !== $data['warning']) { + $object->setWarning($data['warning']); + } elseif (\array_key_exists('warning', $data) && null === $data['warning']) { + $object->setWarning(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); - } - if ($object->isInitialized('warning') && null !== $object->getWarning()) { - $data['warning'] = $object->getWarning(); + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['warning'] = $object->getWarning(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsJoinPostResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ConversationsJoinPostResponse200ResponseMetadataNormalizer.php index dbb2ea92..5d678221 100644 --- a/generated/Normalizer/ConversationsJoinPostResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ConversationsJoinPostResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,67 +24,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsJoinPostResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsJoinPostResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { + $values = []; + foreach ($data['warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { + $object->setWarnings(null); + } + return $object; } - if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { - $values = []; - foreach ($data['warnings'] as $value) { - $values[] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['warnings'] = $values; } - $object->setWarnings($values); - } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { - $object->setWarnings(null); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsJoinPostResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { - $values = []; - foreach ($object->getWarnings() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { + $values = []; + foreach ($data['warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { + $object->setWarnings(null); } - $data['warnings'] = $values; + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['warnings'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ConversationsJoinPostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsJoinPostResponsedefaultNormalizer.php index ed487597..e9d9599e 100644 --- a/generated/Normalizer/ConversationsJoinPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsJoinPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsJoinPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsJoinPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsJoinPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsJoinPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsKickPostResponse200Normalizer.php b/generated/Normalizer/ConversationsKickPostResponse200Normalizer.php index 0d5d0f06..3aa2c9db 100644 --- a/generated/Normalizer/ConversationsKickPostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsKickPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsKickPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsKickPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsKickPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsKickPostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsKickPostResponsedefaultNormalizer.php index ba7a31a2..8f0f376d 100644 --- a/generated/Normalizer/ConversationsKickPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsKickPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsKickPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsKickPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsKickPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsKickPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsLeavePostResponse200Normalizer.php b/generated/Normalizer/ConversationsLeavePostResponse200Normalizer.php index 66e0f595..b626639f 100644 --- a/generated/Normalizer/ConversationsLeavePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsLeavePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,65 +24,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsLeavePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsLeavePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('not_in_channel', $data) && null !== $data['not_in_channel']) { + $object->setNotInChannel($data['not_in_channel']); + } elseif (\array_key_exists('not_in_channel', $data) && null === $data['not_in_channel']) { + $object->setNotInChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('not_in_channel', $data) && null !== $data['not_in_channel']) { - $object->setNotInChannel($data['not_in_channel']); - } elseif (\array_key_exists('not_in_channel', $data) && null === $data['not_in_channel']) { - $object->setNotInChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('notInChannel') && null !== $object->getNotInChannel()) { + $data['not_in_channel'] = $object->getNotInChannel(); + } + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsLeavePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('notInChannel') && null !== $object->getNotInChannel()) { - $data['not_in_channel'] = $object->getNotInChannel(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === $type; } - $data['ok'] = $object->getOk(); - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('not_in_channel', $data) && null !== $data['not_in_channel']) { + $object->setNotInChannel($data['not_in_channel']); + } elseif (\array_key_exists('not_in_channel', $data) && null === $data['not_in_channel']) { + $object->setNotInChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('notInChannel') && null !== $object->getNotInChannel()) { + $data['not_in_channel'] = $object->getNotInChannel(); + } + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsLeavePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsLeavePostResponsedefaultNormalizer.php index 777bf5fd..cd32d1dc 100644 --- a/generated/Normalizer/ConversationsLeavePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsLeavePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsLeavePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsLeavePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsLeavePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsLeavePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsListGetResponse200Normalizer.php b/generated/Normalizer/ConversationsListGetResponse200Normalizer.php index d19c91cd..6e41cd52 100644 --- a/generated/Normalizer/ConversationsListGetResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('channels', $data) && null !== $data['channels']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['channels'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setChannels($values); - } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { - $object->setChannels(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + $data['channels'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getChannels() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === $type; } - $data['channels'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['channels'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsListGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ConversationsListGetResponse200ResponseMetadataNormalizer.php index de0a2eb0..43b91c4d 100644 --- a/generated/Normalizer/ConversationsListGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ConversationsListGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsListGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ConversationsListGetResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsListGetResponsedefaultNormalizer.php index 76b3db7c..5286c81e 100644 --- a/generated/Normalizer/ConversationsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsMarkPostResponse200Normalizer.php b/generated/Normalizer/ConversationsMarkPostResponse200Normalizer.php index 56d984ae..8dd8062f 100644 --- a/generated/Normalizer/ConversationsMarkPostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsMarkPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsMarkPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsMarkPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsMarkPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsMarkPostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsMarkPostResponsedefaultNormalizer.php index 0129f52a..08dda5f6 100644 --- a/generated/Normalizer/ConversationsMarkPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsMarkPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsMarkPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsMarkPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsMarkPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMarkPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsMembersGetResponse200Normalizer.php b/generated/Normalizer/ConversationsMembersGetResponse200Normalizer.php index da99edbf..bc3ebd66 100644 --- a/generated/Normalizer/ConversationsMembersGetResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsMembersGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsMembersGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsMembersGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $value; + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('members', $data) && null !== $data['members']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['members'] as $value) { + foreach ($object->getMembers() as $value) { $values[] = $value; } - $object->setMembers($values); - } elseif (\array_key_exists('members', $data) && null === $data['members']) { - $object->setMembers(null); + $data['members'] = $values; + $data['ok'] = $object->getOk(); + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false]; + } + } +} else { + class ConversationsMembersGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === $type; } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $value; + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getMembers() as $value) { - $values[] = $value; + return $object; } - $data['members'] = $values; - $data['ok'] = $object->getOk(); - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getMembers() as $value) { + $values[] = $value; + } + $data['members'] = $values; + $data['ok'] = $object->getOk(); + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsMembersGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ConversationsMembersGetResponse200ResponseMetadataNormalizer.php index 0fab49a0..5f87100e 100644 --- a/generated/Normalizer/ConversationsMembersGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ConversationsMembersGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsMembersGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsMembersGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsMembersGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ConversationsMembersGetResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsMembersGetResponsedefaultNormalizer.php index bc84b46d..38ec45da 100644 --- a/generated/Normalizer/ConversationsMembersGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsMembersGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsMembersGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsMembersGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ConversationsMembersGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsMembersGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsOpenPostResponse200ChannelItem1Normalizer.php b/generated/Normalizer/ConversationsOpenPostResponse200ChannelItem1Normalizer.php index 5585e019..36bd524e 100644 --- a/generated/Normalizer/ConversationsOpenPostResponse200ChannelItem1Normalizer.php +++ b/generated/Normalizer/ConversationsOpenPostResponse200ChannelItem1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,127 +24,251 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsOpenPostResponse200ChannelItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsOpenPostResponse200ChannelItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200ChannelItem1(); - if (\array_key_exists('unread_count', $data) && \is_int($data['unread_count'])) { - $data['unread_count'] = (float) $data['unread_count']; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === $type; } - if (\array_key_exists('unread_count_display', $data) && \is_int($data['unread_count_display'])) { - $data['unread_count_display'] = (float) $data['unread_count_display']; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === \get_class($data); } - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200ChannelItem1(); + if (\array_key_exists('unread_count', $data) && \is_int($data['unread_count'])) { + $data['unread_count'] = (float) $data['unread_count']; + } + if (\array_key_exists('unread_count_display', $data) && \is_int($data['unread_count_display'])) { + $data['unread_count_display'] = (float) $data['unread_count_display']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { + $object->setIsIm($data['is_im']); + } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { + $object->setIsIm(null); + } + if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { + $object->setIsOpen($data['is_open']); + } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { + $object->setIsOpen(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($this->denormalizer->denormalize($data['latest'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { - $object->setIsIm($data['is_im']); - } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { - $object->setIsIm(null); - } - if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { - $object->setIsOpen($data['is_open']); - } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { - $object->setIsOpen(null); - } - if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { - $object->setLastRead($data['last_read']); - } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { - $object->setLastRead(null); - } - if (\array_key_exists('latest', $data) && null !== $data['latest']) { - $object->setLatest($this->denormalizer->denormalize($data['latest'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); - } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { - $object->setLatest(null); - } - if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { - $object->setUnreadCount($data['unread_count']); - } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { - $object->setUnreadCount(null); - } - if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { - $object->setUnreadCountDisplay($data['unread_count_display']); - } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { - $object->setUnreadCountDisplay(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('isIm') && null !== $object->getIsIm()) { + $data['is_im'] = $object->getIsIm(); + } + if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { + $data['is_open'] = $object->getIsOpen(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $this->normalizer->normalize($object->getLatest(), 'json', $context); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['created'] = $object->getCreated(); - } - $data['id'] = $object->getId(); - if ($object->isInitialized('isIm') && null !== $object->getIsIm()) { - $data['is_im'] = $object->getIsIm(); - } - if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { - $data['is_open'] = $object->getIsOpen(); + return $data; } - if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { - $data['last_read'] = $object->getLastRead(); - } - if ($object->isInitialized('latest') && null !== $object->getLatest()) { - $data['latest'] = $this->normalizer->normalize($object->getLatest(), 'json', $context); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false]; } - if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { - $data['unread_count'] = $object->getUnreadCount(); + } +} else { + class ConversationsOpenPostResponse200ChannelItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === $type; } - if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { - $data['unread_count_display'] = $object->getUnreadCountDisplay(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' === \get_class($data); } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200ChannelItem1(); + if (\array_key_exists('unread_count', $data) && \is_int($data['unread_count'])) { + $data['unread_count'] = (float) $data['unread_count']; + } + if (\array_key_exists('unread_count_display', $data) && \is_int($data['unread_count_display'])) { + $data['unread_count_display'] = (float) $data['unread_count_display']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { + $object->setIsIm($data['is_im']); + } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { + $object->setIsIm(null); + } + if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { + $object->setIsOpen($data['is_open']); + } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { + $object->setIsOpen(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($this->denormalizer->denormalize($data['latest'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('isIm') && null !== $object->getIsIm()) { + $data['is_im'] = $object->getIsIm(); + } + if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { + $data['is_open'] = $object->getIsOpen(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $this->normalizer->normalize($object->getLatest(), 'json', $context); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false]; + } } } diff --git a/generated/Normalizer/ConversationsOpenPostResponse200Normalizer.php b/generated/Normalizer/ConversationsOpenPostResponse200Normalizer.php index a986fa38..a3cb13ef 100644 --- a/generated/Normalizer/ConversationsOpenPostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsOpenPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('already_open', $data) && null !== $data['already_open']) { + $object->setAlreadyOpen($data['already_open']); + } elseif (\array_key_exists('already_open', $data) && null === $data['already_open']) { + $object->setAlreadyOpen(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { + $object->setNoOp($data['no_op']); + } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { + $object->setNoOp(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('already_open', $data) && null !== $data['already_open']) { - $object->setAlreadyOpen($data['already_open']); - } elseif (\array_key_exists('already_open', $data) && null === $data['already_open']) { - $object->setAlreadyOpen(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('alreadyOpen') && null !== $object->getAlreadyOpen()) { + $data['already_open'] = $object->getAlreadyOpen(); + } + $data['channel'] = $object->getChannel(); + if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { + $data['no_op'] = $object->getNoOp(); + } + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false]; } - if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { - $object->setNoOp($data['no_op']); - } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { - $object->setNoOp(null); + } +} else { + class ConversationsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === $type; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('already_open', $data) && null !== $data['already_open']) { + $object->setAlreadyOpen($data['already_open']); + } elseif (\array_key_exists('already_open', $data) && null === $data['already_open']) { + $object->setAlreadyOpen(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('no_op', $data) && null !== $data['no_op']) { + $object->setNoOp($data['no_op']); + } elseif (\array_key_exists('no_op', $data) && null === $data['no_op']) { + $object->setNoOp(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('alreadyOpen') && null !== $object->getAlreadyOpen()) { - $data['already_open'] = $object->getAlreadyOpen(); - } - $data['channel'] = $object->getChannel(); - if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { - $data['no_op'] = $object->getNoOp(); + return $object; } - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('alreadyOpen') && null !== $object->getAlreadyOpen()) { + $data['already_open'] = $object->getAlreadyOpen(); + } + $data['channel'] = $object->getChannel(); + if ($object->isInitialized('noOp') && null !== $object->getNoOp()) { + $data['no_op'] = $object->getNoOp(); + } + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsOpenPostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsOpenPostResponsedefaultNormalizer.php index e90841f6..e902a0b7 100644 --- a/generated/Normalizer/ConversationsOpenPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsOpenPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ConversationsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsOpenPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRenamePostResponse200Normalizer.php b/generated/Normalizer/ConversationsRenamePostResponse200Normalizer.php index 1ce3a471..34376902 100644 --- a/generated/Normalizer/ConversationsRenamePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsRenamePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRenamePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRenamePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsRenamePostResponsedefaultNormalizer.php index 4064d5bc..f09dedf0 100644 --- a/generated/Normalizer/ConversationsRenamePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsRenamePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRenamePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRenamePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem0Normalizer.php b/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem0Normalizer.php index 9376cfa0..45fe3c3c 100644 --- a/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem0Normalizer.php +++ b/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,173 +24,343 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRepliesGetResponse200MessagesItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRepliesGetResponse200MessagesItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { + $object->setLatestReply($data['latest_reply']); + } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { + $object->setLatestReply(null); + } + if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { + $object->setReplyCount($data['reply_count']); + } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { + $object->setReplyCount(null); + } + if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { + $values = []; + foreach ($data['reply_users'] as $value) { + $values[] = $value; + } + $object->setReplyUsers($values); + } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { + $object->setReplyUsers(null); + } + if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { + $object->setReplyUsersCount($data['reply_users_count']); + } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { + $object->setReplyUsersCount(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { + $object->setSubscribed($data['subscribed']); + } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { + $object->setSubscribed(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + return $object; } - if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { - $object->setLastRead($data['last_read']); - } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { - $object->setLastRead(null); - } - if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { - $object->setLatestReply($data['latest_reply']); - } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { - $object->setLatestReply(null); - } - if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { - $object->setReplyCount($data['reply_count']); - } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { - $object->setReplyCount(null); - } - if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { - $values = []; - foreach ($data['reply_users'] as $value) { - $values[] = $value; - } - $object->setReplyUsers($values); - } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { - $object->setReplyUsers(null); - } - if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { - $object->setReplyUsersCount($data['reply_users_count']); - } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { - $object->setReplyUsersCount(null); - } - if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { - $object->setSourceTeam($data['source_team']); - } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { - $object->setSourceTeam(null); - } - if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { - $object->setSubscribed($data['subscribed']); - } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { - $object->setSubscribed(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { - $object->setThreadTs($data['thread_ts']); - } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { - $object->setThreadTs(null); - } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { - $object->setUnreadCount($data['unread_count']); - } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { - $object->setUnreadCount(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { - $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); - } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { - $object->setUserProfile(null); - } - if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { - $object->setUserTeam($data['user_team']); - } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { - $object->setUserTeam(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { + $data['latest_reply'] = $object->getLatestReply(); + } + $data['reply_count'] = $object->getReplyCount(); + if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { + $values = []; + foreach ($object->getReplyUsers() as $value) { + $values[] = $value; + } + $data['reply_users'] = $values; + } + if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { + $data['reply_users_count'] = $object->getReplyUsersCount(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + $data['subscribed'] = $object->getSubscribed(); + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + $data['thread_ts'] = $object->getThreadTs(); + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + $data['user'] = $object->getUser(); + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRepliesGetResponse200MessagesItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { - $data['last_read'] = $object->getLastRead(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === $type; } - if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { - $data['latest_reply'] = $object->getLatestReply(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' === \get_class($data); } - $data['reply_count'] = $object->getReplyCount(); - if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { - $values = []; - foreach ($object->getReplyUsers() as $value) { - $values[] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['reply_users'] = $values; - } - if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { - $data['reply_users_count'] = $object->getReplyUsersCount(); - } - if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { - $data['source_team'] = $object->getSourceTeam(); - } - $data['subscribed'] = $object->getSubscribed(); - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $data['team'] = $object->getTeam(); - } - $data['text'] = $object->getText(); - $data['thread_ts'] = $object->getThreadTs(); - $data['ts'] = $object->getTs(); - $data['type'] = $object->getType(); - if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { - $data['unread_count'] = $object->getUnreadCount(); - } - $data['user'] = $object->getUser(); - if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { - $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); - } - if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { - $data['user_team'] = $object->getUserTeam(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { + $object->setLatestReply($data['latest_reply']); + } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { + $object->setLatestReply(null); + } + if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { + $object->setReplyCount($data['reply_count']); + } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { + $object->setReplyCount(null); + } + if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { + $values = []; + foreach ($data['reply_users'] as $value) { + $values[] = $value; + } + $object->setReplyUsers($values); + } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { + $object->setReplyUsers(null); + } + if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { + $object->setReplyUsersCount($data['reply_users_count']); + } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { + $object->setReplyUsersCount(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { + $object->setSubscribed($data['subscribed']); + } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { + $object->setSubscribed(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { + $data['latest_reply'] = $object->getLatestReply(); + } + $data['reply_count'] = $object->getReplyCount(); + if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { + $values = []; + foreach ($object->getReplyUsers() as $value) { + $values[] = $value; + } + $data['reply_users'] = $values; + } + if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { + $data['reply_users_count'] = $object->getReplyUsersCount(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + $data['subscribed'] = $object->getSubscribed(); + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + $data['thread_ts'] = $object->getThreadTs(); + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + $data['user'] = $object->getUser(); + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem1Normalizer.php b/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem1Normalizer.php index 8a4a3ed4..bd3ed0df 100644 --- a/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem1Normalizer.php +++ b/generated/Normalizer/ConversationsRepliesGetResponse200MessagesItemItem1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,127 +24,251 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRepliesGetResponse200MessagesItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRepliesGetResponse200MessagesItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { + $object->setParentUserId($data['parent_user_id']); + } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { + $object->setParentUserId(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + return $object; } - if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { - $object->setIsStarred($data['is_starred']); - } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { - $object->setIsStarred(null); - } - if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { - $object->setParentUserId($data['parent_user_id']); - } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { - $object->setParentUserId(null); - } - if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { - $object->setSourceTeam($data['source_team']); - } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { - $object->setSourceTeam(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { - $object->setThreadTs($data['thread_ts']); - } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { - $object->setThreadTs(null); - } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { - $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); - } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { - $object->setUserProfile(null); - } - if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { - $object->setUserTeam($data['user_team']); - } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { - $object->setUserTeam(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + $data['parent_user_id'] = $object->getParentUserId(); + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + $data['thread_ts'] = $object->getThreadTs(); + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + $data['user'] = $object->getUser(); + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { - $data['is_starred'] = $object->getIsStarred(); + return $data; } - $data['parent_user_id'] = $object->getParentUserId(); - if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { - $data['source_team'] = $object->getSourceTeam(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false]; } - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $data['team'] = $object->getTeam(); + } +} else { + class ConversationsRepliesGetResponse200MessagesItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === $type; } - $data['text'] = $object->getText(); - $data['thread_ts'] = $object->getThreadTs(); - $data['ts'] = $object->getTs(); - $data['type'] = $object->getType(); - $data['user'] = $object->getUser(); - if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { - $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' === \get_class($data); } - if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { - $data['user_team'] = $object->getUserTeam(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200MessagesItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { + $object->setParentUserId($data['parent_user_id']); + } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { + $object->setParentUserId(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + $data['parent_user_id'] = $object->getParentUserId(); + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + $data['thread_ts'] = $object->getThreadTs(); + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + $data['user'] = $object->getUser(); + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRepliesGetResponse200Normalizer.php b/generated/Normalizer/ConversationsRepliesGetResponse200Normalizer.php index 75f281cb..0955dfb4 100644 --- a/generated/Normalizer/ConversationsRepliesGetResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsRepliesGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRepliesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRepliesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { + $object->setHasMore($data['has_more']); + } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { + $object->setHasMore(null); + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $value; + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { - $object->setHasMore($data['has_more']); - } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { - $object->setHasMore(null); - } - if (\array_key_exists('messages', $data) && null !== $data['messages']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('hasMore') && null !== $object->getHasMore()) { + $data['has_more'] = $object->getHasMore(); + } $values = []; - foreach ($data['messages'] as $value) { + foreach ($object->getMessages() as $value) { $values[] = $value; } - $object->setMessages($values); - } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { - $object->setMessages(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + $data['messages'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRepliesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('hasMore') && null !== $object->getHasMore()) { - $data['has_more'] = $object->getHasMore(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === $type; } - $values = []; - foreach ($object->getMessages() as $value) { - $values[] = $value; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' === \get_class($data); } - $data['messages'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('has_more', $data) && null !== $data['has_more']) { + $object->setHasMore($data['has_more']); + } elseif (\array_key_exists('has_more', $data) && null === $data['has_more']) { + $object->setHasMore(null); + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $value; + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hasMore') && null !== $object->getHasMore()) { + $data['has_more'] = $object->getHasMore(); + } + $values = []; + foreach ($object->getMessages() as $value) { + $values[] = $value; + } + $data['messages'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRepliesGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/ConversationsRepliesGetResponse200ResponseMetadataNormalizer.php index 3761b99f..43106e30 100644 --- a/generated/Normalizer/ConversationsRepliesGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/ConversationsRepliesGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRepliesGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRepliesGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRepliesGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ConversationsRepliesGetResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsRepliesGetResponsedefaultNormalizer.php index cc736db8..f3ad6806 100644 --- a/generated/Normalizer/ConversationsRepliesGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsRepliesGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsRepliesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsRepliesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsRepliesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsRepliesGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsSetPurposePostResponse200Normalizer.php b/generated/Normalizer/ConversationsSetPurposePostResponse200Normalizer.php index 716db7ce..92f445d0 100644 --- a/generated/Normalizer/ConversationsSetPurposePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsSetPurposePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsSetPurposePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsSetPurposePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsSetPurposePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsSetPurposePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsSetPurposePostResponsedefaultNormalizer.php index 2d62cff4..99310141 100644 --- a/generated/Normalizer/ConversationsSetPurposePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsSetPurposePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsSetPurposePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsSetPurposePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsSetPurposePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetPurposePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsSetTopicPostResponse200Normalizer.php b/generated/Normalizer/ConversationsSetTopicPostResponse200Normalizer.php index 1e036395..b2fa192c 100644 --- a/generated/Normalizer/ConversationsSetTopicPostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsSetTopicPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsSetTopicPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsSetTopicPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsSetTopicPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($this->denormalizer->denormalize($data['channel'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context)); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $this->normalizer->normalize($object->getChannel(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsSetTopicPostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsSetTopicPostResponsedefaultNormalizer.php index 0fb5389e..cbfe667b 100644 --- a/generated/Normalizer/ConversationsSetTopicPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsSetTopicPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsSetTopicPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsSetTopicPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsSetTopicPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsSetTopicPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ConversationsUnarchivePostResponse200Normalizer.php b/generated/Normalizer/ConversationsUnarchivePostResponse200Normalizer.php index 654e0818..2b7be59d 100644 --- a/generated/Normalizer/ConversationsUnarchivePostResponse200Normalizer.php +++ b/generated/Normalizer/ConversationsUnarchivePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsUnarchivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ConversationsUnarchivePostResponsedefaultNormalizer.php b/generated/Normalizer/ConversationsUnarchivePostResponsedefaultNormalizer.php index bf05ddb1..b933edf3 100644 --- a/generated/Normalizer/ConversationsUnarchivePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ConversationsUnarchivePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('needed', $data) && null !== $data['needed']) { - $object->setNeeded($data['needed']); - } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { - $object->setNeeded(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('provided', $data) && null !== $data['provided']) { - $object->setProvided($data['provided']); - } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { - $object->setProvided(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ConversationsUnarchivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === $type; } - $data['error'] = $object->getError(); - if ($object->isInitialized('needed') && null !== $object->getNeeded()) { - $data['needed'] = $object->getNeeded(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' === \get_class($data); } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('provided') && null !== $object->getProvided()) { - $data['provided'] = $object->getProvided(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ConversationsUnarchivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('needed', $data) && null !== $data['needed']) { + $object->setNeeded($data['needed']); + } elseif (\array_key_exists('needed', $data) && null === $data['needed']) { + $object->setNeeded(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('provided', $data) && null !== $data['provided']) { + $object->setProvided($data['provided']); + } elseif (\array_key_exists('provided', $data) && null === $data['provided']) { + $object->setProvided(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + if ($object->isInitialized('needed') && null !== $object->getNeeded()) { + $data['needed'] = $object->getNeeded(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('provided') && null !== $object->getProvided()) { + $data['provided'] = $object->getProvided(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DialogOpenGetResponse200Normalizer.php b/generated/Normalizer/DialogOpenGetResponse200Normalizer.php index b593b9d9..60f38cbd 100644 --- a/generated/Normalizer/DialogOpenGetResponse200Normalizer.php +++ b/generated/Normalizer/DialogOpenGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DialogOpenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DialogOpenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class DialogOpenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/DialogOpenGetResponsedefaultNormalizer.php b/generated/Normalizer/DialogOpenGetResponsedefaultNormalizer.php index 948168ea..d43b55ea 100644 --- a/generated/Normalizer/DialogOpenGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/DialogOpenGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DialogOpenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DialogOpenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class DialogOpenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DialogOpenGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DndEndDndPostResponse200Normalizer.php b/generated/Normalizer/DndEndDndPostResponse200Normalizer.php index aa984409..fc3300fd 100644 --- a/generated/Normalizer/DndEndDndPostResponse200Normalizer.php +++ b/generated/Normalizer/DndEndDndPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndEndDndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndEndDndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class DndEndDndPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/DndEndDndPostResponsedefaultNormalizer.php b/generated/Normalizer/DndEndDndPostResponsedefaultNormalizer.php index 20ebe9e6..09fc8408 100644 --- a/generated/Normalizer/DndEndDndPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/DndEndDndPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndEndDndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndEndDndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class DndEndDndPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndDndPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DndEndSnoozePostResponse200Normalizer.php b/generated/Normalizer/DndEndSnoozePostResponse200Normalizer.php index c446268e..977c487f 100644 --- a/generated/Normalizer/DndEndSnoozePostResponse200Normalizer.php +++ b/generated/Normalizer/DndEndSnoozePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,81 +24,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndEndSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndEndSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { + $object->setDndEnabled($data['dnd_enabled']); + } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { + $object->setDndEnabled(null); + } + if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { + $object->setNextDndEndTs($data['next_dnd_end_ts']); + } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { + $object->setNextDndEndTs(null); + } + if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { + $object->setNextDndStartTs($data['next_dnd_start_ts']); + } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { + $object->setNextDndStartTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + return $object; } - if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { - $object->setDndEnabled($data['dnd_enabled']); - } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { - $object->setDndEnabled(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['dnd_enabled'] = $object->getDndEnabled(); + $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); + $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); + $data['ok'] = $object->getOk(); + $data['snooze_enabled'] = $object->getSnoozeEnabled(); + + return $data; } - if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { - $object->setNextDndEndTs($data['next_dnd_end_ts']); - } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { - $object->setNextDndEndTs(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false]; } - if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { - $object->setNextDndStartTs($data['next_dnd_start_ts']); - } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { - $object->setNextDndStartTs(null); + } +} else { + class DndEndSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === $type; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' === \get_class($data); } - if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { - $object->setSnoozeEnabled($data['snooze_enabled']); - } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { - $object->setSnoozeEnabled(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { + $object->setDndEnabled($data['dnd_enabled']); + } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { + $object->setDndEnabled(null); + } + if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { + $object->setNextDndEndTs($data['next_dnd_end_ts']); + } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { + $object->setNextDndEndTs(null); + } + if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { + $object->setNextDndStartTs($data['next_dnd_start_ts']); + } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { + $object->setNextDndStartTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['dnd_enabled'] = $object->getDndEnabled(); + $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); + $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); + $data['ok'] = $object->getOk(); + $data['snooze_enabled'] = $object->getSnoozeEnabled(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['dnd_enabled'] = $object->getDndEnabled(); - $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); - $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); - $data['ok'] = $object->getOk(); - $data['snooze_enabled'] = $object->getSnoozeEnabled(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/DndEndSnoozePostResponsedefaultNormalizer.php b/generated/Normalizer/DndEndSnoozePostResponsedefaultNormalizer.php index cb228c04..c404af1e 100644 --- a/generated/Normalizer/DndEndSnoozePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/DndEndSnoozePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndEndSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndEndSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class DndEndSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndEndSnoozePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DndInfoGetResponse200Normalizer.php b/generated/Normalizer/DndInfoGetResponse200Normalizer.php index 1e64c3d5..41b19fb2 100644 --- a/generated/Normalizer/DndInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/DndInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,99 +24,195 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { + $object->setDndEnabled($data['dnd_enabled']); + } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { + $object->setDndEnabled(null); + } + if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { + $object->setNextDndEndTs($data['next_dnd_end_ts']); + } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { + $object->setNextDndEndTs(null); + } + if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { + $object->setNextDndStartTs($data['next_dnd_start_ts']); + } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { + $object->setNextDndStartTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { + $object->setSnoozeEndtime($data['snooze_endtime']); + } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { + $object->setSnoozeEndtime(null); + } + if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { + $object->setSnoozeRemaining($data['snooze_remaining']); + } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { + $object->setSnoozeRemaining(null); + } + return $object; } - if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { - $object->setDndEnabled($data['dnd_enabled']); - } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { - $object->setDndEnabled(null); - } - if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { - $object->setNextDndEndTs($data['next_dnd_end_ts']); - } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { - $object->setNextDndEndTs(null); - } - if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { - $object->setNextDndStartTs($data['next_dnd_start_ts']); - } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { - $object->setNextDndStartTs(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { - $object->setSnoozeEnabled($data['snooze_enabled']); - } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { - $object->setSnoozeEnabled(null); - } - if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { - $object->setSnoozeEndtime($data['snooze_endtime']); - } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { - $object->setSnoozeEndtime(null); - } - if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { - $object->setSnoozeRemaining($data['snooze_remaining']); - } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { - $object->setSnoozeRemaining(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['dnd_enabled'] = $object->getDndEnabled(); + $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); + $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('snoozeEnabled') && null !== $object->getSnoozeEnabled()) { + $data['snooze_enabled'] = $object->getSnoozeEnabled(); + } + if ($object->isInitialized('snoozeEndtime') && null !== $object->getSnoozeEndtime()) { + $data['snooze_endtime'] = $object->getSnoozeEndtime(); + } + if ($object->isInitialized('snoozeRemaining') && null !== $object->getSnoozeRemaining()) { + $data['snooze_remaining'] = $object->getSnoozeRemaining(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class DndInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['dnd_enabled'] = $object->getDndEnabled(); - $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); - $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); - $data['ok'] = $object->getOk(); - if ($object->isInitialized('snoozeEnabled') && null !== $object->getSnoozeEnabled()) { - $data['snooze_enabled'] = $object->getSnoozeEnabled(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === $type; } - if ($object->isInitialized('snoozeEndtime') && null !== $object->getSnoozeEndtime()) { - $data['snooze_endtime'] = $object->getSnoozeEndtime(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' === \get_class($data); } - if ($object->isInitialized('snoozeRemaining') && null !== $object->getSnoozeRemaining()) { - $data['snooze_remaining'] = $object->getSnoozeRemaining(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('dnd_enabled', $data) && null !== $data['dnd_enabled']) { + $object->setDndEnabled($data['dnd_enabled']); + } elseif (\array_key_exists('dnd_enabled', $data) && null === $data['dnd_enabled']) { + $object->setDndEnabled(null); + } + if (\array_key_exists('next_dnd_end_ts', $data) && null !== $data['next_dnd_end_ts']) { + $object->setNextDndEndTs($data['next_dnd_end_ts']); + } elseif (\array_key_exists('next_dnd_end_ts', $data) && null === $data['next_dnd_end_ts']) { + $object->setNextDndEndTs(null); + } + if (\array_key_exists('next_dnd_start_ts', $data) && null !== $data['next_dnd_start_ts']) { + $object->setNextDndStartTs($data['next_dnd_start_ts']); + } elseif (\array_key_exists('next_dnd_start_ts', $data) && null === $data['next_dnd_start_ts']) { + $object->setNextDndStartTs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { + $object->setSnoozeEndtime($data['snooze_endtime']); + } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { + $object->setSnoozeEndtime(null); + } + if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { + $object->setSnoozeRemaining($data['snooze_remaining']); + } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { + $object->setSnoozeRemaining(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['dnd_enabled'] = $object->getDndEnabled(); + $data['next_dnd_end_ts'] = $object->getNextDndEndTs(); + $data['next_dnd_start_ts'] = $object->getNextDndStartTs(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('snoozeEnabled') && null !== $object->getSnoozeEnabled()) { + $data['snooze_enabled'] = $object->getSnoozeEnabled(); + } + if ($object->isInitialized('snoozeEndtime') && null !== $object->getSnoozeEndtime()) { + $data['snooze_endtime'] = $object->getSnoozeEndtime(); + } + if ($object->isInitialized('snoozeRemaining') && null !== $object->getSnoozeRemaining()) { + $data['snooze_remaining'] = $object->getSnoozeRemaining(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/DndInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/DndInfoGetResponsedefaultNormalizer.php index a5ac2207..bde881eb 100644 --- a/generated/Normalizer/DndInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/DndInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class DndInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DndSetSnoozePostResponse200Normalizer.php b/generated/Normalizer/DndSetSnoozePostResponse200Normalizer.php index d0b54cfa..0644ae7c 100644 --- a/generated/Normalizer/DndSetSnoozePostResponse200Normalizer.php +++ b/generated/Normalizer/DndSetSnoozePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndSetSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndSetSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { + $object->setSnoozeEndtime($data['snooze_endtime']); + } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { + $object->setSnoozeEndtime(null); + } + if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { + $object->setSnoozeRemaining($data['snooze_remaining']); + } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { + $object->setSnoozeRemaining(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['snooze_enabled'] = $object->getSnoozeEnabled(); + $data['snooze_endtime'] = $object->getSnoozeEndtime(); + $data['snooze_remaining'] = $object->getSnoozeRemaining(); + + return $data; } - if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { - $object->setSnoozeEnabled($data['snooze_enabled']); - } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { - $object->setSnoozeEnabled(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false]; } - if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { - $object->setSnoozeEndtime($data['snooze_endtime']); - } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { - $object->setSnoozeEndtime(null); + } +} else { + class DndSetSnoozePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === $type; } - if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { - $object->setSnoozeRemaining($data['snooze_remaining']); - } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { - $object->setSnoozeRemaining(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('snooze_enabled', $data) && null !== $data['snooze_enabled']) { + $object->setSnoozeEnabled($data['snooze_enabled']); + } elseif (\array_key_exists('snooze_enabled', $data) && null === $data['snooze_enabled']) { + $object->setSnoozeEnabled(null); + } + if (\array_key_exists('snooze_endtime', $data) && null !== $data['snooze_endtime']) { + $object->setSnoozeEndtime($data['snooze_endtime']); + } elseif (\array_key_exists('snooze_endtime', $data) && null === $data['snooze_endtime']) { + $object->setSnoozeEndtime(null); + } + if (\array_key_exists('snooze_remaining', $data) && null !== $data['snooze_remaining']) { + $object->setSnoozeRemaining($data['snooze_remaining']); + } elseif (\array_key_exists('snooze_remaining', $data) && null === $data['snooze_remaining']) { + $object->setSnoozeRemaining(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['snooze_enabled'] = $object->getSnoozeEnabled(); - $data['snooze_endtime'] = $object->getSnoozeEndtime(); - $data['snooze_remaining'] = $object->getSnoozeRemaining(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['snooze_enabled'] = $object->getSnoozeEnabled(); + $data['snooze_endtime'] = $object->getSnoozeEndtime(); + $data['snooze_remaining'] = $object->getSnoozeRemaining(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/DndSetSnoozePostResponsedefaultNormalizer.php b/generated/Normalizer/DndSetSnoozePostResponsedefaultNormalizer.php index ff5ad346..ebdb659a 100644 --- a/generated/Normalizer/DndSetSnoozePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/DndSetSnoozePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndSetSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndSetSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class DndSetSnoozePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndSetSnoozePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/DndTeamInfoGetResponse200Normalizer.php b/generated/Normalizer/DndTeamInfoGetResponse200Normalizer.php index c4042e86..fa808f9e 100644 --- a/generated/Normalizer/DndTeamInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/DndTeamInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndTeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndTeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class DndTeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/DndTeamInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/DndTeamInfoGetResponsedefaultNormalizer.php index 127c88c4..9cdc81ee 100644 --- a/generated/Normalizer/DndTeamInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/DndTeamInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DndTeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class DndTeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class DndTeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\DndTeamInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/EmojiListGetResponse200Normalizer.php b/generated/Normalizer/EmojiListGetResponse200Normalizer.php index 6e282796..abd92c42 100644 --- a/generated/Normalizer/EmojiListGetResponse200Normalizer.php +++ b/generated/Normalizer/EmojiListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class EmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class EmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class EmojiListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/EmojiListGetResponsedefaultNormalizer.php b/generated/Normalizer/EmojiListGetResponsedefaultNormalizer.php index f9108ebf..ae6ea96e 100644 --- a/generated/Normalizer/EmojiListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/EmojiListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class EmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class EmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class EmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesCommentsDeletePostResponse200Normalizer.php b/generated/Normalizer/FilesCommentsDeletePostResponse200Normalizer.php index e6e53e7d..e47f2970 100644 --- a/generated/Normalizer/FilesCommentsDeletePostResponse200Normalizer.php +++ b/generated/Normalizer/FilesCommentsDeletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesCommentsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesCommentsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesCommentsDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesCommentsDeletePostResponsedefaultNormalizer.php b/generated/Normalizer/FilesCommentsDeletePostResponsedefaultNormalizer.php index a8d0feba..3ac2a842 100644 --- a/generated/Normalizer/FilesCommentsDeletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesCommentsDeletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesCommentsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesCommentsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesCommentsDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesCommentsDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesDeletePostResponse200Normalizer.php b/generated/Normalizer/FilesDeletePostResponse200Normalizer.php index dfc4785a..48c32baf 100644 --- a/generated/Normalizer/FilesDeletePostResponse200Normalizer.php +++ b/generated/Normalizer/FilesDeletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesDeletePostResponsedefaultNormalizer.php b/generated/Normalizer/FilesDeletePostResponsedefaultNormalizer.php index d730845d..821495d7 100644 --- a/generated/Normalizer/FilesDeletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesDeletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesInfoGetResponse200Normalizer.php b/generated/Normalizer/FilesInfoGetResponse200Normalizer.php index 812b1cba..353fdb5e 100644 --- a/generated/Normalizer/FilesInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/FilesInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,109 +24,215 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comments', $data) && null !== $data['comments']) { + $values = []; + foreach ($data['comments'] as $value) { + $values[] = $value; + } + $object->setComments($values); + } elseif (\array_key_exists('comments', $data) && null === $data['comments']) { + $object->setComments(null); + } + if (\array_key_exists('content_html', $data) && null !== $data['content_html']) { + $object->setContentHtml($data['content_html']); + } elseif (\array_key_exists('content_html', $data) && null === $data['content_html']) { + $object->setContentHtml(null); + } + if (\array_key_exists('editor', $data) && null !== $data['editor']) { + $object->setEditor($data['editor']); + } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { + $object->setEditor(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('comments', $data) && null !== $data['comments']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['comments'] as $value) { + foreach ($object->getComments() as $value) { $values[] = $value; } - $object->setComments($values); - } elseif (\array_key_exists('comments', $data) && null === $data['comments']) { - $object->setComments(null); - } - if (\array_key_exists('content_html', $data) && null !== $data['content_html']) { - $object->setContentHtml($data['content_html']); - } elseif (\array_key_exists('content_html', $data) && null === $data['content_html']) { - $object->setContentHtml(null); - } - if (\array_key_exists('editor', $data) && null !== $data['editor']) { - $object->setEditor($data['editor']); - } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { - $object->setEditor(null); - } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + $data['comments'] = $values; + if ($object->isInitialized('contentHtml') && null !== $object->getContentHtml()) { + $data['content_html'] = $object->getContentHtml(); + } + if ($object->isInitialized('editor') && null !== $object->getEditor()) { + $data['editor'] = $object->getEditor(); + } + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getComments() as $value) { - $values[] = $value; - } - $data['comments'] = $values; - if ($object->isInitialized('contentHtml') && null !== $object->getContentHtml()) { - $data['content_html'] = $object->getContentHtml(); - } - if ($object->isInitialized('editor') && null !== $object->getEditor()) { - $data['editor'] = $object->getEditor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === $type; } - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['ok'] = $object->getOk(); - if ($object->isInitialized('paging') && null !== $object->getPaging()) { - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' === \get_class($data); } - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comments', $data) && null !== $data['comments']) { + $values = []; + foreach ($data['comments'] as $value) { + $values[] = $value; + } + $object->setComments($values); + } elseif (\array_key_exists('comments', $data) && null === $data['comments']) { + $object->setComments(null); + } + if (\array_key_exists('content_html', $data) && null !== $data['content_html']) { + $object->setContentHtml($data['content_html']); + } elseif (\array_key_exists('content_html', $data) && null === $data['content_html']) { + $object->setContentHtml(null); + } + if (\array_key_exists('editor', $data) && null !== $data['editor']) { + $object->setEditor($data['editor']); + } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { + $object->setEditor(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getComments() as $value) { + $values[] = $value; + } + $data['comments'] = $values; + if ($object->isInitialized('contentHtml') && null !== $object->getContentHtml()) { + $data['content_html'] = $object->getContentHtml(); + } + if ($object->isInitialized('editor') && null !== $object->getEditor()) { + $data['editor'] = $object->getEditor(); + } + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/FilesInfoGetResponsedefaultNormalizer.php index 98a82d6b..3b808a27 100644 --- a/generated/Normalizer/FilesInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesListGetResponse200Normalizer.php b/generated/Normalizer/FilesListGetResponse200Normalizer.php index 4f34deb9..a29a7f8e 100644 --- a/generated/Normalizer/FilesListGetResponse200Normalizer.php +++ b/generated/Normalizer/FilesListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('files', $data) && null !== $data['files']) { + $values = []; + foreach ($data['files'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); + } + $object->setFiles($values); + } elseif (\array_key_exists('files', $data) && null === $data['files']) { + $object->setFiles(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + return $object; } - if (\array_key_exists('files', $data) && null !== $data['files']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['files'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); + foreach ($object->getFiles() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setFiles($values); - } elseif (\array_key_exists('files', $data) && null === $data['files']) { - $object->setFiles(null); + $data['files'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false]; } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); + } +} else { + class FilesListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFiles() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('files', $data) && null !== $data['files']) { + $values = []; + foreach ($data['files'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); + } + $object->setFiles($values); + } elseif (\array_key_exists('files', $data) && null === $data['files']) { + $object->setFiles(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + + return $object; } - $data['files'] = $values; - $data['ok'] = $object->getOk(); - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getFiles() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['files'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesListGetResponsedefaultNormalizer.php b/generated/Normalizer/FilesListGetResponsedefaultNormalizer.php index b224e54a..3d5ea3ad 100644 --- a/generated/Normalizer/FilesListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteAddPostResponse200Normalizer.php b/generated/Normalizer/FilesRemoteAddPostResponse200Normalizer.php index 0bec5fb6..1864735e 100644 --- a/generated/Normalizer/FilesRemoteAddPostResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteAddPostResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteAddPostResponsedefaultNormalizer.php index a842434d..88418a26 100644 --- a/generated/Normalizer/FilesRemoteAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteInfoGetResponse200Normalizer.php b/generated/Normalizer/FilesRemoteInfoGetResponse200Normalizer.php index 8508a621..f6fa18dc 100644 --- a/generated/Normalizer/FilesRemoteInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteInfoGetResponsedefaultNormalizer.php index 9e2c8b60..18e6e1e3 100644 --- a/generated/Normalizer/FilesRemoteInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteListGetResponse200Normalizer.php b/generated/Normalizer/FilesRemoteListGetResponse200Normalizer.php index 75fdb558..7665ba19 100644 --- a/generated/Normalizer/FilesRemoteListGetResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteListGetResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteListGetResponsedefaultNormalizer.php index 5da9538c..aa7b6a5e 100644 --- a/generated/Normalizer/FilesRemoteListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteRemovePostResponse200Normalizer.php b/generated/Normalizer/FilesRemoteRemovePostResponse200Normalizer.php index bd70c085..6aa5c3d7 100644 --- a/generated/Normalizer/FilesRemoteRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteRemovePostResponsedefaultNormalizer.php index 0d54c1ab..570f7acf 100644 --- a/generated/Normalizer/FilesRemoteRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteShareGetResponse200Normalizer.php b/generated/Normalizer/FilesRemoteShareGetResponse200Normalizer.php index d69f8e50..4208e7eb 100644 --- a/generated/Normalizer/FilesRemoteShareGetResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteShareGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteShareGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteShareGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteShareGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteShareGetResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteShareGetResponsedefaultNormalizer.php index 72f69364..35db2522 100644 --- a/generated/Normalizer/FilesRemoteShareGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteShareGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteShareGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteShareGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteShareGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteShareGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteUpdatePostResponse200Normalizer.php b/generated/Normalizer/FilesRemoteUpdatePostResponse200Normalizer.php index bfe7934d..7d6a58ca 100644 --- a/generated/Normalizer/FilesRemoteUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/FilesRemoteUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRemoteUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/FilesRemoteUpdatePostResponsedefaultNormalizer.php index 3e372eca..392966fe 100644 --- a/generated/Normalizer/FilesRemoteUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRemoteUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRemoteUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRemoteUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRemoteUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRemoteUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesRevokePublicURLPostResponse200Normalizer.php b/generated/Normalizer/FilesRevokePublicURLPostResponse200Normalizer.php index 9f1f04bb..23439050 100644 --- a/generated/Normalizer/FilesRevokePublicURLPostResponse200Normalizer.php +++ b/generated/Normalizer/FilesRevokePublicURLPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRevokePublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRevokePublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesRevokePublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesRevokePublicURLPostResponsedefaultNormalizer.php b/generated/Normalizer/FilesRevokePublicURLPostResponsedefaultNormalizer.php index 6093b659..32ce01ef 100644 --- a/generated/Normalizer/FilesRevokePublicURLPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesRevokePublicURLPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesRevokePublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesRevokePublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesRevokePublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesRevokePublicURLPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesSharedPublicURLPostResponse200Normalizer.php b/generated/Normalizer/FilesSharedPublicURLPostResponse200Normalizer.php index f5cf7528..8b8a87ee 100644 --- a/generated/Normalizer/FilesSharedPublicURLPostResponse200Normalizer.php +++ b/generated/Normalizer/FilesSharedPublicURLPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesSharedPublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesSharedPublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesSharedPublicURLPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesSharedPublicURLPostResponsedefaultNormalizer.php b/generated/Normalizer/FilesSharedPublicURLPostResponsedefaultNormalizer.php index 7e31dc84..691b4816 100644 --- a/generated/Normalizer/FilesSharedPublicURLPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesSharedPublicURLPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesSharedPublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesSharedPublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesSharedPublicURLPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesSharedPublicURLPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/FilesUploadPostResponse200Normalizer.php b/generated/Normalizer/FilesUploadPostResponse200Normalizer.php index aaee1681..3068561f 100644 --- a/generated/Normalizer/FilesUploadPostResponse200Normalizer.php +++ b/generated/Normalizer/FilesUploadPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesUploadPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesUploadPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class FilesUploadPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/FilesUploadPostResponsedefaultNormalizer.php b/generated/Normalizer/FilesUploadPostResponsedefaultNormalizer.php index b3d3a41d..eea948fe 100644 --- a/generated/Normalizer/FilesUploadPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/FilesUploadPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class FilesUploadPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class FilesUploadPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class FilesUploadPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\FilesUploadPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/JaneObjectNormalizer.php b/generated/Normalizer/JaneObjectNormalizer.php index 1c44c4da..dbcb3ea9 100644 --- a/generated/Normalizer/JaneObjectNormalizer.php +++ b/generated/Normalizer/JaneObjectNormalizer.php @@ -15,6 +15,7 @@ use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -22,61 +23,119 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - protected $normalizers = ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => 'JoliCode\\Slack\\Api\\Normalizer\\BlocksItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsCommentNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationDisplayCountsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationSharesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsEnterpriseUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsCurrentItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileSharesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsIconNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemActionsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemFieldsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPagingNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPrimaryOwnerNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReactionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReminderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResourcesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamPrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamSsoProviderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldOptionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserTeamProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileShortNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoGroupNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoImNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoMpimNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200ScopesNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultErrorsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200ChannelItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200SelfNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem3Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem4Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem5Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200LoginsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200LogsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponsedefaultNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\JoliCode\\Slack\\Api\\Runtime\\Normalizer\\ReferenceNormalizer']; - protected $normalizersCache = []; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \array_key_exists($type, $this->normalizers); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + protected $normalizers = ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => 'JoliCode\\Slack\\Api\\Normalizer\\BlocksItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsCommentNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationDisplayCountsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationSharesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsEnterpriseUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsCurrentItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileSharesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsIconNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemActionsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemFieldsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPagingNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPrimaryOwnerNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReactionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReminderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResourcesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamPrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamSsoProviderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldOptionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserTeamProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileShortNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoGroupNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoImNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoMpimNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200ScopesNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultErrorsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200ChannelItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200SelfNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem3Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem4Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem5Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200LoginsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200LogsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponsedefaultNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\JoliCode\\Slack\\Api\\Runtime\\Normalizer\\ReferenceNormalizer']; + protected $normalizersCache = []; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && \array_key_exists(\get_class($data), $this->normalizers); - } + public function supportsDenormalization($data, $type, $format = null, array $context = []): bool + { + return \array_key_exists($type, $this->normalizers); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $normalizerClass = $this->normalizers[\get_class($object)]; - $normalizer = $this->getNormalizer($normalizerClass); + public function supportsNormalization($data, $format = null, array $context = []): bool + { + return \is_object($data) && \array_key_exists(\get_class($data), $this->normalizers); + } - return $normalizer->normalize($object, $format, $context); - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $normalizerClass = $this->normalizers[\get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); - public function denormalize($data, $class, $format = null, array $context = []) - { - $denormalizerClass = $this->normalizers[$class]; - $denormalizer = $this->getNormalizer($denormalizerClass); + return $normalizer->normalize($object, $format, $context); + } - return $denormalizer->denormalize($data, $class, $format, $context); - } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + $denormalizerClass = $this->normalizers[$type]; + $denormalizer = $this->getNormalizer($denormalizerClass); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false, '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => false]; - } + return $denormalizer->denormalize($data, $type, $format, $context); + } - private function getNormalizer(string $normalizerClass) - { - return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); - } + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false, '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => false]; + } - private function initNormalizer(string $normalizerClass) + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + + return $normalizer; + } + } +} else { + class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $normalizer = new $normalizerClass(); - $normalizer->setNormalizer($this->normalizer); - $normalizer->setDenormalizer($this->denormalizer); - $this->normalizersCache[$normalizerClass] = $normalizer; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + protected $normalizers = ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => 'JoliCode\\Slack\\Api\\Normalizer\\BlocksItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsBotProfileIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsChannelTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsCommentNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationDisplayCountsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationPurposeNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationSharesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsConversationTopicNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsEnterpriseUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsExternalOrgMigrationsCurrentItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsFileSharesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsIconNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemActionsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageAttachmentsItemFieldsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMessageIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPagingNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsPrimaryOwnerNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReactionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsReminderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResourcesNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsSubteamPrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamSsoProviderNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsTeamProfileFieldOptionNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserTeamProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => 'JoliCode\\Slack\\Api\\Normalizer\\ObjsUserProfileShortNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminAppsRestrictedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsConvertToPrivatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsDisconnectSharedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThreadNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPostNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetConversationPrefsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsGetTeamsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessAddGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessListGroupsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSearchGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetConversationPrefsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsSetTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiAddAliasPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminEmojiRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsApprovedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDeniedListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsDenyPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminInviteRequestsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsAdminsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsOwnersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDescriptionPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetIconPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminTeamsSettingsSetNamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsAddTeamsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsListChannelsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsergroupsRemoveChannelsPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersAssignPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionInvalidatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSessionResetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetAdminPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetExpirationPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetOwnerPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AdminUsersSetRegularPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ApiTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsEventAuthorizationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoAppHomeNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoChannelNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoGroupNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoImNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoMpimNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponse200InfoTeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResourcesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsResourcesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponse200ScopesNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsScopesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsPermissionsUsersRequestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AppsUninstallGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthRevokeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\AuthTestGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponse200BotIconsNormalizer', 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\BotsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsEndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsParticipantsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\CallsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatDeleteScheduledMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatGetPermalinkGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatMeMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostEphemeralPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatPostMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponse200MessageAttachmentsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduleMessagePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatScheduledMessagesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUnfurlPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponse200MessageNormalizer', 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ChatUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsArchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsClosePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsHistoryGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsInvitePostResponsedefaultErrorsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsJoinPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsKickPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsLeavePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMarkPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsMembersGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponse200ChannelItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRenamePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200MessagesItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsRepliesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetPurposePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsSetTopicPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ConversationsUnarchivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DialogOpenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndDndPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndEndSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndSetSnoozePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\DndTeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\EmojiListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesCommentsDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteShareGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRemoteUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesRevokePublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesSharedPublicURLPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\FilesUploadPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\MigrationExchangeGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthAccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthTokenGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\OauthV2AccessGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item0ItemsItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\PinsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ReactionsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersCompletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersDeletePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RemindersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200SelfNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponse200TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\RtmConnectGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\SearchMessagesGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsAddPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem0Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem1Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem2Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem3Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem4Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponse200ItemsItemItem5Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\StarsRemovePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponse200LoginsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamAccessLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamBillableInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponse200LogsItemNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamIntegrationLogsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\TeamProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsCreatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsDisablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsEnablePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsergroupsUsersUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponse200ResponseMetadataNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersConversationsGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersDeletePhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersGetPresenceGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item0UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item1UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item2UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3TeamNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponse200Item3UserNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersIdentityGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersInfoGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersListGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersLookupByEmailGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileGetGetResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersProfileSetPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetActivePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponse200ProfileNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPhotoPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\UsersSetPresencePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsOpenPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPublishPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsPushPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\ViewsUpdatePostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepCompletedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsStepFailedPostResponsedefaultNormalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponse200Normalizer', 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => 'JoliCode\\Slack\\Api\\Normalizer\\WorkflowsUpdateStepPostResponsedefaultNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\JoliCode\\Slack\\Api\\Runtime\\Normalizer\\ReferenceNormalizer']; + protected $normalizersCache = []; + + public function supportsDenormalization($data, $type, $format = null, array $context = []): bool + { + return \array_key_exists($type, $this->normalizers); + } + + public function supportsNormalization($data, $format = null, array $context = []): bool + { + return \is_object($data) && \array_key_exists(\get_class($data), $this->normalizers); + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $normalizerClass = $this->normalizers[\get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + + return $normalizer->normalize($object, $format, $context); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + $denormalizerClass = $this->normalizers[$type]; + $denormalizer = $this->getNormalizer($denormalizerClass); + + return $denormalizer->denormalize($data, $type, $format, $context); + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\BlocksItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsComment' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResources' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUser' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false, 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminAppsRestrictedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsConvertToPrivatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsDisconnectSharedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsEkmListOriginalConnectedChannelInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200Prefs' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsCanThread' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponse200PrefsWhoCanPost' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetConversationPrefsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsGetTeamsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessAddGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessListGroupsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsRestrictAccessRemoveGroupPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSearchGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetConversationPrefsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsSetTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiAddAliasPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminEmojiRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsApprovedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDeniedListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsDenyPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminInviteRequestsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsAdminsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsOwnersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDefaultChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDescriptionPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetDiscoverabilityPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetIconPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminTeamsSettingsSetNamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsAddTeamsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsListChannelsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsergroupsRemoveChannelsPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersAssignPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionInvalidatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSessionResetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetAdminPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetExpirationPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetOwnerPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AdminUsersSetRegularPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ApiTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsEventAuthorizationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200Info' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoAppHome' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoChannel' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoGroup' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoIm' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoMpim' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponse200InfoTeam' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResourcesItem' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsResourcesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponse200Scopes' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsScopesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsPermissionsUsersRequestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AppsUninstallGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthRevokeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\AuthTestGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200Bot' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponse200BotIcons' => false, 'JoliCode\\Slack\\Api\\Model\\BotsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsEndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsParticipantsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\CallsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatDeleteScheduledMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatGetPermalinkGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatMeMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostEphemeralPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatPostMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponse200MessageAttachmentsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduleMessagePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponse200ScheduledMessagesItem' => false, 'JoliCode\\Slack\\Api\\Model\\ChatScheduledMessagesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUnfurlPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponse200Message' => false, 'JoliCode\\Slack\\Api\\Model\\ChatUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsArchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsClosePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsHistoryGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsInvitePostResponsedefaultErrorsItem' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsJoinPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsKickPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsLeavePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMarkPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsMembersGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponse200ChannelItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRenamePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200MessagesItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsRepliesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetPurposePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsSetTopicPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ConversationsUnarchivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DialogOpenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndDndPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndEndSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndSetSnoozePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\DndTeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesCommentsDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteShareGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRemoteUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesRevokePublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesSharedPublicURLPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\FilesUploadPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false, 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false, 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false, 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false, 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false, 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false, '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => false]; + } + + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; - return $normalizer; + return $normalizer; + } } } diff --git a/generated/Normalizer/MigrationExchangeGetResponse200Normalizer.php b/generated/Normalizer/MigrationExchangeGetResponse200Normalizer.php index bbb45430..69db3fbb 100644 --- a/generated/Normalizer/MigrationExchangeGetResponse200Normalizer.php +++ b/generated/Normalizer/MigrationExchangeGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,116 +24,229 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class MigrationExchangeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class MigrationExchangeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + unset($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('invalid_user_ids', $data) && null !== $data['invalid_user_ids']) { + $values = []; + foreach ($data['invalid_user_ids'] as $value) { + $values[] = $value; + } + $object->setInvalidUserIds($values); + unset($data['invalid_user_ids']); + } elseif (\array_key_exists('invalid_user_ids', $data) && null === $data['invalid_user_ids']) { + $object->setInvalidUserIds(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + unset($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('user_id_map', $data) && null !== $data['user_id_map']) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['user_id_map'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setUserIdMap($values_1); + unset($data['user_id_map']); + } elseif (\array_key_exists('user_id_map', $data) && null === $data['user_id_map']) { + $object->setUserIdMap(null); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; + } + } + return $object; } - if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { - $object->setEnterpriseId($data['enterprise_id']); - unset($data['enterprise_id']); - } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { - $object->setEnterpriseId(null); - } - if (\array_key_exists('invalid_user_ids', $data) && null !== $data['invalid_user_ids']) { - $values = []; - foreach ($data['invalid_user_ids'] as $value) { - $values[] = $value; - } - $object->setInvalidUserIds($values); - unset($data['invalid_user_ids']); - } elseif (\array_key_exists('invalid_user_ids', $data) && null === $data['invalid_user_ids']) { - $object->setInvalidUserIds(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - unset($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); - } - if (\array_key_exists('user_id_map', $data) && null !== $data['user_id_map']) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['user_id_map'] as $key => $value_1) { - $values_1[$key] = $value_1; - } - $object->setUserIdMap($values_1); - unset($data['user_id_map']); - } elseif (\array_key_exists('user_id_map', $data) && null === $data['user_id_map']) { - $object->setUserIdMap(null); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['enterprise_id'] = $object->getEnterpriseId(); + if ($object->isInitialized('invalidUserIds') && null !== $object->getInvalidUserIds()) { + $values = []; + foreach ($object->getInvalidUserIds() as $value) { + $values[] = $value; + } + $data['invalid_user_ids'] = $values; + } + $data['ok'] = $object->getOk(); + $data['team_id'] = $object->getTeamId(); + if ($object->isInitialized('userIdMap') && null !== $object->getUserIdMap()) { + $values_1 = []; + foreach ($object->getUserIdMap() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['user_id_map'] = $values_1; } + foreach ($object as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $data[$key_1] = $value_2; + } + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class MigrationExchangeGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['enterprise_id'] = $object->getEnterpriseId(); - if ($object->isInitialized('invalidUserIds') && null !== $object->getInvalidUserIds()) { - $values = []; - foreach ($object->getInvalidUserIds() as $value) { - $values[] = $value; - } - $data['invalid_user_ids'] = $values; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === $type; } - $data['ok'] = $object->getOk(); - $data['team_id'] = $object->getTeamId(); - if ($object->isInitialized('userIdMap') && null !== $object->getUserIdMap()) { - $values_1 = []; - foreach ($object->getUserIdMap() as $key => $value_1) { - $values_1[$key] = $value_1; - } - $data['user_id_map'] = $values_1; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' === \get_class($data); } - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + unset($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('invalid_user_ids', $data) && null !== $data['invalid_user_ids']) { + $values = []; + foreach ($data['invalid_user_ids'] as $value) { + $values[] = $value; + } + $object->setInvalidUserIds($values); + unset($data['invalid_user_ids']); + } elseif (\array_key_exists('invalid_user_ids', $data) && null === $data['invalid_user_ids']) { + $object->setInvalidUserIds(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + unset($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); } + if (\array_key_exists('user_id_map', $data) && null !== $data['user_id_map']) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['user_id_map'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setUserIdMap($values_1); + unset($data['user_id_map']); + } elseif (\array_key_exists('user_id_map', $data) && null === $data['user_id_map']) { + $object->setUserIdMap(null); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['enterprise_id'] = $object->getEnterpriseId(); + if ($object->isInitialized('invalidUserIds') && null !== $object->getInvalidUserIds()) { + $values = []; + foreach ($object->getInvalidUserIds() as $value) { + $values[] = $value; + } + $data['invalid_user_ids'] = $values; + } + $data['ok'] = $object->getOk(); + $data['team_id'] = $object->getTeamId(); + if ($object->isInitialized('userIdMap') && null !== $object->getUserIdMap()) { + $values_1 = []; + foreach ($object->getUserIdMap() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['user_id_map'] = $values_1; + } + foreach ($object as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $data[$key_1] = $value_2; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/MigrationExchangeGetResponsedefaultNormalizer.php b/generated/Normalizer/MigrationExchangeGetResponsedefaultNormalizer.php index 49f35d83..1cd78ab1 100644 --- a/generated/Normalizer/MigrationExchangeGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/MigrationExchangeGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class MigrationExchangeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class MigrationExchangeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class MigrationExchangeGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\MigrationExchangeGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\MigrationExchangeGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/OauthAccessGetResponse200Normalizer.php b/generated/Normalizer/OauthAccessGetResponse200Normalizer.php index a05c34a3..03be794c 100644 --- a/generated/Normalizer/OauthAccessGetResponse200Normalizer.php +++ b/generated/Normalizer/OauthAccessGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthAccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthAccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthAccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/OauthAccessGetResponsedefaultNormalizer.php b/generated/Normalizer/OauthAccessGetResponsedefaultNormalizer.php index 9940f609..3f079944 100644 --- a/generated/Normalizer/OauthAccessGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/OauthAccessGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthAccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthAccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthAccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthAccessGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthAccessGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/OauthTokenGetResponse200Normalizer.php b/generated/Normalizer/OauthTokenGetResponse200Normalizer.php index 167350d7..7631312d 100644 --- a/generated/Normalizer/OauthTokenGetResponse200Normalizer.php +++ b/generated/Normalizer/OauthTokenGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthTokenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthTokenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthTokenGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/OauthTokenGetResponsedefaultNormalizer.php b/generated/Normalizer/OauthTokenGetResponsedefaultNormalizer.php index 759d4b3f..70a2e44b 100644 --- a/generated/Normalizer/OauthTokenGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/OauthTokenGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthTokenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthTokenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthTokenGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthTokenGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthTokenGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/OauthV2AccessGetResponse200Normalizer.php b/generated/Normalizer/OauthV2AccessGetResponse200Normalizer.php index 1fecde97..89fd1b9a 100644 --- a/generated/Normalizer/OauthV2AccessGetResponse200Normalizer.php +++ b/generated/Normalizer/OauthV2AccessGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthV2AccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthV2AccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthV2AccessGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/OauthV2AccessGetResponsedefaultNormalizer.php b/generated/Normalizer/OauthV2AccessGetResponsedefaultNormalizer.php index efd9d712..37669c05 100644 --- a/generated/Normalizer/OauthV2AccessGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/OauthV2AccessGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class OauthV2AccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class OauthV2AccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class OauthV2AccessGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\OauthV2AccessGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\OauthV2AccessGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ObjsBotProfileIconsNormalizer.php b/generated/Normalizer/ObjsBotProfileIconsNormalizer.php index 77a3c938..a69d4df9 100644 --- a/generated/Normalizer/ObjsBotProfileIconsNormalizer.php +++ b/generated/Normalizer/ObjsBotProfileIconsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsBotProfileIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsBotProfileIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsBotProfileIcons(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsBotProfileIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { + $object->setImage36($data['image_36']); + } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { + $object->setImage36(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + return $object; } - if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { - $object->setImage36($data['image_36']); - } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { - $object->setImage36(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['image_36'] = $object->getImage36(); + $data['image_48'] = $object->getImage48(); + $data['image_72'] = $object->getImage72(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false]; } - if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { - $object->setImage48($data['image_48']); - } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { - $object->setImage48(null); + } +} else { + class ObjsBotProfileIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === $type; } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $object->setImage72($data['image_72']); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsBotProfileIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_36', $data) && null !== $data['image_36']) { + $object->setImage36($data['image_36']); + } elseif (\array_key_exists('image_36', $data) && null === $data['image_36']) { + $object->setImage36(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['image_36'] = $object->getImage36(); - $data['image_48'] = $object->getImage48(); - $data['image_72'] = $object->getImage72(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['image_36'] = $object->getImage36(); + $data['image_48'] = $object->getImage48(); + $data['image_72'] = $object->getImage72(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons' => false]; + } } } diff --git a/generated/Normalizer/ObjsBotProfileNormalizer.php b/generated/Normalizer/ObjsBotProfileNormalizer.php index 3568e582..1850f449 100644 --- a/generated/Normalizer/ObjsBotProfileNormalizer.php +++ b/generated/Normalizer/ObjsBotProfileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,93 +24,183 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsBotProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsBotProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsBotProfile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsBotProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + return $object; } - if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { - $object->setAppId($data['app_id']); - } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { - $object->setAppId(null); - } - if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { - $object->setDeleted($data['deleted']); - } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { - $object->setDeleted(null); - } - if (\array_key_exists('icons', $data) && null !== $data['icons']) { - $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons', 'json', $context)); - } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { - $object->setIcons(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['app_id'] = $object->getAppId(); + $data['deleted'] = $object->getDeleted(); + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + $data['team_id'] = $object->getTeamId(); + $data['updated'] = $object->getUpdated(); + + return $data; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false]; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + } +} else { + class ObjsBotProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === $type; } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' === \get_class($data); } - if (\array_key_exists('updated', $data) && null !== $data['updated']) { - $object->setUpdated($data['updated']); - } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { - $object->setUpdated(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsBotProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfileIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['app_id'] = $object->getAppId(); + $data['deleted'] = $object->getDeleted(); + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + $data['team_id'] = $object->getTeamId(); + $data['updated'] = $object->getUpdated(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['app_id'] = $object->getAppId(); - $data['deleted'] = $object->getDeleted(); - $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - $data['team_id'] = $object->getTeamId(); - $data['updated'] = $object->getUpdated(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsBotProfile' => false]; + } } } diff --git a/generated/Normalizer/ObjsChannelNormalizer.php b/generated/Normalizer/ObjsChannelNormalizer.php index aeb89850..457adca3 100644 --- a/generated/Normalizer/ObjsChannelNormalizer.php +++ b/generated/Normalizer/ObjsChannelNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,308 +24,613 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsChannel(); - if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { - $data['priority'] = (float) $data['priority']; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === \get_class($data); } - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsChannel(); + if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { + $data['priority'] = (float) $data['priority']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { + $object->setIsArchived($data['is_archived']); + } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { + $object->setIsArchived(null); + } + if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { + $object->setIsChannel($data['is_channel']); + } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { + $object->setIsChannel(null); + } + if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { + $object->setIsFrozen($data['is_frozen']); + } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { + $object->setIsFrozen(null); + } + if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { + $object->setIsGeneral($data['is_general']); + } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { + $object->setIsGeneral(null); + } + if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { + $object->setIsMember($data['is_member']); + } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { + $object->setIsMember(null); + } + if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { + $object->setIsMoved($data['is_moved']); + } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { + $object->setIsMoved(null); + } + if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { + $object->setIsMpim($data['is_mpim']); + } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { + $object->setIsMpim(null); + } + if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { + $object->setIsNonThreadable($data['is_non_threadable']); + } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { + $object->setIsNonThreadable(null); + } + if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { + $object->setIsOrgShared($data['is_org_shared']); + } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { + $object->setIsOrgShared(null); + } + if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared($data['is_pending_ext_shared']); + } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared(null); + } + if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { + $object->setIsPrivate($data['is_private']); + } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { + $object->setIsPrivate(null); + } + if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { + $object->setIsReadOnly($data['is_read_only']); + } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { + $object->setIsReadOnly(null); + } + if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { + $object->setIsShared($data['is_shared']); + } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { + $object->setIsShared(null); + } + if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { + $object->setIsThreadOnly($data['is_thread_only']); + } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { + $object->setIsThreadOnly(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($data['latest']); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $value; + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { + $object->setNameNormalized($data['name_normalized']); + } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { + $object->setNameNormalized(null); + } + if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { + $object->setNumMembers($data['num_members']); + } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { + $object->setNumMembers(null); + } + if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { + $values_1 = []; + foreach ($data['pending_shared'] as $value_1) { + $values_1[] = $value_1; + } + $object->setPendingShared($values_1); + } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { + $object->setPendingShared(null); + } + if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { + $values_2 = []; + foreach ($data['previous_names'] as $value_2) { + $values_2[] = $value_2; + } + $object->setPreviousNames($values_2); + } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { + $object->setPreviousNames(null); + } + if (\array_key_exists('priority', $data) && null !== $data['priority']) { + $object->setPriority($data['priority']); + } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { + $object->setPriority(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose', 'json', $context)); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic', 'json', $context)); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { + $object->setUnlinked($data['unlinked']); + } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { + $object->setUnlinked(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + return $object; } - if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { - $object->setAcceptedUser($data['accepted_user']); - } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { - $object->setAcceptedUser(null); - } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { - $object->setIsArchived($data['is_archived']); - } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { - $object->setIsArchived(null); - } - if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { - $object->setIsChannel($data['is_channel']); - } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { - $object->setIsChannel(null); - } - if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { - $object->setIsFrozen($data['is_frozen']); - } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { - $object->setIsFrozen(null); - } - if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { - $object->setIsGeneral($data['is_general']); - } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { - $object->setIsGeneral(null); - } - if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { - $object->setIsMember($data['is_member']); - } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { - $object->setIsMember(null); - } - if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { - $object->setIsMoved($data['is_moved']); - } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { - $object->setIsMoved(null); - } - if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { - $object->setIsMpim($data['is_mpim']); - } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { - $object->setIsMpim(null); - } - if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { - $object->setIsNonThreadable($data['is_non_threadable']); - } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { - $object->setIsNonThreadable(null); - } - if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { - $object->setIsOrgShared($data['is_org_shared']); - } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { - $object->setIsOrgShared(null); - } - if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { - $object->setIsPendingExtShared($data['is_pending_ext_shared']); - } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { - $object->setIsPendingExtShared(null); - } - if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { - $object->setIsPrivate($data['is_private']); - } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { - $object->setIsPrivate(null); - } - if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { - $object->setIsReadOnly($data['is_read_only']); - } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { - $object->setIsReadOnly(null); - } - if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { - $object->setIsShared($data['is_shared']); - } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { - $object->setIsShared(null); - } - if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { - $object->setIsThreadOnly($data['is_thread_only']); - } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { - $object->setIsThreadOnly(null); - } - if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { - $object->setLastRead($data['last_read']); - } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { - $object->setLastRead(null); - } - if (\array_key_exists('latest', $data) && null !== $data['latest']) { - $object->setLatest($data['latest']); - } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { - $object->setLatest(null); - } - if (\array_key_exists('members', $data) && null !== $data['members']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); + } + $data['created'] = $object->getCreated(); + $data['creator'] = $object->getCreator(); + $data['id'] = $object->getId(); + if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { + $data['is_archived'] = $object->getIsArchived(); + } + $data['is_channel'] = $object->getIsChannel(); + if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { + $data['is_frozen'] = $object->getIsFrozen(); + } + if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { + $data['is_general'] = $object->getIsGeneral(); + } + if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { + $data['is_member'] = $object->getIsMember(); + } + if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { + $data['is_moved'] = $object->getIsMoved(); + } + $data['is_mpim'] = $object->getIsMpim(); + if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { + $data['is_non_threadable'] = $object->getIsNonThreadable(); + } + $data['is_org_shared'] = $object->getIsOrgShared(); + if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { + $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); + } + $data['is_private'] = $object->getIsPrivate(); + if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { + $data['is_read_only'] = $object->getIsReadOnly(); + } + $data['is_shared'] = $object->getIsShared(); + if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { + $data['is_thread_only'] = $object->getIsThreadOnly(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $object->getLatest(); + } $values = []; - foreach ($data['members'] as $value) { + foreach ($object->getMembers() as $value) { $values[] = $value; } - $object->setMembers($values); - } elseif (\array_key_exists('members', $data) && null === $data['members']) { - $object->setMembers(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { - $object->setNameNormalized($data['name_normalized']); - } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { - $object->setNameNormalized(null); - } - if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { - $object->setNumMembers($data['num_members']); - } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { - $object->setNumMembers(null); - } - if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { - $values_1 = []; - foreach ($data['pending_shared'] as $value_1) { - $values_1[] = $value_1; - } - $object->setPendingShared($values_1); - } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { - $object->setPendingShared(null); - } - if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { - $values_2 = []; - foreach ($data['previous_names'] as $value_2) { - $values_2[] = $value_2; - } - $object->setPreviousNames($values_2); - } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { - $object->setPreviousNames(null); - } - if (\array_key_exists('priority', $data) && null !== $data['priority']) { - $object->setPriority($data['priority']); - } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { - $object->setPriority(null); - } - if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { - $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose', 'json', $context)); - } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { - $object->setPurpose(null); - } - if (\array_key_exists('topic', $data) && null !== $data['topic']) { - $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic', 'json', $context)); - } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { - $object->setTopic(null); - } - if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { - $object->setUnlinked($data['unlinked']); - } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { - $object->setUnlinked(null); - } - if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { - $object->setUnreadCount($data['unread_count']); - } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { - $object->setUnreadCount(null); - } - if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { - $object->setUnreadCountDisplay($data['unread_count_display']); - } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { - $object->setUnreadCountDisplay(null); + $data['members'] = $values; + $data['name'] = $object->getName(); + $data['name_normalized'] = $object->getNameNormalized(); + if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { + $data['num_members'] = $object->getNumMembers(); + } + if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { + $values_1 = []; + foreach ($object->getPendingShared() as $value_1) { + $values_1[] = $value_1; + } + $data['pending_shared'] = $values_1; + } + if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { + $values_2 = []; + foreach ($object->getPreviousNames() as $value_2) { + $values_2[] = $value_2; + } + $data['previous_names'] = $values_2; + } + if ($object->isInitialized('priority') && null !== $object->getPriority()) { + $data['priority'] = $object->getPriority(); + } + $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); + $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); + if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { + $data['unlinked'] = $object->getUnlinked(); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsChannelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { - $data['accepted_user'] = $object->getAcceptedUser(); - } - $data['created'] = $object->getCreated(); - $data['creator'] = $object->getCreator(); - $data['id'] = $object->getId(); - if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { - $data['is_archived'] = $object->getIsArchived(); - } - $data['is_channel'] = $object->getIsChannel(); - if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { - $data['is_frozen'] = $object->getIsFrozen(); - } - if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { - $data['is_general'] = $object->getIsGeneral(); - } - if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { - $data['is_member'] = $object->getIsMember(); - } - if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { - $data['is_moved'] = $object->getIsMoved(); - } - $data['is_mpim'] = $object->getIsMpim(); - if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { - $data['is_non_threadable'] = $object->getIsNonThreadable(); - } - $data['is_org_shared'] = $object->getIsOrgShared(); - if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { - $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); - } - $data['is_private'] = $object->getIsPrivate(); - if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { - $data['is_read_only'] = $object->getIsReadOnly(); - } - $data['is_shared'] = $object->getIsShared(); - if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { - $data['is_thread_only'] = $object->getIsThreadOnly(); - } - if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { - $data['last_read'] = $object->getLastRead(); - } - if ($object->isInitialized('latest') && null !== $object->getLatest()) { - $data['latest'] = $object->getLatest(); - } - $values = []; - foreach ($object->getMembers() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === $type; } - $data['members'] = $values; - $data['name'] = $object->getName(); - $data['name_normalized'] = $object->getNameNormalized(); - if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { - $data['num_members'] = $object->getNumMembers(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannel' === \get_class($data); } - if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { - $values_1 = []; - foreach ($object->getPendingShared() as $value_1) { - $values_1[] = $value_1; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['pending_shared'] = $values_1; - } - if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { - $values_2 = []; - foreach ($object->getPreviousNames() as $value_2) { - $values_2[] = $value_2; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - $data['previous_names'] = $values_2; - } - if ($object->isInitialized('priority') && null !== $object->getPriority()) { - $data['priority'] = $object->getPriority(); - } - $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); - $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); - if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { - $data['unlinked'] = $object->getUnlinked(); - } - if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { - $data['unread_count'] = $object->getUnreadCount(); - } - if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { - $data['unread_count_display'] = $object->getUnreadCountDisplay(); + $object = new \JoliCode\Slack\Api\Model\ObjsChannel(); + if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { + $data['priority'] = (float) $data['priority']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { + $object->setIsArchived($data['is_archived']); + } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { + $object->setIsArchived(null); + } + if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { + $object->setIsChannel($data['is_channel']); + } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { + $object->setIsChannel(null); + } + if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { + $object->setIsFrozen($data['is_frozen']); + } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { + $object->setIsFrozen(null); + } + if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { + $object->setIsGeneral($data['is_general']); + } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { + $object->setIsGeneral(null); + } + if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { + $object->setIsMember($data['is_member']); + } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { + $object->setIsMember(null); + } + if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { + $object->setIsMoved($data['is_moved']); + } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { + $object->setIsMoved(null); + } + if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { + $object->setIsMpim($data['is_mpim']); + } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { + $object->setIsMpim(null); + } + if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { + $object->setIsNonThreadable($data['is_non_threadable']); + } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { + $object->setIsNonThreadable(null); + } + if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { + $object->setIsOrgShared($data['is_org_shared']); + } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { + $object->setIsOrgShared(null); + } + if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared($data['is_pending_ext_shared']); + } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared(null); + } + if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { + $object->setIsPrivate($data['is_private']); + } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { + $object->setIsPrivate(null); + } + if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { + $object->setIsReadOnly($data['is_read_only']); + } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { + $object->setIsReadOnly(null); + } + if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { + $object->setIsShared($data['is_shared']); + } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { + $object->setIsShared(null); + } + if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { + $object->setIsThreadOnly($data['is_thread_only']); + } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { + $object->setIsThreadOnly(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($data['latest']); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $value; + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { + $object->setNameNormalized($data['name_normalized']); + } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { + $object->setNameNormalized(null); + } + if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { + $object->setNumMembers($data['num_members']); + } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { + $object->setNumMembers(null); + } + if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { + $values_1 = []; + foreach ($data['pending_shared'] as $value_1) { + $values_1[] = $value_1; + } + $object->setPendingShared($values_1); + } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { + $object->setPendingShared(null); + } + if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { + $values_2 = []; + foreach ($data['previous_names'] as $value_2) { + $values_2[] = $value_2; + } + $object->setPreviousNames($values_2); + } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { + $object->setPreviousNames(null); + } + if (\array_key_exists('priority', $data) && null !== $data['priority']) { + $object->setPriority($data['priority']); + } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { + $object->setPriority(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose', 'json', $context)); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic', 'json', $context)); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { + $object->setUnlinked($data['unlinked']); + } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { + $object->setUnlinked(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); + } + $data['created'] = $object->getCreated(); + $data['creator'] = $object->getCreator(); + $data['id'] = $object->getId(); + if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { + $data['is_archived'] = $object->getIsArchived(); + } + $data['is_channel'] = $object->getIsChannel(); + if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { + $data['is_frozen'] = $object->getIsFrozen(); + } + if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { + $data['is_general'] = $object->getIsGeneral(); + } + if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { + $data['is_member'] = $object->getIsMember(); + } + if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { + $data['is_moved'] = $object->getIsMoved(); + } + $data['is_mpim'] = $object->getIsMpim(); + if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { + $data['is_non_threadable'] = $object->getIsNonThreadable(); + } + $data['is_org_shared'] = $object->getIsOrgShared(); + if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { + $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); + } + $data['is_private'] = $object->getIsPrivate(); + if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { + $data['is_read_only'] = $object->getIsReadOnly(); + } + $data['is_shared'] = $object->getIsShared(); + if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { + $data['is_thread_only'] = $object->getIsThreadOnly(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $object->getLatest(); + } + $values = []; + foreach ($object->getMembers() as $value) { + $values[] = $value; + } + $data['members'] = $values; + $data['name'] = $object->getName(); + $data['name_normalized'] = $object->getNameNormalized(); + if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { + $data['num_members'] = $object->getNumMembers(); + } + if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { + $values_1 = []; + foreach ($object->getPendingShared() as $value_1) { + $values_1[] = $value_1; + } + $data['pending_shared'] = $values_1; + } + if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { + $values_2 = []; + foreach ($object->getPreviousNames() as $value_2) { + $values_2[] = $value_2; + } + $data['previous_names'] = $values_2; + } + if ($object->isInitialized('priority') && null !== $object->getPriority()) { + $data['priority'] = $object->getPriority(); + } + $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); + $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); + if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { + $data['unlinked'] = $object->getUnlinked(); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannel' => false]; + } } } diff --git a/generated/Normalizer/ObjsChannelPurposeNormalizer.php b/generated/Normalizer/ObjsChannelPurposeNormalizer.php index 831f9f18..a5efb590 100644 --- a/generated/Normalizer/ObjsChannelPurposeNormalizer.php +++ b/generated/Normalizer/ObjsChannelPurposeNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsChannelPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsChannelPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsChannelPurpose(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsChannelPurpose(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false]; } - if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { - $object->setLastSet($data['last_set']); - } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { - $object->setLastSet(null); + } +} else { + class ObjsChannelPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === $type; } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsChannelPurpose(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['creator'] = $object->getCreator(); - $data['last_set'] = $object->getLastSet(); - $data['value'] = $object->getValue(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelPurpose' => false]; + } } } diff --git a/generated/Normalizer/ObjsChannelTopicNormalizer.php b/generated/Normalizer/ObjsChannelTopicNormalizer.php index 40b5ea00..43bb7f6c 100644 --- a/generated/Normalizer/ObjsChannelTopicNormalizer.php +++ b/generated/Normalizer/ObjsChannelTopicNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsChannelTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsChannelTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsChannelTopic(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsChannelTopic(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false]; } - if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { - $object->setLastSet($data['last_set']); - } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { - $object->setLastSet(null); + } +} else { + class ObjsChannelTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === $type; } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsChannelTopic(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['creator'] = $object->getCreator(); - $data['last_set'] = $object->getLastSet(); - $data['value'] = $object->getValue(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsChannelTopic' => false]; + } } } diff --git a/generated/Normalizer/ObjsCommentNormalizer.php b/generated/Normalizer/ObjsCommentNormalizer.php index 9cfbe190..714606c8 100644 --- a/generated/Normalizer/ObjsCommentNormalizer.php +++ b/generated/Normalizer/ObjsCommentNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,155 +24,307 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsComment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('comment', $data) && null !== $data['comment']) { - $object->setComment($data['comment']); - } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { - $object->setComment(null); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === $type; } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { - $object->setIsIntro($data['is_intro']); - } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { - $object->setIsIntro(null); - } - if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { - $object->setIsStarred($data['is_starred']); - } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { - $object->setIsStarred(null); - } - if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { - $object->setNumStars($data['num_stars']); - } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { - $object->setNumStars(null); - } - if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { - $object->setPinnedInfo($data['pinned_info']); - } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { - $object->setPinnedInfo(null); - } - if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { - $values = []; - foreach ($data['pinned_to'] as $value) { - $values[] = $value; - } - $object->setPinnedTo($values); - } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { - $object->setPinnedTo(null); - } - if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { - $values_1 = []; - foreach ($data['reactions'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); - } - $object->setReactions($values_1); - } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { - $object->setReactions(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === \get_class($data); } - if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { - $value_2 = $data['timestamp']; - if (\is_int($data['timestamp'])) { - $value_2 = $data['timestamp']; - } elseif (\is_string($data['timestamp'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsComment(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($data['comment']); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { + $object->setIsIntro($data['is_intro']); + } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { + $object->setIsIntro(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { + $object->setNumStars($data['num_stars']); + } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { + $object->setNumStars(null); + } + if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { + $object->setPinnedInfo($data['pinned_info']); + } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { + $object->setPinnedInfo(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values = []; + foreach ($data['pinned_to'] as $value) { + $values[] = $value; + } + $object->setPinnedTo($values); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); + } + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_1 = []; + foreach ($data['reactions'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_1); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { $value_2 = $data['timestamp']; + if (\is_int($data['timestamp'])) { + $value_2 = $data['timestamp']; + } elseif (\is_string($data['timestamp'])) { + $value_2 = $data['timestamp']; + } + $object->setTimestamp($value_2); + } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { + $object->setTimestamp(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); } - $object->setTimestamp($value_2); - } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { - $object->setTimestamp(null); + + return $object; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['comment'] = $object->getComment(); + $data['created'] = $object->getCreated(); + $data['id'] = $object->getId(); + $data['is_intro'] = $object->getIsIntro(); + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { + $data['num_stars'] = $object->getNumStars(); + } + if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { + $data['pinned_info'] = $object->getPinnedInfo(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values = []; + foreach ($object->getPinnedTo() as $value) { + $values[] = $value; + } + $data['pinned_to'] = $values; + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_1 = []; + foreach ($object->getReactions() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['reactions'] = $values_1; + } + $value_2 = $object->getTimestamp(); + if (\is_int($object->getTimestamp())) { + $value_2 = $object->getTimestamp(); + } elseif (\is_string($object->getTimestamp())) { + $value_2 = $object->getTimestamp(); + } + $data['timestamp'] = $value_2; + $data['user'] = $object->getUser(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsComment' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['comment'] = $object->getComment(); - $data['created'] = $object->getCreated(); - $data['id'] = $object->getId(); - $data['is_intro'] = $object->getIsIntro(); - if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { - $data['is_starred'] = $object->getIsStarred(); - } - if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { - $data['num_stars'] = $object->getNumStars(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === $type; } - if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { - $data['pinned_info'] = $object->getPinnedInfo(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsComment' === \get_class($data); } - if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { - $values = []; - foreach ($object->getPinnedTo() as $value) { - $values[] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['pinned_to'] = $values; - } - if ($object->isInitialized('reactions') && null !== $object->getReactions()) { - $values_1 = []; - foreach ($object->getReactions() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsComment(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($data['comment']); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { + $object->setIsIntro($data['is_intro']); + } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { + $object->setIsIntro(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { + $object->setNumStars($data['num_stars']); + } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { + $object->setNumStars(null); + } + if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { + $object->setPinnedInfo($data['pinned_info']); + } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { + $object->setPinnedInfo(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values = []; + foreach ($data['pinned_to'] as $value) { + $values[] = $value; + } + $object->setPinnedTo($values); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); } - $data['reactions'] = $values_1; + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_1 = []; + foreach ($data['reactions'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_1); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { + $value_2 = $data['timestamp']; + if (\is_int($data['timestamp'])) { + $value_2 = $data['timestamp']; + } elseif (\is_string($data['timestamp'])) { + $value_2 = $data['timestamp']; + } + $object->setTimestamp($value_2); + } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { + $object->setTimestamp(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + + return $object; } - $value_2 = $object->getTimestamp(); - if (\is_int($object->getTimestamp())) { - $value_2 = $object->getTimestamp(); - } elseif (\is_string($object->getTimestamp())) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['comment'] = $object->getComment(); + $data['created'] = $object->getCreated(); + $data['id'] = $object->getId(); + $data['is_intro'] = $object->getIsIntro(); + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { + $data['num_stars'] = $object->getNumStars(); + } + if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { + $data['pinned_info'] = $object->getPinnedInfo(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values = []; + foreach ($object->getPinnedTo() as $value) { + $values[] = $value; + } + $data['pinned_to'] = $values; + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_1 = []; + foreach ($object->getReactions() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['reactions'] = $values_1; + } $value_2 = $object->getTimestamp(); - } - $data['timestamp'] = $value_2; - $data['user'] = $object->getUser(); + if (\is_int($object->getTimestamp())) { + $value_2 = $object->getTimestamp(); + } elseif (\is_string($object->getTimestamp())) { + $value_2 = $object->getTimestamp(); + } + $data['timestamp'] = $value_2; + $data['user'] = $object->getUser(); - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsComment' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsComment' => false]; + } } } diff --git a/generated/Normalizer/ObjsConversationDisplayCountsNormalizer.php b/generated/Normalizer/ObjsConversationDisplayCountsNormalizer.php index 828f92ba..c06cef9a 100644 --- a/generated/Normalizer/ObjsConversationDisplayCountsNormalizer.php +++ b/generated/Normalizer/ObjsConversationDisplayCountsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsConversationDisplayCountsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsConversationDisplayCountsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsConversationDisplayCounts(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationDisplayCounts(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { + $object->setDisplayCounts($data['display_counts']); + } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { + $object->setDisplayCounts(null); + } + if (\array_key_exists('guest_counts', $data) && null !== $data['guest_counts']) { + $object->setGuestCounts($data['guest_counts']); + } elseif (\array_key_exists('guest_counts', $data) && null === $data['guest_counts']) { + $object->setGuestCounts(null); + } + return $object; } - if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { - $object->setDisplayCounts($data['display_counts']); - } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { - $object->setDisplayCounts(null); - } - if (\array_key_exists('guest_counts', $data) && null !== $data['guest_counts']) { - $object->setGuestCounts($data['guest_counts']); - } elseif (\array_key_exists('guest_counts', $data) && null === $data['guest_counts']) { - $object->setGuestCounts(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['display_counts'] = $object->getDisplayCounts(); + $data['guest_counts'] = $object->getGuestCounts(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsConversationDisplayCountsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['display_counts'] = $object->getDisplayCounts(); - $data['guest_counts'] = $object->getGuestCounts(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationDisplayCounts(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { + $object->setDisplayCounts($data['display_counts']); + } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { + $object->setDisplayCounts(null); + } + if (\array_key_exists('guest_counts', $data) && null !== $data['guest_counts']) { + $object->setGuestCounts($data['guest_counts']); + } elseif (\array_key_exists('guest_counts', $data) && null === $data['guest_counts']) { + $object->setGuestCounts(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['display_counts'] = $object->getDisplayCounts(); + $data['guest_counts'] = $object->getGuestCounts(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts' => false]; + } } } diff --git a/generated/Normalizer/ObjsConversationNormalizer.php b/generated/Normalizer/ObjsConversationNormalizer.php index 52d22bc3..59def6ee 100644 --- a/generated/Normalizer/ObjsConversationNormalizer.php +++ b/generated/Normalizer/ObjsConversationNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,566 +24,1129 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsConversationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsConversationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsConversation(); - if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { - $data['priority'] = (float) $data['priority']; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === \get_class($data); } - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversation(); + if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { + $data['priority'] = (float) $data['priority']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('connected_team_ids', $data) && null !== $data['connected_team_ids']) { + $values = []; + foreach ($data['connected_team_ids'] as $value) { + $values[] = $value; + } + $object->setConnectedTeamIds($values); + } elseif (\array_key_exists('connected_team_ids', $data) && null === $data['connected_team_ids']) { + $object->setConnectedTeamIds(null); + } + if (\array_key_exists('conversation_host_id', $data) && null !== $data['conversation_host_id']) { + $object->setConversationHostId($data['conversation_host_id']); + } elseif (\array_key_exists('conversation_host_id', $data) && null === $data['conversation_host_id']) { + $object->setConversationHostId(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { + $object->setDisplayCounts($this->denormalizer->denormalize($data['display_counts'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts', 'json', $context)); + } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { + $object->setDisplayCounts(null); + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('has_pins', $data) && null !== $data['has_pins']) { + $object->setHasPins($data['has_pins']); + } elseif (\array_key_exists('has_pins', $data) && null === $data['has_pins']) { + $object->setHasPins(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('internal_team_ids', $data) && null !== $data['internal_team_ids']) { + $values_1 = []; + foreach ($data['internal_team_ids'] as $value_1) { + $values_1[] = $value_1; + } + $object->setInternalTeamIds($values_1); + } elseif (\array_key_exists('internal_team_ids', $data) && null === $data['internal_team_ids']) { + $object->setInternalTeamIds(null); + } + if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { + $object->setIsArchived($data['is_archived']); + } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { + $object->setIsArchived(null); + } + if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { + $object->setIsChannel($data['is_channel']); + } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { + $object->setIsChannel(null); + } + if (\array_key_exists('is_ext_shared', $data) && null !== $data['is_ext_shared']) { + $object->setIsExtShared($data['is_ext_shared']); + } elseif (\array_key_exists('is_ext_shared', $data) && null === $data['is_ext_shared']) { + $object->setIsExtShared(null); + } + if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { + $object->setIsFrozen($data['is_frozen']); + } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { + $object->setIsFrozen(null); + } + if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { + $object->setIsGeneral($data['is_general']); + } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { + $object->setIsGeneral(null); + } + if (\array_key_exists('is_global_shared', $data) && null !== $data['is_global_shared']) { + $object->setIsGlobalShared($data['is_global_shared']); + } elseif (\array_key_exists('is_global_shared', $data) && null === $data['is_global_shared']) { + $object->setIsGlobalShared(null); + } + if (\array_key_exists('is_group', $data) && null !== $data['is_group']) { + $object->setIsGroup($data['is_group']); + } elseif (\array_key_exists('is_group', $data) && null === $data['is_group']) { + $object->setIsGroup(null); + } + if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { + $object->setIsIm($data['is_im']); + } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { + $object->setIsIm(null); + } + if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { + $object->setIsMember($data['is_member']); + } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { + $object->setIsMember(null); + } + if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { + $object->setIsMoved($data['is_moved']); + } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { + $object->setIsMoved(null); + } + if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { + $object->setIsMpim($data['is_mpim']); + } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { + $object->setIsMpim(null); + } + if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { + $object->setIsNonThreadable($data['is_non_threadable']); + } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { + $object->setIsNonThreadable(null); + } + if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { + $object->setIsOpen($data['is_open']); + } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { + $object->setIsOpen(null); + } + if (\array_key_exists('is_org_default', $data) && null !== $data['is_org_default']) { + $object->setIsOrgDefault($data['is_org_default']); + } elseif (\array_key_exists('is_org_default', $data) && null === $data['is_org_default']) { + $object->setIsOrgDefault(null); + } + if (\array_key_exists('is_org_mandatory', $data) && null !== $data['is_org_mandatory']) { + $object->setIsOrgMandatory($data['is_org_mandatory']); + } elseif (\array_key_exists('is_org_mandatory', $data) && null === $data['is_org_mandatory']) { + $object->setIsOrgMandatory(null); + } + if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { + $object->setIsOrgShared($data['is_org_shared']); + } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { + $object->setIsOrgShared(null); + } + if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared($data['is_pending_ext_shared']); + } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared(null); + } + if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { + $object->setIsPrivate($data['is_private']); + } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { + $object->setIsPrivate(null); + } + if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { + $object->setIsReadOnly($data['is_read_only']); + } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { + $object->setIsReadOnly(null); + } + if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { + $object->setIsShared($data['is_shared']); + } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { + $object->setIsShared(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { + $object->setIsThreadOnly($data['is_thread_only']); + } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { + $object->setIsThreadOnly(null); + } + if (\array_key_exists('is_user_deleted', $data) && null !== $data['is_user_deleted']) { + $object->setIsUserDeleted($data['is_user_deleted']); + } elseif (\array_key_exists('is_user_deleted', $data) && null === $data['is_user_deleted']) { + $object->setIsUserDeleted(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($data['latest']); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values_2 = []; + foreach ($data['members'] as $value_2) { + $values_2[] = $value_2; + } + $object->setMembers($values_2); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { + $object->setNameNormalized($data['name_normalized']); + } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { + $object->setNameNormalized(null); + } + if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { + $object->setNumMembers($data['num_members']); + } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { + $object->setNumMembers(null); + } + if (\array_key_exists('parent_conversation', $data) && null !== $data['parent_conversation']) { + $object->setParentConversation($data['parent_conversation']); + } elseif (\array_key_exists('parent_conversation', $data) && null === $data['parent_conversation']) { + $object->setParentConversation(null); + } + if (\array_key_exists('pending_connected_team_ids', $data) && null !== $data['pending_connected_team_ids']) { + $values_3 = []; + foreach ($data['pending_connected_team_ids'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPendingConnectedTeamIds($values_3); + } elseif (\array_key_exists('pending_connected_team_ids', $data) && null === $data['pending_connected_team_ids']) { + $object->setPendingConnectedTeamIds(null); + } + if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { + $values_4 = []; + foreach ($data['pending_shared'] as $value_4) { + $values_4[] = $value_4; + } + $object->setPendingShared($values_4); + } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { + $object->setPendingShared(null); + } + if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { + $object->setPinCount($data['pin_count']); + } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { + $object->setPinCount(null); + } + if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { + $values_5 = []; + foreach ($data['previous_names'] as $value_5) { + $values_5[] = $value_5; + } + $object->setPreviousNames($values_5); + } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { + $object->setPreviousNames(null); + } + if (\array_key_exists('priority', $data) && null !== $data['priority']) { + $object->setPriority($data['priority']); + } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { + $object->setPriority(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose', 'json', $context)); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('shared_team_ids', $data) && null !== $data['shared_team_ids']) { + $values_6 = []; + foreach ($data['shared_team_ids'] as $value_6) { + $values_6[] = $value_6; + } + $object->setSharedTeamIds($values_6); + } elseif (\array_key_exists('shared_team_ids', $data) && null === $data['shared_team_ids']) { + $object->setSharedTeamIds(null); + } + if (\array_key_exists('shares', $data) && null !== $data['shares']) { + $values_7 = []; + foreach ($data['shares'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem', 'json', $context); + } + $object->setShares($values_7); + } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { + $object->setShares(null); + } + if (\array_key_exists('timezone_count', $data) && null !== $data['timezone_count']) { + $object->setTimezoneCount($data['timezone_count']); + } elseif (\array_key_exists('timezone_count', $data) && null === $data['timezone_count']) { + $object->setTimezoneCount(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic', 'json', $context)); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { + $object->setUnlinked($data['unlinked']); + } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { + $object->setUnlinked(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + if (\array_key_exists('use_case', $data) && null !== $data['use_case']) { + $object->setUseCase($data['use_case']); + } elseif (\array_key_exists('use_case', $data) && null === $data['use_case']) { + $object->setUseCase(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('version', $data) && null !== $data['version']) { + $object->setVersion($data['version']); + } elseif (\array_key_exists('version', $data) && null === $data['version']) { + $object->setVersion(null); + } + return $object; } - if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { - $object->setAcceptedUser($data['accepted_user']); - } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { - $object->setAcceptedUser(null); - } - if (\array_key_exists('connected_team_ids', $data) && null !== $data['connected_team_ids']) { - $values = []; - foreach ($data['connected_team_ids'] as $value) { - $values[] = $value; - } - $object->setConnectedTeamIds($values); - } elseif (\array_key_exists('connected_team_ids', $data) && null === $data['connected_team_ids']) { - $object->setConnectedTeamIds(null); - } - if (\array_key_exists('conversation_host_id', $data) && null !== $data['conversation_host_id']) { - $object->setConversationHostId($data['conversation_host_id']); - } elseif (\array_key_exists('conversation_host_id', $data) && null === $data['conversation_host_id']) { - $object->setConversationHostId(null); - } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); - } - if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { - $object->setDisplayCounts($this->denormalizer->denormalize($data['display_counts'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts', 'json', $context)); - } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { - $object->setDisplayCounts(null); - } - if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { - $object->setEnterpriseId($data['enterprise_id']); - } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { - $object->setEnterpriseId(null); - } - if (\array_key_exists('has_pins', $data) && null !== $data['has_pins']) { - $object->setHasPins($data['has_pins']); - } elseif (\array_key_exists('has_pins', $data) && null === $data['has_pins']) { - $object->setHasPins(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('internal_team_ids', $data) && null !== $data['internal_team_ids']) { - $values_1 = []; - foreach ($data['internal_team_ids'] as $value_1) { - $values_1[] = $value_1; - } - $object->setInternalTeamIds($values_1); - } elseif (\array_key_exists('internal_team_ids', $data) && null === $data['internal_team_ids']) { - $object->setInternalTeamIds(null); - } - if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { - $object->setIsArchived($data['is_archived']); - } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { - $object->setIsArchived(null); - } - if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { - $object->setIsChannel($data['is_channel']); - } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { - $object->setIsChannel(null); - } - if (\array_key_exists('is_ext_shared', $data) && null !== $data['is_ext_shared']) { - $object->setIsExtShared($data['is_ext_shared']); - } elseif (\array_key_exists('is_ext_shared', $data) && null === $data['is_ext_shared']) { - $object->setIsExtShared(null); - } - if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { - $object->setIsFrozen($data['is_frozen']); - } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { - $object->setIsFrozen(null); - } - if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { - $object->setIsGeneral($data['is_general']); - } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { - $object->setIsGeneral(null); - } - if (\array_key_exists('is_global_shared', $data) && null !== $data['is_global_shared']) { - $object->setIsGlobalShared($data['is_global_shared']); - } elseif (\array_key_exists('is_global_shared', $data) && null === $data['is_global_shared']) { - $object->setIsGlobalShared(null); - } - if (\array_key_exists('is_group', $data) && null !== $data['is_group']) { - $object->setIsGroup($data['is_group']); - } elseif (\array_key_exists('is_group', $data) && null === $data['is_group']) { - $object->setIsGroup(null); - } - if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { - $object->setIsIm($data['is_im']); - } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { - $object->setIsIm(null); - } - if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { - $object->setIsMember($data['is_member']); - } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { - $object->setIsMember(null); - } - if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { - $object->setIsMoved($data['is_moved']); - } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { - $object->setIsMoved(null); - } - if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { - $object->setIsMpim($data['is_mpim']); - } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { - $object->setIsMpim(null); - } - if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { - $object->setIsNonThreadable($data['is_non_threadable']); - } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { - $object->setIsNonThreadable(null); - } - if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { - $object->setIsOpen($data['is_open']); - } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { - $object->setIsOpen(null); - } - if (\array_key_exists('is_org_default', $data) && null !== $data['is_org_default']) { - $object->setIsOrgDefault($data['is_org_default']); - } elseif (\array_key_exists('is_org_default', $data) && null === $data['is_org_default']) { - $object->setIsOrgDefault(null); - } - if (\array_key_exists('is_org_mandatory', $data) && null !== $data['is_org_mandatory']) { - $object->setIsOrgMandatory($data['is_org_mandatory']); - } elseif (\array_key_exists('is_org_mandatory', $data) && null === $data['is_org_mandatory']) { - $object->setIsOrgMandatory(null); - } - if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { - $object->setIsOrgShared($data['is_org_shared']); - } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { - $object->setIsOrgShared(null); - } - if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { - $object->setIsPendingExtShared($data['is_pending_ext_shared']); - } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { - $object->setIsPendingExtShared(null); - } - if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { - $object->setIsPrivate($data['is_private']); - } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { - $object->setIsPrivate(null); - } - if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { - $object->setIsReadOnly($data['is_read_only']); - } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { - $object->setIsReadOnly(null); - } - if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { - $object->setIsShared($data['is_shared']); - } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { - $object->setIsShared(null); - } - if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { - $object->setIsStarred($data['is_starred']); - } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { - $object->setIsStarred(null); - } - if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { - $object->setIsThreadOnly($data['is_thread_only']); - } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { - $object->setIsThreadOnly(null); - } - if (\array_key_exists('is_user_deleted', $data) && null !== $data['is_user_deleted']) { - $object->setIsUserDeleted($data['is_user_deleted']); - } elseif (\array_key_exists('is_user_deleted', $data) && null === $data['is_user_deleted']) { - $object->setIsUserDeleted(null); - } - if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { - $object->setLastRead($data['last_read']); - } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { - $object->setLastRead(null); - } - if (\array_key_exists('latest', $data) && null !== $data['latest']) { - $object->setLatest($data['latest']); - } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { - $object->setLatest(null); - } - if (\array_key_exists('locale', $data) && null !== $data['locale']) { - $object->setLocale($data['locale']); - } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { - $object->setLocale(null); - } - if (\array_key_exists('members', $data) && null !== $data['members']) { - $values_2 = []; - foreach ($data['members'] as $value_2) { - $values_2[] = $value_2; - } - $object->setMembers($values_2); - } elseif (\array_key_exists('members', $data) && null === $data['members']) { - $object->setMembers(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { - $object->setNameNormalized($data['name_normalized']); - } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { - $object->setNameNormalized(null); - } - if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { - $object->setNumMembers($data['num_members']); - } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { - $object->setNumMembers(null); - } - if (\array_key_exists('parent_conversation', $data) && null !== $data['parent_conversation']) { - $object->setParentConversation($data['parent_conversation']); - } elseif (\array_key_exists('parent_conversation', $data) && null === $data['parent_conversation']) { - $object->setParentConversation(null); - } - if (\array_key_exists('pending_connected_team_ids', $data) && null !== $data['pending_connected_team_ids']) { - $values_3 = []; - foreach ($data['pending_connected_team_ids'] as $value_3) { - $values_3[] = $value_3; - } - $object->setPendingConnectedTeamIds($values_3); - } elseif (\array_key_exists('pending_connected_team_ids', $data) && null === $data['pending_connected_team_ids']) { - $object->setPendingConnectedTeamIds(null); - } - if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { - $values_4 = []; - foreach ($data['pending_shared'] as $value_4) { - $values_4[] = $value_4; - } - $object->setPendingShared($values_4); - } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { - $object->setPendingShared(null); - } - if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { - $object->setPinCount($data['pin_count']); - } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { - $object->setPinCount(null); - } - if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { - $values_5 = []; - foreach ($data['previous_names'] as $value_5) { - $values_5[] = $value_5; - } - $object->setPreviousNames($values_5); - } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { - $object->setPreviousNames(null); - } - if (\array_key_exists('priority', $data) && null !== $data['priority']) { - $object->setPriority($data['priority']); - } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { - $object->setPriority(null); - } - if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { - $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose', 'json', $context)); - } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { - $object->setPurpose(null); - } - if (\array_key_exists('shared_team_ids', $data) && null !== $data['shared_team_ids']) { - $values_6 = []; - foreach ($data['shared_team_ids'] as $value_6) { - $values_6[] = $value_6; - } - $object->setSharedTeamIds($values_6); - } elseif (\array_key_exists('shared_team_ids', $data) && null === $data['shared_team_ids']) { - $object->setSharedTeamIds(null); - } - if (\array_key_exists('shares', $data) && null !== $data['shares']) { - $values_7 = []; - foreach ($data['shares'] as $value_7) { - $values_7[] = $this->denormalizer->denormalize($value_7, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem', 'json', $context); - } - $object->setShares($values_7); - } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { - $object->setShares(null); - } - if (\array_key_exists('timezone_count', $data) && null !== $data['timezone_count']) { - $object->setTimezoneCount($data['timezone_count']); - } elseif (\array_key_exists('timezone_count', $data) && null === $data['timezone_count']) { - $object->setTimezoneCount(null); - } - if (\array_key_exists('topic', $data) && null !== $data['topic']) { - $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic', 'json', $context)); - } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { - $object->setTopic(null); - } - if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { - $object->setUnlinked($data['unlinked']); - } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { - $object->setUnlinked(null); - } - if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { - $object->setUnreadCount($data['unread_count']); - } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { - $object->setUnreadCount(null); - } - if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { - $object->setUnreadCountDisplay($data['unread_count_display']); - } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { - $object->setUnreadCountDisplay(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); + } + if ($object->isInitialized('connectedTeamIds') && null !== $object->getConnectedTeamIds()) { + $values = []; + foreach ($object->getConnectedTeamIds() as $value) { + $values[] = $value; + } + $data['connected_team_ids'] = $values; + } + if ($object->isInitialized('conversationHostId') && null !== $object->getConversationHostId()) { + $data['conversation_host_id'] = $object->getConversationHostId(); + } + $data['created'] = $object->getCreated(); + if ($object->isInitialized('creator') && null !== $object->getCreator()) { + $data['creator'] = $object->getCreator(); + } + if ($object->isInitialized('displayCounts') && null !== $object->getDisplayCounts()) { + $data['display_counts'] = $this->normalizer->normalize($object->getDisplayCounts(), 'json', $context); + } + if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { + $data['enterprise_id'] = $object->getEnterpriseId(); + } + if ($object->isInitialized('hasPins') && null !== $object->getHasPins()) { + $data['has_pins'] = $object->getHasPins(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('internalTeamIds') && null !== $object->getInternalTeamIds()) { + $values_1 = []; + foreach ($object->getInternalTeamIds() as $value_1) { + $values_1[] = $value_1; + } + $data['internal_team_ids'] = $values_1; + } + if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { + $data['is_archived'] = $object->getIsArchived(); + } + if ($object->isInitialized('isChannel') && null !== $object->getIsChannel()) { + $data['is_channel'] = $object->getIsChannel(); + } + if ($object->isInitialized('isExtShared') && null !== $object->getIsExtShared()) { + $data['is_ext_shared'] = $object->getIsExtShared(); + } + if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { + $data['is_frozen'] = $object->getIsFrozen(); + } + if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { + $data['is_general'] = $object->getIsGeneral(); + } + if ($object->isInitialized('isGlobalShared') && null !== $object->getIsGlobalShared()) { + $data['is_global_shared'] = $object->getIsGlobalShared(); + } + if ($object->isInitialized('isGroup') && null !== $object->getIsGroup()) { + $data['is_group'] = $object->getIsGroup(); + } + $data['is_im'] = $object->getIsIm(); + if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { + $data['is_member'] = $object->getIsMember(); + } + if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { + $data['is_moved'] = $object->getIsMoved(); + } + if ($object->isInitialized('isMpim') && null !== $object->getIsMpim()) { + $data['is_mpim'] = $object->getIsMpim(); + } + if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { + $data['is_non_threadable'] = $object->getIsNonThreadable(); + } + if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { + $data['is_open'] = $object->getIsOpen(); + } + if ($object->isInitialized('isOrgDefault') && null !== $object->getIsOrgDefault()) { + $data['is_org_default'] = $object->getIsOrgDefault(); + } + if ($object->isInitialized('isOrgMandatory') && null !== $object->getIsOrgMandatory()) { + $data['is_org_mandatory'] = $object->getIsOrgMandatory(); + } + $data['is_org_shared'] = $object->getIsOrgShared(); + if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { + $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); + } + if ($object->isInitialized('isPrivate') && null !== $object->getIsPrivate()) { + $data['is_private'] = $object->getIsPrivate(); + } + if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { + $data['is_read_only'] = $object->getIsReadOnly(); + } + if ($object->isInitialized('isShared') && null !== $object->getIsShared()) { + $data['is_shared'] = $object->getIsShared(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { + $data['is_thread_only'] = $object->getIsThreadOnly(); + } + if ($object->isInitialized('isUserDeleted') && null !== $object->getIsUserDeleted()) { + $data['is_user_deleted'] = $object->getIsUserDeleted(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $object->getLatest(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + if ($object->isInitialized('members') && null !== $object->getMembers()) { + $values_2 = []; + foreach ($object->getMembers() as $value_2) { + $values_2[] = $value_2; + } + $data['members'] = $values_2; + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('nameNormalized') && null !== $object->getNameNormalized()) { + $data['name_normalized'] = $object->getNameNormalized(); + } + if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { + $data['num_members'] = $object->getNumMembers(); + } + if ($object->isInitialized('parentConversation') && null !== $object->getParentConversation()) { + $data['parent_conversation'] = $object->getParentConversation(); + } + if ($object->isInitialized('pendingConnectedTeamIds') && null !== $object->getPendingConnectedTeamIds()) { + $values_3 = []; + foreach ($object->getPendingConnectedTeamIds() as $value_3) { + $values_3[] = $value_3; + } + $data['pending_connected_team_ids'] = $values_3; + } + if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { + $values_4 = []; + foreach ($object->getPendingShared() as $value_4) { + $values_4[] = $value_4; + } + $data['pending_shared'] = $values_4; + } + if ($object->isInitialized('pinCount') && null !== $object->getPinCount()) { + $data['pin_count'] = $object->getPinCount(); + } + if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { + $values_5 = []; + foreach ($object->getPreviousNames() as $value_5) { + $values_5[] = $value_5; + } + $data['previous_names'] = $values_5; + } + if ($object->isInitialized('priority') && null !== $object->getPriority()) { + $data['priority'] = $object->getPriority(); + } + if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { + $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); + } + if ($object->isInitialized('sharedTeamIds') && null !== $object->getSharedTeamIds()) { + $values_6 = []; + foreach ($object->getSharedTeamIds() as $value_6) { + $values_6[] = $value_6; + } + $data['shared_team_ids'] = $values_6; + } + if ($object->isInitialized('shares') && null !== $object->getShares()) { + $values_7 = []; + foreach ($object->getShares() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['shares'] = $values_7; + } + if ($object->isInitialized('timezoneCount') && null !== $object->getTimezoneCount()) { + $data['timezone_count'] = $object->getTimezoneCount(); + } + if ($object->isInitialized('topic') && null !== $object->getTopic()) { + $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); + } + if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { + $data['unlinked'] = $object->getUnlinked(); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } + if ($object->isInitialized('useCase') && null !== $object->getUseCase()) { + $data['use_case'] = $object->getUseCase(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['version'] = $object->getVersion(); + } + + return $data; } - if (\array_key_exists('use_case', $data) && null !== $data['use_case']) { - $object->setUseCase($data['use_case']); - } elseif (\array_key_exists('use_case', $data) && null === $data['use_case']) { - $object->setUseCase(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false]; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + } +} else { + class ObjsConversationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === $type; } - if (\array_key_exists('version', $data) && null !== $data['version']) { - $object->setVersion($data['version']); - } elseif (\array_key_exists('version', $data) && null === $data['version']) { - $object->setVersion(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversation' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversation(); + if (\array_key_exists('priority', $data) && \is_int($data['priority'])) { + $data['priority'] = (float) $data['priority']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('connected_team_ids', $data) && null !== $data['connected_team_ids']) { + $values = []; + foreach ($data['connected_team_ids'] as $value) { + $values[] = $value; + } + $object->setConnectedTeamIds($values); + } elseif (\array_key_exists('connected_team_ids', $data) && null === $data['connected_team_ids']) { + $object->setConnectedTeamIds(null); + } + if (\array_key_exists('conversation_host_id', $data) && null !== $data['conversation_host_id']) { + $object->setConversationHostId($data['conversation_host_id']); + } elseif (\array_key_exists('conversation_host_id', $data) && null === $data['conversation_host_id']) { + $object->setConversationHostId(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('display_counts', $data) && null !== $data['display_counts']) { + $object->setDisplayCounts($this->denormalizer->denormalize($data['display_counts'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationDisplayCounts', 'json', $context)); + } elseif (\array_key_exists('display_counts', $data) && null === $data['display_counts']) { + $object->setDisplayCounts(null); + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('has_pins', $data) && null !== $data['has_pins']) { + $object->setHasPins($data['has_pins']); + } elseif (\array_key_exists('has_pins', $data) && null === $data['has_pins']) { + $object->setHasPins(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('internal_team_ids', $data) && null !== $data['internal_team_ids']) { + $values_1 = []; + foreach ($data['internal_team_ids'] as $value_1) { + $values_1[] = $value_1; + } + $object->setInternalTeamIds($values_1); + } elseif (\array_key_exists('internal_team_ids', $data) && null === $data['internal_team_ids']) { + $object->setInternalTeamIds(null); + } + if (\array_key_exists('is_archived', $data) && null !== $data['is_archived']) { + $object->setIsArchived($data['is_archived']); + } elseif (\array_key_exists('is_archived', $data) && null === $data['is_archived']) { + $object->setIsArchived(null); + } + if (\array_key_exists('is_channel', $data) && null !== $data['is_channel']) { + $object->setIsChannel($data['is_channel']); + } elseif (\array_key_exists('is_channel', $data) && null === $data['is_channel']) { + $object->setIsChannel(null); + } + if (\array_key_exists('is_ext_shared', $data) && null !== $data['is_ext_shared']) { + $object->setIsExtShared($data['is_ext_shared']); + } elseif (\array_key_exists('is_ext_shared', $data) && null === $data['is_ext_shared']) { + $object->setIsExtShared(null); + } + if (\array_key_exists('is_frozen', $data) && null !== $data['is_frozen']) { + $object->setIsFrozen($data['is_frozen']); + } elseif (\array_key_exists('is_frozen', $data) && null === $data['is_frozen']) { + $object->setIsFrozen(null); + } + if (\array_key_exists('is_general', $data) && null !== $data['is_general']) { + $object->setIsGeneral($data['is_general']); + } elseif (\array_key_exists('is_general', $data) && null === $data['is_general']) { + $object->setIsGeneral(null); + } + if (\array_key_exists('is_global_shared', $data) && null !== $data['is_global_shared']) { + $object->setIsGlobalShared($data['is_global_shared']); + } elseif (\array_key_exists('is_global_shared', $data) && null === $data['is_global_shared']) { + $object->setIsGlobalShared(null); + } + if (\array_key_exists('is_group', $data) && null !== $data['is_group']) { + $object->setIsGroup($data['is_group']); + } elseif (\array_key_exists('is_group', $data) && null === $data['is_group']) { + $object->setIsGroup(null); + } + if (\array_key_exists('is_im', $data) && null !== $data['is_im']) { + $object->setIsIm($data['is_im']); + } elseif (\array_key_exists('is_im', $data) && null === $data['is_im']) { + $object->setIsIm(null); + } + if (\array_key_exists('is_member', $data) && null !== $data['is_member']) { + $object->setIsMember($data['is_member']); + } elseif (\array_key_exists('is_member', $data) && null === $data['is_member']) { + $object->setIsMember(null); + } + if (\array_key_exists('is_moved', $data) && null !== $data['is_moved']) { + $object->setIsMoved($data['is_moved']); + } elseif (\array_key_exists('is_moved', $data) && null === $data['is_moved']) { + $object->setIsMoved(null); + } + if (\array_key_exists('is_mpim', $data) && null !== $data['is_mpim']) { + $object->setIsMpim($data['is_mpim']); + } elseif (\array_key_exists('is_mpim', $data) && null === $data['is_mpim']) { + $object->setIsMpim(null); + } + if (\array_key_exists('is_non_threadable', $data) && null !== $data['is_non_threadable']) { + $object->setIsNonThreadable($data['is_non_threadable']); + } elseif (\array_key_exists('is_non_threadable', $data) && null === $data['is_non_threadable']) { + $object->setIsNonThreadable(null); + } + if (\array_key_exists('is_open', $data) && null !== $data['is_open']) { + $object->setIsOpen($data['is_open']); + } elseif (\array_key_exists('is_open', $data) && null === $data['is_open']) { + $object->setIsOpen(null); + } + if (\array_key_exists('is_org_default', $data) && null !== $data['is_org_default']) { + $object->setIsOrgDefault($data['is_org_default']); + } elseif (\array_key_exists('is_org_default', $data) && null === $data['is_org_default']) { + $object->setIsOrgDefault(null); + } + if (\array_key_exists('is_org_mandatory', $data) && null !== $data['is_org_mandatory']) { + $object->setIsOrgMandatory($data['is_org_mandatory']); + } elseif (\array_key_exists('is_org_mandatory', $data) && null === $data['is_org_mandatory']) { + $object->setIsOrgMandatory(null); + } + if (\array_key_exists('is_org_shared', $data) && null !== $data['is_org_shared']) { + $object->setIsOrgShared($data['is_org_shared']); + } elseif (\array_key_exists('is_org_shared', $data) && null === $data['is_org_shared']) { + $object->setIsOrgShared(null); + } + if (\array_key_exists('is_pending_ext_shared', $data) && null !== $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared($data['is_pending_ext_shared']); + } elseif (\array_key_exists('is_pending_ext_shared', $data) && null === $data['is_pending_ext_shared']) { + $object->setIsPendingExtShared(null); + } + if (\array_key_exists('is_private', $data) && null !== $data['is_private']) { + $object->setIsPrivate($data['is_private']); + } elseif (\array_key_exists('is_private', $data) && null === $data['is_private']) { + $object->setIsPrivate(null); + } + if (\array_key_exists('is_read_only', $data) && null !== $data['is_read_only']) { + $object->setIsReadOnly($data['is_read_only']); + } elseif (\array_key_exists('is_read_only', $data) && null === $data['is_read_only']) { + $object->setIsReadOnly(null); + } + if (\array_key_exists('is_shared', $data) && null !== $data['is_shared']) { + $object->setIsShared($data['is_shared']); + } elseif (\array_key_exists('is_shared', $data) && null === $data['is_shared']) { + $object->setIsShared(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('is_thread_only', $data) && null !== $data['is_thread_only']) { + $object->setIsThreadOnly($data['is_thread_only']); + } elseif (\array_key_exists('is_thread_only', $data) && null === $data['is_thread_only']) { + $object->setIsThreadOnly(null); + } + if (\array_key_exists('is_user_deleted', $data) && null !== $data['is_user_deleted']) { + $object->setIsUserDeleted($data['is_user_deleted']); + } elseif (\array_key_exists('is_user_deleted', $data) && null === $data['is_user_deleted']) { + $object->setIsUserDeleted(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest', $data) && null !== $data['latest']) { + $object->setLatest($data['latest']); + } elseif (\array_key_exists('latest', $data) && null === $data['latest']) { + $object->setLatest(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values_2 = []; + foreach ($data['members'] as $value_2) { + $values_2[] = $value_2; + } + $object->setMembers($values_2); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('name_normalized', $data) && null !== $data['name_normalized']) { + $object->setNameNormalized($data['name_normalized']); + } elseif (\array_key_exists('name_normalized', $data) && null === $data['name_normalized']) { + $object->setNameNormalized(null); + } + if (\array_key_exists('num_members', $data) && null !== $data['num_members']) { + $object->setNumMembers($data['num_members']); + } elseif (\array_key_exists('num_members', $data) && null === $data['num_members']) { + $object->setNumMembers(null); + } + if (\array_key_exists('parent_conversation', $data) && null !== $data['parent_conversation']) { + $object->setParentConversation($data['parent_conversation']); + } elseif (\array_key_exists('parent_conversation', $data) && null === $data['parent_conversation']) { + $object->setParentConversation(null); + } + if (\array_key_exists('pending_connected_team_ids', $data) && null !== $data['pending_connected_team_ids']) { + $values_3 = []; + foreach ($data['pending_connected_team_ids'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPendingConnectedTeamIds($values_3); + } elseif (\array_key_exists('pending_connected_team_ids', $data) && null === $data['pending_connected_team_ids']) { + $object->setPendingConnectedTeamIds(null); + } + if (\array_key_exists('pending_shared', $data) && null !== $data['pending_shared']) { + $values_4 = []; + foreach ($data['pending_shared'] as $value_4) { + $values_4[] = $value_4; + } + $object->setPendingShared($values_4); + } elseif (\array_key_exists('pending_shared', $data) && null === $data['pending_shared']) { + $object->setPendingShared(null); + } + if (\array_key_exists('pin_count', $data) && null !== $data['pin_count']) { + $object->setPinCount($data['pin_count']); + } elseif (\array_key_exists('pin_count', $data) && null === $data['pin_count']) { + $object->setPinCount(null); + } + if (\array_key_exists('previous_names', $data) && null !== $data['previous_names']) { + $values_5 = []; + foreach ($data['previous_names'] as $value_5) { + $values_5[] = $value_5; + } + $object->setPreviousNames($values_5); + } elseif (\array_key_exists('previous_names', $data) && null === $data['previous_names']) { + $object->setPreviousNames(null); + } + if (\array_key_exists('priority', $data) && null !== $data['priority']) { + $object->setPriority($data['priority']); + } elseif (\array_key_exists('priority', $data) && null === $data['priority']) { + $object->setPriority(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($this->denormalizer->denormalize($data['purpose'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose', 'json', $context)); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('shared_team_ids', $data) && null !== $data['shared_team_ids']) { + $values_6 = []; + foreach ($data['shared_team_ids'] as $value_6) { + $values_6[] = $value_6; + } + $object->setSharedTeamIds($values_6); + } elseif (\array_key_exists('shared_team_ids', $data) && null === $data['shared_team_ids']) { + $object->setSharedTeamIds(null); + } + if (\array_key_exists('shares', $data) && null !== $data['shares']) { + $values_7 = []; + foreach ($data['shares'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem', 'json', $context); + } + $object->setShares($values_7); + } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { + $object->setShares(null); + } + if (\array_key_exists('timezone_count', $data) && null !== $data['timezone_count']) { + $object->setTimezoneCount($data['timezone_count']); + } elseif (\array_key_exists('timezone_count', $data) && null === $data['timezone_count']) { + $object->setTimezoneCount(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($this->denormalizer->denormalize($data['topic'], 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic', 'json', $context)); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('unlinked', $data) && null !== $data['unlinked']) { + $object->setUnlinked($data['unlinked']); + } elseif (\array_key_exists('unlinked', $data) && null === $data['unlinked']) { + $object->setUnlinked(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('unread_count_display', $data) && null !== $data['unread_count_display']) { + $object->setUnreadCountDisplay($data['unread_count_display']); + } elseif (\array_key_exists('unread_count_display', $data) && null === $data['unread_count_display']) { + $object->setUnreadCountDisplay(null); + } + if (\array_key_exists('use_case', $data) && null !== $data['use_case']) { + $object->setUseCase($data['use_case']); + } elseif (\array_key_exists('use_case', $data) && null === $data['use_case']) { + $object->setUseCase(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('version', $data) && null !== $data['version']) { + $object->setVersion($data['version']); + } elseif (\array_key_exists('version', $data) && null === $data['version']) { + $object->setVersion(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { - $data['accepted_user'] = $object->getAcceptedUser(); + return $object; } - if ($object->isInitialized('connectedTeamIds') && null !== $object->getConnectedTeamIds()) { - $values = []; - foreach ($object->getConnectedTeamIds() as $value) { - $values[] = $value; + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); } - $data['connected_team_ids'] = $values; - } - if ($object->isInitialized('conversationHostId') && null !== $object->getConversationHostId()) { - $data['conversation_host_id'] = $object->getConversationHostId(); - } - $data['created'] = $object->getCreated(); - if ($object->isInitialized('creator') && null !== $object->getCreator()) { - $data['creator'] = $object->getCreator(); - } - if ($object->isInitialized('displayCounts') && null !== $object->getDisplayCounts()) { - $data['display_counts'] = $this->normalizer->normalize($object->getDisplayCounts(), 'json', $context); - } - if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { - $data['enterprise_id'] = $object->getEnterpriseId(); - } - if ($object->isInitialized('hasPins') && null !== $object->getHasPins()) { - $data['has_pins'] = $object->getHasPins(); - } - $data['id'] = $object->getId(); - if ($object->isInitialized('internalTeamIds') && null !== $object->getInternalTeamIds()) { - $values_1 = []; - foreach ($object->getInternalTeamIds() as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('connectedTeamIds') && null !== $object->getConnectedTeamIds()) { + $values = []; + foreach ($object->getConnectedTeamIds() as $value) { + $values[] = $value; + } + $data['connected_team_ids'] = $values; } - $data['internal_team_ids'] = $values_1; - } - if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { - $data['is_archived'] = $object->getIsArchived(); - } - if ($object->isInitialized('isChannel') && null !== $object->getIsChannel()) { - $data['is_channel'] = $object->getIsChannel(); - } - if ($object->isInitialized('isExtShared') && null !== $object->getIsExtShared()) { - $data['is_ext_shared'] = $object->getIsExtShared(); - } - if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { - $data['is_frozen'] = $object->getIsFrozen(); - } - if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { - $data['is_general'] = $object->getIsGeneral(); - } - if ($object->isInitialized('isGlobalShared') && null !== $object->getIsGlobalShared()) { - $data['is_global_shared'] = $object->getIsGlobalShared(); - } - if ($object->isInitialized('isGroup') && null !== $object->getIsGroup()) { - $data['is_group'] = $object->getIsGroup(); - } - $data['is_im'] = $object->getIsIm(); - if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { - $data['is_member'] = $object->getIsMember(); - } - if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { - $data['is_moved'] = $object->getIsMoved(); - } - if ($object->isInitialized('isMpim') && null !== $object->getIsMpim()) { - $data['is_mpim'] = $object->getIsMpim(); - } - if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { - $data['is_non_threadable'] = $object->getIsNonThreadable(); - } - if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { - $data['is_open'] = $object->getIsOpen(); - } - if ($object->isInitialized('isOrgDefault') && null !== $object->getIsOrgDefault()) { - $data['is_org_default'] = $object->getIsOrgDefault(); - } - if ($object->isInitialized('isOrgMandatory') && null !== $object->getIsOrgMandatory()) { - $data['is_org_mandatory'] = $object->getIsOrgMandatory(); - } - $data['is_org_shared'] = $object->getIsOrgShared(); - if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { - $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); - } - if ($object->isInitialized('isPrivate') && null !== $object->getIsPrivate()) { - $data['is_private'] = $object->getIsPrivate(); - } - if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { - $data['is_read_only'] = $object->getIsReadOnly(); - } - if ($object->isInitialized('isShared') && null !== $object->getIsShared()) { - $data['is_shared'] = $object->getIsShared(); - } - if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { - $data['is_starred'] = $object->getIsStarred(); - } - if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { - $data['is_thread_only'] = $object->getIsThreadOnly(); - } - if ($object->isInitialized('isUserDeleted') && null !== $object->getIsUserDeleted()) { - $data['is_user_deleted'] = $object->getIsUserDeleted(); - } - if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { - $data['last_read'] = $object->getLastRead(); - } - if ($object->isInitialized('latest') && null !== $object->getLatest()) { - $data['latest'] = $object->getLatest(); - } - if ($object->isInitialized('locale') && null !== $object->getLocale()) { - $data['locale'] = $object->getLocale(); - } - if ($object->isInitialized('members') && null !== $object->getMembers()) { - $values_2 = []; - foreach ($object->getMembers() as $value_2) { - $values_2[] = $value_2; + if ($object->isInitialized('conversationHostId') && null !== $object->getConversationHostId()) { + $data['conversation_host_id'] = $object->getConversationHostId(); } - $data['members'] = $values_2; - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('nameNormalized') && null !== $object->getNameNormalized()) { - $data['name_normalized'] = $object->getNameNormalized(); - } - if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { - $data['num_members'] = $object->getNumMembers(); - } - if ($object->isInitialized('parentConversation') && null !== $object->getParentConversation()) { - $data['parent_conversation'] = $object->getParentConversation(); - } - if ($object->isInitialized('pendingConnectedTeamIds') && null !== $object->getPendingConnectedTeamIds()) { - $values_3 = []; - foreach ($object->getPendingConnectedTeamIds() as $value_3) { - $values_3[] = $value_3; + $data['created'] = $object->getCreated(); + if ($object->isInitialized('creator') && null !== $object->getCreator()) { + $data['creator'] = $object->getCreator(); } - $data['pending_connected_team_ids'] = $values_3; - } - if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { - $values_4 = []; - foreach ($object->getPendingShared() as $value_4) { - $values_4[] = $value_4; + if ($object->isInitialized('displayCounts') && null !== $object->getDisplayCounts()) { + $data['display_counts'] = $this->normalizer->normalize($object->getDisplayCounts(), 'json', $context); } - $data['pending_shared'] = $values_4; - } - if ($object->isInitialized('pinCount') && null !== $object->getPinCount()) { - $data['pin_count'] = $object->getPinCount(); - } - if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { - $values_5 = []; - foreach ($object->getPreviousNames() as $value_5) { - $values_5[] = $value_5; + if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { + $data['enterprise_id'] = $object->getEnterpriseId(); } - $data['previous_names'] = $values_5; - } - if ($object->isInitialized('priority') && null !== $object->getPriority()) { - $data['priority'] = $object->getPriority(); - } - if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { - $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); - } - if ($object->isInitialized('sharedTeamIds') && null !== $object->getSharedTeamIds()) { - $values_6 = []; - foreach ($object->getSharedTeamIds() as $value_6) { - $values_6[] = $value_6; + if ($object->isInitialized('hasPins') && null !== $object->getHasPins()) { + $data['has_pins'] = $object->getHasPins(); } - $data['shared_team_ids'] = $values_6; - } - if ($object->isInitialized('shares') && null !== $object->getShares()) { - $values_7 = []; - foreach ($object->getShares() as $value_7) { - $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + $data['id'] = $object->getId(); + if ($object->isInitialized('internalTeamIds') && null !== $object->getInternalTeamIds()) { + $values_1 = []; + foreach ($object->getInternalTeamIds() as $value_1) { + $values_1[] = $value_1; + } + $data['internal_team_ids'] = $values_1; + } + if ($object->isInitialized('isArchived') && null !== $object->getIsArchived()) { + $data['is_archived'] = $object->getIsArchived(); + } + if ($object->isInitialized('isChannel') && null !== $object->getIsChannel()) { + $data['is_channel'] = $object->getIsChannel(); + } + if ($object->isInitialized('isExtShared') && null !== $object->getIsExtShared()) { + $data['is_ext_shared'] = $object->getIsExtShared(); + } + if ($object->isInitialized('isFrozen') && null !== $object->getIsFrozen()) { + $data['is_frozen'] = $object->getIsFrozen(); + } + if ($object->isInitialized('isGeneral') && null !== $object->getIsGeneral()) { + $data['is_general'] = $object->getIsGeneral(); + } + if ($object->isInitialized('isGlobalShared') && null !== $object->getIsGlobalShared()) { + $data['is_global_shared'] = $object->getIsGlobalShared(); + } + if ($object->isInitialized('isGroup') && null !== $object->getIsGroup()) { + $data['is_group'] = $object->getIsGroup(); + } + $data['is_im'] = $object->getIsIm(); + if ($object->isInitialized('isMember') && null !== $object->getIsMember()) { + $data['is_member'] = $object->getIsMember(); + } + if ($object->isInitialized('isMoved') && null !== $object->getIsMoved()) { + $data['is_moved'] = $object->getIsMoved(); + } + if ($object->isInitialized('isMpim') && null !== $object->getIsMpim()) { + $data['is_mpim'] = $object->getIsMpim(); + } + if ($object->isInitialized('isNonThreadable') && null !== $object->getIsNonThreadable()) { + $data['is_non_threadable'] = $object->getIsNonThreadable(); + } + if ($object->isInitialized('isOpen') && null !== $object->getIsOpen()) { + $data['is_open'] = $object->getIsOpen(); + } + if ($object->isInitialized('isOrgDefault') && null !== $object->getIsOrgDefault()) { + $data['is_org_default'] = $object->getIsOrgDefault(); + } + if ($object->isInitialized('isOrgMandatory') && null !== $object->getIsOrgMandatory()) { + $data['is_org_mandatory'] = $object->getIsOrgMandatory(); + } + $data['is_org_shared'] = $object->getIsOrgShared(); + if ($object->isInitialized('isPendingExtShared') && null !== $object->getIsPendingExtShared()) { + $data['is_pending_ext_shared'] = $object->getIsPendingExtShared(); + } + if ($object->isInitialized('isPrivate') && null !== $object->getIsPrivate()) { + $data['is_private'] = $object->getIsPrivate(); + } + if ($object->isInitialized('isReadOnly') && null !== $object->getIsReadOnly()) { + $data['is_read_only'] = $object->getIsReadOnly(); + } + if ($object->isInitialized('isShared') && null !== $object->getIsShared()) { + $data['is_shared'] = $object->getIsShared(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('isThreadOnly') && null !== $object->getIsThreadOnly()) { + $data['is_thread_only'] = $object->getIsThreadOnly(); + } + if ($object->isInitialized('isUserDeleted') && null !== $object->getIsUserDeleted()) { + $data['is_user_deleted'] = $object->getIsUserDeleted(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latest') && null !== $object->getLatest()) { + $data['latest'] = $object->getLatest(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + if ($object->isInitialized('members') && null !== $object->getMembers()) { + $values_2 = []; + foreach ($object->getMembers() as $value_2) { + $values_2[] = $value_2; + } + $data['members'] = $values_2; + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('nameNormalized') && null !== $object->getNameNormalized()) { + $data['name_normalized'] = $object->getNameNormalized(); + } + if ($object->isInitialized('numMembers') && null !== $object->getNumMembers()) { + $data['num_members'] = $object->getNumMembers(); + } + if ($object->isInitialized('parentConversation') && null !== $object->getParentConversation()) { + $data['parent_conversation'] = $object->getParentConversation(); + } + if ($object->isInitialized('pendingConnectedTeamIds') && null !== $object->getPendingConnectedTeamIds()) { + $values_3 = []; + foreach ($object->getPendingConnectedTeamIds() as $value_3) { + $values_3[] = $value_3; + } + $data['pending_connected_team_ids'] = $values_3; + } + if ($object->isInitialized('pendingShared') && null !== $object->getPendingShared()) { + $values_4 = []; + foreach ($object->getPendingShared() as $value_4) { + $values_4[] = $value_4; + } + $data['pending_shared'] = $values_4; + } + if ($object->isInitialized('pinCount') && null !== $object->getPinCount()) { + $data['pin_count'] = $object->getPinCount(); + } + if ($object->isInitialized('previousNames') && null !== $object->getPreviousNames()) { + $values_5 = []; + foreach ($object->getPreviousNames() as $value_5) { + $values_5[] = $value_5; + } + $data['previous_names'] = $values_5; + } + if ($object->isInitialized('priority') && null !== $object->getPriority()) { + $data['priority'] = $object->getPriority(); + } + if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { + $data['purpose'] = $this->normalizer->normalize($object->getPurpose(), 'json', $context); + } + if ($object->isInitialized('sharedTeamIds') && null !== $object->getSharedTeamIds()) { + $values_6 = []; + foreach ($object->getSharedTeamIds() as $value_6) { + $values_6[] = $value_6; + } + $data['shared_team_ids'] = $values_6; + } + if ($object->isInitialized('shares') && null !== $object->getShares()) { + $values_7 = []; + foreach ($object->getShares() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['shares'] = $values_7; + } + if ($object->isInitialized('timezoneCount') && null !== $object->getTimezoneCount()) { + $data['timezone_count'] = $object->getTimezoneCount(); + } + if ($object->isInitialized('topic') && null !== $object->getTopic()) { + $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); + } + if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { + $data['unlinked'] = $object->getUnlinked(); + } + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { + $data['unread_count_display'] = $object->getUnreadCountDisplay(); + } + if ($object->isInitialized('useCase') && null !== $object->getUseCase()) { + $data['use_case'] = $object->getUseCase(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['version'] = $object->getVersion(); } - $data['shares'] = $values_7; - } - if ($object->isInitialized('timezoneCount') && null !== $object->getTimezoneCount()) { - $data['timezone_count'] = $object->getTimezoneCount(); - } - if ($object->isInitialized('topic') && null !== $object->getTopic()) { - $data['topic'] = $this->normalizer->normalize($object->getTopic(), 'json', $context); - } - if ($object->isInitialized('unlinked') && null !== $object->getUnlinked()) { - $data['unlinked'] = $object->getUnlinked(); - } - if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { - $data['unread_count'] = $object->getUnreadCount(); - } - if ($object->isInitialized('unreadCountDisplay') && null !== $object->getUnreadCountDisplay()) { - $data['unread_count_display'] = $object->getUnreadCountDisplay(); - } - if ($object->isInitialized('useCase') && null !== $object->getUseCase()) { - $data['use_case'] = $object->getUseCase(); - } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); - } - if ($object->isInitialized('version') && null !== $object->getVersion()) { - $data['version'] = $object->getVersion(); - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversation' => false]; + } } } diff --git a/generated/Normalizer/ObjsConversationPurposeNormalizer.php b/generated/Normalizer/ObjsConversationPurposeNormalizer.php index 5dbc0992..465689a8 100644 --- a/generated/Normalizer/ObjsConversationPurposeNormalizer.php +++ b/generated/Normalizer/ObjsConversationPurposeNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsConversationPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsConversationPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsConversationPurpose(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationPurpose(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false]; } - if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { - $object->setLastSet($data['last_set']); - } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { - $object->setLastSet(null); + } +} else { + class ObjsConversationPurposeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === $type; } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationPurpose(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['creator'] = $object->getCreator(); - $data['last_set'] = $object->getLastSet(); - $data['value'] = $object->getValue(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationPurpose' => false]; + } } } diff --git a/generated/Normalizer/ObjsConversationSharesItemNormalizer.php b/generated/Normalizer/ObjsConversationSharesItemNormalizer.php index c485cc0e..ea798dbf 100644 --- a/generated/Normalizer/ObjsConversationSharesItemNormalizer.php +++ b/generated/Normalizer/ObjsConversationSharesItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,97 +24,191 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsConversationSharesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsConversationSharesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsConversationSharesItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationSharesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_active', $data) && null !== $data['is_active']) { + $object->setIsActive($data['is_active']); + } elseif (\array_key_exists('is_active', $data) && null === $data['is_active']) { + $object->setIsActive(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { - $object->setAcceptedUser($data['accepted_user']); - } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { - $object->setAcceptedUser(null); - } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_active', $data) && null !== $data['is_active']) { - $object->setIsActive($data['is_active']); - } elseif (\array_key_exists('is_active', $data) && null === $data['is_active']) { - $object->setIsActive(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); + } + $data['date_create'] = $object->getDateCreate(); + $data['id'] = $object->getId(); + $data['is_active'] = $object->getIsActive(); + $data['name'] = $object->getName(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + + return $data; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class ObjsConversationSharesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationSharesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('accepted_user', $data) && null !== $data['accepted_user']) { + $object->setAcceptedUser($data['accepted_user']); + } elseif (\array_key_exists('accepted_user', $data) && null === $data['accepted_user']) { + $object->setAcceptedUser(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_active', $data) && null !== $data['is_active']) { + $object->setIsActive($data['is_active']); + } elseif (\array_key_exists('is_active', $data) && null === $data['is_active']) { + $object->setIsActive(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { - $data['accepted_user'] = $object->getAcceptedUser(); - } - $data['date_create'] = $object->getDateCreate(); - $data['id'] = $object->getId(); - $data['is_active'] = $object->getIsActive(); - $data['name'] = $object->getName(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('acceptedUser') && null !== $object->getAcceptedUser()) { + $data['accepted_user'] = $object->getAcceptedUser(); + } + $data['date_create'] = $object->getDateCreate(); + $data['id'] = $object->getId(); + $data['is_active'] = $object->getIsActive(); + $data['name'] = $object->getName(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationSharesItem' => false]; + } } } diff --git a/generated/Normalizer/ObjsConversationTopicNormalizer.php b/generated/Normalizer/ObjsConversationTopicNormalizer.php index 40d20734..17f29c29 100644 --- a/generated/Normalizer/ObjsConversationTopicNormalizer.php +++ b/generated/Normalizer/ObjsConversationTopicNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsConversationTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsConversationTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsConversationTopic(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationTopic(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false]; } - if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { - $object->setLastSet($data['last_set']); - } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { - $object->setLastSet(null); + } +} else { + class ObjsConversationTopicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === $type; } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsConversationTopic(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('last_set', $data) && null !== $data['last_set']) { + $object->setLastSet($data['last_set']); + } elseif (\array_key_exists('last_set', $data) && null === $data['last_set']) { + $object->setLastSet(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['creator'] = $object->getCreator(); - $data['last_set'] = $object->getLastSet(); - $data['value'] = $object->getValue(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['creator'] = $object->getCreator(); + $data['last_set'] = $object->getLastSet(); + $data['value'] = $object->getValue(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsConversationTopic' => false]; + } } } diff --git a/generated/Normalizer/ObjsEnterpriseUserNormalizer.php b/generated/Normalizer/ObjsEnterpriseUserNormalizer.php index 6cd51960..9c0c1fd7 100644 --- a/generated/Normalizer/ObjsEnterpriseUserNormalizer.php +++ b/generated/Normalizer/ObjsEnterpriseUserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsEnterpriseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsEnterpriseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsEnterpriseUser(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsEnterpriseUser(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { + $object->setEnterpriseName($data['enterprise_name']); + } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { + $object->setEnterpriseName(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { + $object->setIsAdmin($data['is_admin']); + } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { + $object->setIsAdmin(null); + } + if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { + $object->setIsOwner($data['is_owner']); + } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { + $object->setIsOwner(null); + } + if (\array_key_exists('teams', $data) && null !== $data['teams']) { + $values = []; + foreach ($data['teams'] as $value) { + $values[] = $value; + } + $object->setTeams($values); + } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { + $object->setTeams(null); + } + return $object; } - if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { - $object->setEnterpriseId($data['enterprise_id']); - } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { - $object->setEnterpriseId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['enterprise_id'] = $object->getEnterpriseId(); + $data['enterprise_name'] = $object->getEnterpriseName(); + $data['id'] = $object->getId(); + $data['is_admin'] = $object->getIsAdmin(); + $data['is_owner'] = $object->getIsOwner(); + $values = []; + foreach ($object->getTeams() as $value) { + $values[] = $value; + } + $data['teams'] = $values; + + return $data; } - if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { - $object->setEnterpriseName($data['enterprise_name']); - } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { - $object->setEnterpriseName(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false]; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + } +} else { + class ObjsEnterpriseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === $type; } - if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { - $object->setIsAdmin($data['is_admin']); - } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { - $object->setIsAdmin(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' === \get_class($data); } - if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { - $object->setIsOwner($data['is_owner']); - } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { - $object->setIsOwner(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsEnterpriseUser(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { + $object->setEnterpriseName($data['enterprise_name']); + } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { + $object->setEnterpriseName(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { + $object->setIsAdmin($data['is_admin']); + } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { + $object->setIsAdmin(null); + } + if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { + $object->setIsOwner($data['is_owner']); + } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { + $object->setIsOwner(null); + } + if (\array_key_exists('teams', $data) && null !== $data['teams']) { + $values = []; + foreach ($data['teams'] as $value) { + $values[] = $value; + } + $object->setTeams($values); + } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { + $object->setTeams(null); + } + + return $object; } - if (\array_key_exists('teams', $data) && null !== $data['teams']) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['enterprise_id'] = $object->getEnterpriseId(); + $data['enterprise_name'] = $object->getEnterpriseName(); + $data['id'] = $object->getId(); + $data['is_admin'] = $object->getIsAdmin(); + $data['is_owner'] = $object->getIsOwner(); $values = []; - foreach ($data['teams'] as $value) { + foreach ($object->getTeams() as $value) { $values[] = $value; } - $object->setTeams($values); - } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { - $object->setTeams(null); - } - - return $object; - } + $data['teams'] = $values; - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['enterprise_id'] = $object->getEnterpriseId(); - $data['enterprise_name'] = $object->getEnterpriseName(); - $data['id'] = $object->getId(); - $data['is_admin'] = $object->getIsAdmin(); - $data['is_owner'] = $object->getIsOwner(); - $values = []; - foreach ($object->getTeams() as $value) { - $values[] = $value; + return $data; } - $data['teams'] = $values; - - return $data; - } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser' => false]; + } } } diff --git a/generated/Normalizer/ObjsExternalOrgMigrationsCurrentItemNormalizer.php b/generated/Normalizer/ObjsExternalOrgMigrationsCurrentItemNormalizer.php index 9dc3e79e..9780e4e4 100644 --- a/generated/Normalizer/ObjsExternalOrgMigrationsCurrentItemNormalizer.php +++ b/generated/Normalizer/ObjsExternalOrgMigrationsCurrentItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsExternalOrgMigrationsCurrentItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsExternalOrgMigrationsCurrentItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrationsCurrentItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrationsCurrentItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('date_started', $data) && null !== $data['date_started']) { + $object->setDateStarted($data['date_started']); + } elseif (\array_key_exists('date_started', $data) && null === $data['date_started']) { + $object->setDateStarted(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + return $object; } - if (\array_key_exists('date_started', $data) && null !== $data['date_started']) { - $object->setDateStarted($data['date_started']); - } elseif (\array_key_exists('date_started', $data) && null === $data['date_started']) { - $object->setDateStarted(null); - } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['date_started'] = $object->getDateStarted(); + $data['team_id'] = $object->getTeamId(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsExternalOrgMigrationsCurrentItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['date_started'] = $object->getDateStarted(); - $data['team_id'] = $object->getTeamId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrationsCurrentItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('date_started', $data) && null !== $data['date_started']) { + $object->setDateStarted($data['date_started']); + } elseif (\array_key_exists('date_started', $data) && null === $data['date_started']) { + $object->setDateStarted(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['date_started'] = $object->getDateStarted(); + $data['team_id'] = $object->getTeamId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem' => false]; + } } } diff --git a/generated/Normalizer/ObjsExternalOrgMigrationsNormalizer.php b/generated/Normalizer/ObjsExternalOrgMigrationsNormalizer.php index 6bc34814..27a0357f 100644 --- a/generated/Normalizer/ObjsExternalOrgMigrationsNormalizer.php +++ b/generated/Normalizer/ObjsExternalOrgMigrationsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsExternalOrgMigrationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsExternalOrgMigrationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrations(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrations(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('current', $data) && null !== $data['current']) { + $values = []; + foreach ($data['current'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem', 'json', $context); + } + $object->setCurrent($values); + } elseif (\array_key_exists('current', $data) && null === $data['current']) { + $object->setCurrent(null); + } + if (\array_key_exists('date_updated', $data) && null !== $data['date_updated']) { + $object->setDateUpdated($data['date_updated']); + } elseif (\array_key_exists('date_updated', $data) && null === $data['date_updated']) { + $object->setDateUpdated(null); + } + return $object; } - if (\array_key_exists('current', $data) && null !== $data['current']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['current'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem', 'json', $context); + foreach ($object->getCurrent() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setCurrent($values); - } elseif (\array_key_exists('current', $data) && null === $data['current']) { - $object->setCurrent(null); - } - if (\array_key_exists('date_updated', $data) && null !== $data['date_updated']) { - $object->setDateUpdated($data['date_updated']); - } elseif (\array_key_exists('date_updated', $data) && null === $data['date_updated']) { - $object->setDateUpdated(null); + $data['current'] = $values; + $data['date_updated'] = $object->getDateUpdated(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsExternalOrgMigrationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getCurrent() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === $type; } - $data['current'] = $values; - $data['date_updated'] = $object->getDateUpdated(); - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsExternalOrgMigrations(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('current', $data) && null !== $data['current']) { + $values = []; + foreach ($data['current'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrationsCurrentItem', 'json', $context); + } + $object->setCurrent($values); + } elseif (\array_key_exists('current', $data) && null === $data['current']) { + $object->setCurrent(null); + } + if (\array_key_exists('date_updated', $data) && null !== $data['date_updated']) { + $object->setDateUpdated($data['date_updated']); + } elseif (\array_key_exists('date_updated', $data) && null === $data['date_updated']) { + $object->setDateUpdated(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getCurrent() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['current'] = $values; + $data['date_updated'] = $object->getDateUpdated(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations' => false]; + } } } diff --git a/generated/Normalizer/ObjsFileNormalizer.php b/generated/Normalizer/ObjsFileNormalizer.php index 2c84238f..5f433ed4 100644 --- a/generated/Normalizer/ObjsFileNormalizer.php +++ b/generated/Normalizer/ObjsFileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,687 +24,1371 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsFile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $value; + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('comments_count', $data) && null !== $data['comments_count']) { + $object->setCommentsCount($data['comments_count']); + } elseif (\array_key_exists('comments_count', $data) && null === $data['comments_count']) { + $object->setCommentsCount(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { + $object->setDateDelete($data['date_delete']); + } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { + $object->setDateDelete(null); + } + if (\array_key_exists('deanimate_gif', $data) && null !== $data['deanimate_gif']) { + $object->setDeanimateGif($data['deanimate_gif']); + } elseif (\array_key_exists('deanimate_gif', $data) && null === $data['deanimate_gif']) { + $object->setDeanimateGif(null); + } + if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { + $object->setDisplayAsBot($data['display_as_bot']); + } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { + $object->setDisplayAsBot(null); + } + if (\array_key_exists('editable', $data) && null !== $data['editable']) { + $object->setEditable($data['editable']); + } elseif (\array_key_exists('editable', $data) && null === $data['editable']) { + $object->setEditable(null); + } + if (\array_key_exists('editor', $data) && null !== $data['editor']) { + $object->setEditor($data['editor']); + } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { + $object->setEditor(null); + } + if (\array_key_exists('external_id', $data) && null !== $data['external_id']) { + $object->setExternalId($data['external_id']); + } elseif (\array_key_exists('external_id', $data) && null === $data['external_id']) { + $object->setExternalId(null); + } + if (\array_key_exists('external_type', $data) && null !== $data['external_type']) { + $object->setExternalType($data['external_type']); + } elseif (\array_key_exists('external_type', $data) && null === $data['external_type']) { + $object->setExternalType(null); + } + if (\array_key_exists('external_url', $data) && null !== $data['external_url']) { + $object->setExternalUrl($data['external_url']); + } elseif (\array_key_exists('external_url', $data) && null === $data['external_url']) { + $object->setExternalUrl(null); + } + if (\array_key_exists('filetype', $data) && null !== $data['filetype']) { + $object->setFiletype($data['filetype']); + } elseif (\array_key_exists('filetype', $data) && null === $data['filetype']) { + $object->setFiletype(null); + } + if (\array_key_exists('groups', $data) && null !== $data['groups']) { + $values_1 = []; + foreach ($data['groups'] as $value_1) { + $values_1[] = $value_1; + } + $object->setGroups($values_1); + } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { + $object->setGroups(null); + } + if (\array_key_exists('has_rich_preview', $data) && null !== $data['has_rich_preview']) { + $object->setHasRichPreview($data['has_rich_preview']); + } elseif (\array_key_exists('has_rich_preview', $data) && null === $data['has_rich_preview']) { + $object->setHasRichPreview(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_exif_rotation', $data) && null !== $data['image_exif_rotation']) { + $object->setImageExifRotation($data['image_exif_rotation']); + } elseif (\array_key_exists('image_exif_rotation', $data) && null === $data['image_exif_rotation']) { + $object->setImageExifRotation(null); + } + if (\array_key_exists('ims', $data) && null !== $data['ims']) { + $values_2 = []; + foreach ($data['ims'] as $value_2) { + $values_2[] = $value_2; + } + $object->setIms($values_2); + } elseif (\array_key_exists('ims', $data) && null === $data['ims']) { + $object->setIms(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_public', $data) && null !== $data['is_public']) { + $object->setIsPublic($data['is_public']); + } elseif (\array_key_exists('is_public', $data) && null === $data['is_public']) { + $object->setIsPublic(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('is_tombstoned', $data) && null !== $data['is_tombstoned']) { + $object->setIsTombstoned($data['is_tombstoned']); + } elseif (\array_key_exists('is_tombstoned', $data) && null === $data['is_tombstoned']) { + $object->setIsTombstoned(null); + } + if (\array_key_exists('last_editor', $data) && null !== $data['last_editor']) { + $object->setLastEditor($data['last_editor']); + } elseif (\array_key_exists('last_editor', $data) && null === $data['last_editor']) { + $object->setLastEditor(null); + } + if (\array_key_exists('mimetype', $data) && null !== $data['mimetype']) { + $object->setMimetype($data['mimetype']); + } elseif (\array_key_exists('mimetype', $data) && null === $data['mimetype']) { + $object->setMimetype(null); + } + if (\array_key_exists('mode', $data) && null !== $data['mode']) { + $object->setMode($data['mode']); + } elseif (\array_key_exists('mode', $data) && null === $data['mode']) { + $object->setMode(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('non_owner_editable', $data) && null !== $data['non_owner_editable']) { + $object->setNonOwnerEditable($data['non_owner_editable']); + } elseif (\array_key_exists('non_owner_editable', $data) && null === $data['non_owner_editable']) { + $object->setNonOwnerEditable(null); + } + if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { + $object->setNumStars($data['num_stars']); + } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { + $object->setNumStars(null); + } + if (\array_key_exists('original_h', $data) && null !== $data['original_h']) { + $object->setOriginalH($data['original_h']); + } elseif (\array_key_exists('original_h', $data) && null === $data['original_h']) { + $object->setOriginalH(null); + } + if (\array_key_exists('original_w', $data) && null !== $data['original_w']) { + $object->setOriginalW($data['original_w']); + } elseif (\array_key_exists('original_w', $data) && null === $data['original_w']) { + $object->setOriginalW(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } + if (\array_key_exists('permalink_public', $data) && null !== $data['permalink_public']) { + $object->setPermalinkPublic($data['permalink_public']); + } elseif (\array_key_exists('permalink_public', $data) && null === $data['permalink_public']) { + $object->setPermalinkPublic(null); + } + if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { + $object->setPinnedInfo($data['pinned_info']); + } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { + $object->setPinnedInfo(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values_3 = []; + foreach ($data['pinned_to'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPinnedTo($values_3); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); + } + if (\array_key_exists('pjpeg', $data) && null !== $data['pjpeg']) { + $object->setPjpeg($data['pjpeg']); + } elseif (\array_key_exists('pjpeg', $data) && null === $data['pjpeg']) { + $object->setPjpeg(null); + } + if (\array_key_exists('pretty_type', $data) && null !== $data['pretty_type']) { + $object->setPrettyType($data['pretty_type']); + } elseif (\array_key_exists('pretty_type', $data) && null === $data['pretty_type']) { + $object->setPrettyType(null); + } + if (\array_key_exists('preview', $data) && null !== $data['preview']) { + $object->setPreview($data['preview']); + } elseif (\array_key_exists('preview', $data) && null === $data['preview']) { + $object->setPreview(null); + } + if (\array_key_exists('public_url_shared', $data) && null !== $data['public_url_shared']) { + $object->setPublicUrlShared($data['public_url_shared']); + } elseif (\array_key_exists('public_url_shared', $data) && null === $data['public_url_shared']) { + $object->setPublicUrlShared(null); + } + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_4 = []; + foreach ($data['reactions'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_4); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('shares', $data) && null !== $data['shares']) { + $object->setShares($this->denormalizer->denormalize($data['shares'], 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares', 'json', $context)); + } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { + $object->setShares(null); + } + if (\array_key_exists('size', $data) && null !== $data['size']) { + $object->setSize($data['size']); + } elseif (\array_key_exists('size', $data) && null === $data['size']) { + $object->setSize(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('state', $data) && null !== $data['state']) { + $object->setState($data['state']); + } elseif (\array_key_exists('state', $data) && null === $data['state']) { + $object->setState(null); + } + if (\array_key_exists('thumb_1024', $data) && null !== $data['thumb_1024']) { + $object->setThumb1024($data['thumb_1024']); + } elseif (\array_key_exists('thumb_1024', $data) && null === $data['thumb_1024']) { + $object->setThumb1024(null); + } + if (\array_key_exists('thumb_1024_h', $data) && null !== $data['thumb_1024_h']) { + $object->setThumb1024H($data['thumb_1024_h']); + } elseif (\array_key_exists('thumb_1024_h', $data) && null === $data['thumb_1024_h']) { + $object->setThumb1024H(null); + } + if (\array_key_exists('thumb_1024_w', $data) && null !== $data['thumb_1024_w']) { + $object->setThumb1024W($data['thumb_1024_w']); + } elseif (\array_key_exists('thumb_1024_w', $data) && null === $data['thumb_1024_w']) { + $object->setThumb1024W(null); + } + if (\array_key_exists('thumb_160', $data) && null !== $data['thumb_160']) { + $object->setThumb160($data['thumb_160']); + } elseif (\array_key_exists('thumb_160', $data) && null === $data['thumb_160']) { + $object->setThumb160(null); + } + if (\array_key_exists('thumb_360', $data) && null !== $data['thumb_360']) { + $object->setThumb360($data['thumb_360']); + } elseif (\array_key_exists('thumb_360', $data) && null === $data['thumb_360']) { + $object->setThumb360(null); + } + if (\array_key_exists('thumb_360_gif', $data) && null !== $data['thumb_360_gif']) { + $object->setThumb360Gif($data['thumb_360_gif']); + } elseif (\array_key_exists('thumb_360_gif', $data) && null === $data['thumb_360_gif']) { + $object->setThumb360Gif(null); + } + if (\array_key_exists('thumb_360_h', $data) && null !== $data['thumb_360_h']) { + $object->setThumb360H($data['thumb_360_h']); + } elseif (\array_key_exists('thumb_360_h', $data) && null === $data['thumb_360_h']) { + $object->setThumb360H(null); + } + if (\array_key_exists('thumb_360_w', $data) && null !== $data['thumb_360_w']) { + $object->setThumb360W($data['thumb_360_w']); + } elseif (\array_key_exists('thumb_360_w', $data) && null === $data['thumb_360_w']) { + $object->setThumb360W(null); + } + if (\array_key_exists('thumb_480', $data) && null !== $data['thumb_480']) { + $object->setThumb480($data['thumb_480']); + } elseif (\array_key_exists('thumb_480', $data) && null === $data['thumb_480']) { + $object->setThumb480(null); + } + if (\array_key_exists('thumb_480_h', $data) && null !== $data['thumb_480_h']) { + $object->setThumb480H($data['thumb_480_h']); + } elseif (\array_key_exists('thumb_480_h', $data) && null === $data['thumb_480_h']) { + $object->setThumb480H(null); + } + if (\array_key_exists('thumb_480_w', $data) && null !== $data['thumb_480_w']) { + $object->setThumb480W($data['thumb_480_w']); + } elseif (\array_key_exists('thumb_480_w', $data) && null === $data['thumb_480_w']) { + $object->setThumb480W(null); + } + if (\array_key_exists('thumb_64', $data) && null !== $data['thumb_64']) { + $object->setThumb64($data['thumb_64']); + } elseif (\array_key_exists('thumb_64', $data) && null === $data['thumb_64']) { + $object->setThumb64(null); + } + if (\array_key_exists('thumb_720', $data) && null !== $data['thumb_720']) { + $object->setThumb720($data['thumb_720']); + } elseif (\array_key_exists('thumb_720', $data) && null === $data['thumb_720']) { + $object->setThumb720(null); + } + if (\array_key_exists('thumb_720_h', $data) && null !== $data['thumb_720_h']) { + $object->setThumb720H($data['thumb_720_h']); + } elseif (\array_key_exists('thumb_720_h', $data) && null === $data['thumb_720_h']) { + $object->setThumb720H(null); + } + if (\array_key_exists('thumb_720_w', $data) && null !== $data['thumb_720_w']) { + $object->setThumb720W($data['thumb_720_w']); + } elseif (\array_key_exists('thumb_720_w', $data) && null === $data['thumb_720_w']) { + $object->setThumb720W(null); + } + if (\array_key_exists('thumb_80', $data) && null !== $data['thumb_80']) { + $object->setThumb80($data['thumb_80']); + } elseif (\array_key_exists('thumb_80', $data) && null === $data['thumb_80']) { + $object->setThumb80(null); + } + if (\array_key_exists('thumb_800', $data) && null !== $data['thumb_800']) { + $object->setThumb800($data['thumb_800']); + } elseif (\array_key_exists('thumb_800', $data) && null === $data['thumb_800']) { + $object->setThumb800(null); + } + if (\array_key_exists('thumb_800_h', $data) && null !== $data['thumb_800_h']) { + $object->setThumb800H($data['thumb_800_h']); + } elseif (\array_key_exists('thumb_800_h', $data) && null === $data['thumb_800_h']) { + $object->setThumb800H(null); + } + if (\array_key_exists('thumb_800_w', $data) && null !== $data['thumb_800_w']) { + $object->setThumb800W($data['thumb_800_w']); + } elseif (\array_key_exists('thumb_800_w', $data) && null === $data['thumb_800_w']) { + $object->setThumb800W(null); + } + if (\array_key_exists('thumb_960', $data) && null !== $data['thumb_960']) { + $object->setThumb960($data['thumb_960']); + } elseif (\array_key_exists('thumb_960', $data) && null === $data['thumb_960']) { + $object->setThumb960(null); + } + if (\array_key_exists('thumb_960_h', $data) && null !== $data['thumb_960_h']) { + $object->setThumb960H($data['thumb_960_h']); + } elseif (\array_key_exists('thumb_960_h', $data) && null === $data['thumb_960_h']) { + $object->setThumb960H(null); + } + if (\array_key_exists('thumb_960_w', $data) && null !== $data['thumb_960_w']) { + $object->setThumb960W($data['thumb_960_w']); + } elseif (\array_key_exists('thumb_960_w', $data) && null === $data['thumb_960_w']) { + $object->setThumb960W(null); + } + if (\array_key_exists('thumb_tiny', $data) && null !== $data['thumb_tiny']) { + $object->setThumbTiny($data['thumb_tiny']); + } elseif (\array_key_exists('thumb_tiny', $data) && null === $data['thumb_tiny']) { + $object->setThumbTiny(null); + } + if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { + $value_5 = $data['timestamp']; + if (\is_int($data['timestamp'])) { + $value_5 = $data['timestamp']; + } elseif (\is_string($data['timestamp'])) { + $value_5 = $data['timestamp']; + } + $object->setTimestamp($value_5); + } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { + $object->setTimestamp(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('url_private', $data) && null !== $data['url_private']) { + $object->setUrlPrivate($data['url_private']); + } elseif (\array_key_exists('url_private', $data) && null === $data['url_private']) { + $object->setUrlPrivate(null); + } + if (\array_key_exists('url_private_download', $data) && null !== $data['url_private_download']) { + $object->setUrlPrivateDownload($data['url_private_download']); + } elseif (\array_key_exists('url_private_download', $data) && null === $data['url_private_download']) { + $object->setUrlPrivateDownload(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + return $object; } - if (\array_key_exists('channels', $data) && null !== $data['channels']) { - $values = []; - foreach ($data['channels'] as $value) { - $values[] = $value; - } - $object->setChannels($values); - } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { - $object->setChannels(null); - } - if (\array_key_exists('comments_count', $data) && null !== $data['comments_count']) { - $object->setCommentsCount($data['comments_count']); - } elseif (\array_key_exists('comments_count', $data) && null === $data['comments_count']) { - $object->setCommentsCount(null); - } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { - $object->setDateDelete($data['date_delete']); - } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { - $object->setDateDelete(null); - } - if (\array_key_exists('deanimate_gif', $data) && null !== $data['deanimate_gif']) { - $object->setDeanimateGif($data['deanimate_gif']); - } elseif (\array_key_exists('deanimate_gif', $data) && null === $data['deanimate_gif']) { - $object->setDeanimateGif(null); - } - if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { - $object->setDisplayAsBot($data['display_as_bot']); - } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { - $object->setDisplayAsBot(null); - } - if (\array_key_exists('editable', $data) && null !== $data['editable']) { - $object->setEditable($data['editable']); - } elseif (\array_key_exists('editable', $data) && null === $data['editable']) { - $object->setEditable(null); - } - if (\array_key_exists('editor', $data) && null !== $data['editor']) { - $object->setEditor($data['editor']); - } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { - $object->setEditor(null); - } - if (\array_key_exists('external_id', $data) && null !== $data['external_id']) { - $object->setExternalId($data['external_id']); - } elseif (\array_key_exists('external_id', $data) && null === $data['external_id']) { - $object->setExternalId(null); - } - if (\array_key_exists('external_type', $data) && null !== $data['external_type']) { - $object->setExternalType($data['external_type']); - } elseif (\array_key_exists('external_type', $data) && null === $data['external_type']) { - $object->setExternalType(null); - } - if (\array_key_exists('external_url', $data) && null !== $data['external_url']) { - $object->setExternalUrl($data['external_url']); - } elseif (\array_key_exists('external_url', $data) && null === $data['external_url']) { - $object->setExternalUrl(null); - } - if (\array_key_exists('filetype', $data) && null !== $data['filetype']) { - $object->setFiletype($data['filetype']); - } elseif (\array_key_exists('filetype', $data) && null === $data['filetype']) { - $object->setFiletype(null); - } - if (\array_key_exists('groups', $data) && null !== $data['groups']) { - $values_1 = []; - foreach ($data['groups'] as $value_1) { - $values_1[] = $value_1; - } - $object->setGroups($values_1); - } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { - $object->setGroups(null); - } - if (\array_key_exists('has_rich_preview', $data) && null !== $data['has_rich_preview']) { - $object->setHasRichPreview($data['has_rich_preview']); - } elseif (\array_key_exists('has_rich_preview', $data) && null === $data['has_rich_preview']) { - $object->setHasRichPreview(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('image_exif_rotation', $data) && null !== $data['image_exif_rotation']) { - $object->setImageExifRotation($data['image_exif_rotation']); - } elseif (\array_key_exists('image_exif_rotation', $data) && null === $data['image_exif_rotation']) { - $object->setImageExifRotation(null); - } - if (\array_key_exists('ims', $data) && null !== $data['ims']) { - $values_2 = []; - foreach ($data['ims'] as $value_2) { - $values_2[] = $value_2; - } - $object->setIms($values_2); - } elseif (\array_key_exists('ims', $data) && null === $data['ims']) { - $object->setIms(null); - } - if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { - $object->setIsExternal($data['is_external']); - } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { - $object->setIsExternal(null); - } - if (\array_key_exists('is_public', $data) && null !== $data['is_public']) { - $object->setIsPublic($data['is_public']); - } elseif (\array_key_exists('is_public', $data) && null === $data['is_public']) { - $object->setIsPublic(null); - } - if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { - $object->setIsStarred($data['is_starred']); - } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { - $object->setIsStarred(null); - } - if (\array_key_exists('is_tombstoned', $data) && null !== $data['is_tombstoned']) { - $object->setIsTombstoned($data['is_tombstoned']); - } elseif (\array_key_exists('is_tombstoned', $data) && null === $data['is_tombstoned']) { - $object->setIsTombstoned(null); - } - if (\array_key_exists('last_editor', $data) && null !== $data['last_editor']) { - $object->setLastEditor($data['last_editor']); - } elseif (\array_key_exists('last_editor', $data) && null === $data['last_editor']) { - $object->setLastEditor(null); - } - if (\array_key_exists('mimetype', $data) && null !== $data['mimetype']) { - $object->setMimetype($data['mimetype']); - } elseif (\array_key_exists('mimetype', $data) && null === $data['mimetype']) { - $object->setMimetype(null); - } - if (\array_key_exists('mode', $data) && null !== $data['mode']) { - $object->setMode($data['mode']); - } elseif (\array_key_exists('mode', $data) && null === $data['mode']) { - $object->setMode(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('non_owner_editable', $data) && null !== $data['non_owner_editable']) { - $object->setNonOwnerEditable($data['non_owner_editable']); - } elseif (\array_key_exists('non_owner_editable', $data) && null === $data['non_owner_editable']) { - $object->setNonOwnerEditable(null); - } - if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { - $object->setNumStars($data['num_stars']); - } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { - $object->setNumStars(null); - } - if (\array_key_exists('original_h', $data) && null !== $data['original_h']) { - $object->setOriginalH($data['original_h']); - } elseif (\array_key_exists('original_h', $data) && null === $data['original_h']) { - $object->setOriginalH(null); - } - if (\array_key_exists('original_w', $data) && null !== $data['original_w']) { - $object->setOriginalW($data['original_w']); - } elseif (\array_key_exists('original_w', $data) && null === $data['original_w']) { - $object->setOriginalW(null); - } - if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { - $object->setPermalink($data['permalink']); - } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { - $object->setPermalink(null); - } - if (\array_key_exists('permalink_public', $data) && null !== $data['permalink_public']) { - $object->setPermalinkPublic($data['permalink_public']); - } elseif (\array_key_exists('permalink_public', $data) && null === $data['permalink_public']) { - $object->setPermalinkPublic(null); - } - if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { - $object->setPinnedInfo($data['pinned_info']); - } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { - $object->setPinnedInfo(null); - } - if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { - $values_3 = []; - foreach ($data['pinned_to'] as $value_3) { - $values_3[] = $value_3; - } - $object->setPinnedTo($values_3); - } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { - $object->setPinnedTo(null); - } - if (\array_key_exists('pjpeg', $data) && null !== $data['pjpeg']) { - $object->setPjpeg($data['pjpeg']); - } elseif (\array_key_exists('pjpeg', $data) && null === $data['pjpeg']) { - $object->setPjpeg(null); - } - if (\array_key_exists('pretty_type', $data) && null !== $data['pretty_type']) { - $object->setPrettyType($data['pretty_type']); - } elseif (\array_key_exists('pretty_type', $data) && null === $data['pretty_type']) { - $object->setPrettyType(null); - } - if (\array_key_exists('preview', $data) && null !== $data['preview']) { - $object->setPreview($data['preview']); - } elseif (\array_key_exists('preview', $data) && null === $data['preview']) { - $object->setPreview(null); - } - if (\array_key_exists('public_url_shared', $data) && null !== $data['public_url_shared']) { - $object->setPublicUrlShared($data['public_url_shared']); - } elseif (\array_key_exists('public_url_shared', $data) && null === $data['public_url_shared']) { - $object->setPublicUrlShared(null); - } - if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { - $values_4 = []; - foreach ($data['reactions'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); - } - $object->setReactions($values_4); - } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { - $object->setReactions(null); - } - if (\array_key_exists('shares', $data) && null !== $data['shares']) { - $object->setShares($this->denormalizer->denormalize($data['shares'], 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares', 'json', $context)); - } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { - $object->setShares(null); - } - if (\array_key_exists('size', $data) && null !== $data['size']) { - $object->setSize($data['size']); - } elseif (\array_key_exists('size', $data) && null === $data['size']) { - $object->setSize(null); - } - if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { - $object->setSourceTeam($data['source_team']); - } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { - $object->setSourceTeam(null); - } - if (\array_key_exists('state', $data) && null !== $data['state']) { - $object->setState($data['state']); - } elseif (\array_key_exists('state', $data) && null === $data['state']) { - $object->setState(null); - } - if (\array_key_exists('thumb_1024', $data) && null !== $data['thumb_1024']) { - $object->setThumb1024($data['thumb_1024']); - } elseif (\array_key_exists('thumb_1024', $data) && null === $data['thumb_1024']) { - $object->setThumb1024(null); - } - if (\array_key_exists('thumb_1024_h', $data) && null !== $data['thumb_1024_h']) { - $object->setThumb1024H($data['thumb_1024_h']); - } elseif (\array_key_exists('thumb_1024_h', $data) && null === $data['thumb_1024_h']) { - $object->setThumb1024H(null); - } - if (\array_key_exists('thumb_1024_w', $data) && null !== $data['thumb_1024_w']) { - $object->setThumb1024W($data['thumb_1024_w']); - } elseif (\array_key_exists('thumb_1024_w', $data) && null === $data['thumb_1024_w']) { - $object->setThumb1024W(null); - } - if (\array_key_exists('thumb_160', $data) && null !== $data['thumb_160']) { - $object->setThumb160($data['thumb_160']); - } elseif (\array_key_exists('thumb_160', $data) && null === $data['thumb_160']) { - $object->setThumb160(null); - } - if (\array_key_exists('thumb_360', $data) && null !== $data['thumb_360']) { - $object->setThumb360($data['thumb_360']); - } elseif (\array_key_exists('thumb_360', $data) && null === $data['thumb_360']) { - $object->setThumb360(null); - } - if (\array_key_exists('thumb_360_gif', $data) && null !== $data['thumb_360_gif']) { - $object->setThumb360Gif($data['thumb_360_gif']); - } elseif (\array_key_exists('thumb_360_gif', $data) && null === $data['thumb_360_gif']) { - $object->setThumb360Gif(null); - } - if (\array_key_exists('thumb_360_h', $data) && null !== $data['thumb_360_h']) { - $object->setThumb360H($data['thumb_360_h']); - } elseif (\array_key_exists('thumb_360_h', $data) && null === $data['thumb_360_h']) { - $object->setThumb360H(null); - } - if (\array_key_exists('thumb_360_w', $data) && null !== $data['thumb_360_w']) { - $object->setThumb360W($data['thumb_360_w']); - } elseif (\array_key_exists('thumb_360_w', $data) && null === $data['thumb_360_w']) { - $object->setThumb360W(null); - } - if (\array_key_exists('thumb_480', $data) && null !== $data['thumb_480']) { - $object->setThumb480($data['thumb_480']); - } elseif (\array_key_exists('thumb_480', $data) && null === $data['thumb_480']) { - $object->setThumb480(null); - } - if (\array_key_exists('thumb_480_h', $data) && null !== $data['thumb_480_h']) { - $object->setThumb480H($data['thumb_480_h']); - } elseif (\array_key_exists('thumb_480_h', $data) && null === $data['thumb_480_h']) { - $object->setThumb480H(null); - } - if (\array_key_exists('thumb_480_w', $data) && null !== $data['thumb_480_w']) { - $object->setThumb480W($data['thumb_480_w']); - } elseif (\array_key_exists('thumb_480_w', $data) && null === $data['thumb_480_w']) { - $object->setThumb480W(null); - } - if (\array_key_exists('thumb_64', $data) && null !== $data['thumb_64']) { - $object->setThumb64($data['thumb_64']); - } elseif (\array_key_exists('thumb_64', $data) && null === $data['thumb_64']) { - $object->setThumb64(null); - } - if (\array_key_exists('thumb_720', $data) && null !== $data['thumb_720']) { - $object->setThumb720($data['thumb_720']); - } elseif (\array_key_exists('thumb_720', $data) && null === $data['thumb_720']) { - $object->setThumb720(null); - } - if (\array_key_exists('thumb_720_h', $data) && null !== $data['thumb_720_h']) { - $object->setThumb720H($data['thumb_720_h']); - } elseif (\array_key_exists('thumb_720_h', $data) && null === $data['thumb_720_h']) { - $object->setThumb720H(null); - } - if (\array_key_exists('thumb_720_w', $data) && null !== $data['thumb_720_w']) { - $object->setThumb720W($data['thumb_720_w']); - } elseif (\array_key_exists('thumb_720_w', $data) && null === $data['thumb_720_w']) { - $object->setThumb720W(null); - } - if (\array_key_exists('thumb_80', $data) && null !== $data['thumb_80']) { - $object->setThumb80($data['thumb_80']); - } elseif (\array_key_exists('thumb_80', $data) && null === $data['thumb_80']) { - $object->setThumb80(null); - } - if (\array_key_exists('thumb_800', $data) && null !== $data['thumb_800']) { - $object->setThumb800($data['thumb_800']); - } elseif (\array_key_exists('thumb_800', $data) && null === $data['thumb_800']) { - $object->setThumb800(null); - } - if (\array_key_exists('thumb_800_h', $data) && null !== $data['thumb_800_h']) { - $object->setThumb800H($data['thumb_800_h']); - } elseif (\array_key_exists('thumb_800_h', $data) && null === $data['thumb_800_h']) { - $object->setThumb800H(null); - } - if (\array_key_exists('thumb_800_w', $data) && null !== $data['thumb_800_w']) { - $object->setThumb800W($data['thumb_800_w']); - } elseif (\array_key_exists('thumb_800_w', $data) && null === $data['thumb_800_w']) { - $object->setThumb800W(null); - } - if (\array_key_exists('thumb_960', $data) && null !== $data['thumb_960']) { - $object->setThumb960($data['thumb_960']); - } elseif (\array_key_exists('thumb_960', $data) && null === $data['thumb_960']) { - $object->setThumb960(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('channels') && null !== $object->getChannels()) { + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $value; + } + $data['channels'] = $values; + } + if ($object->isInitialized('commentsCount') && null !== $object->getCommentsCount()) { + $data['comments_count'] = $object->getCommentsCount(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('dateDelete') && null !== $object->getDateDelete()) { + $data['date_delete'] = $object->getDateDelete(); + } + if ($object->isInitialized('deanimateGif') && null !== $object->getDeanimateGif()) { + $data['deanimate_gif'] = $object->getDeanimateGif(); + } + if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { + $data['display_as_bot'] = $object->getDisplayAsBot(); + } + if ($object->isInitialized('editable') && null !== $object->getEditable()) { + $data['editable'] = $object->getEditable(); + } + if ($object->isInitialized('editor') && null !== $object->getEditor()) { + $data['editor'] = $object->getEditor(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['external_id'] = $object->getExternalId(); + } + if ($object->isInitialized('externalType') && null !== $object->getExternalType()) { + $data['external_type'] = $object->getExternalType(); + } + if ($object->isInitialized('externalUrl') && null !== $object->getExternalUrl()) { + $data['external_url'] = $object->getExternalUrl(); + } + if ($object->isInitialized('filetype') && null !== $object->getFiletype()) { + $data['filetype'] = $object->getFiletype(); + } + if ($object->isInitialized('groups') && null !== $object->getGroups()) { + $values_1 = []; + foreach ($object->getGroups() as $value_1) { + $values_1[] = $value_1; + } + $data['groups'] = $values_1; + } + if ($object->isInitialized('hasRichPreview') && null !== $object->getHasRichPreview()) { + $data['has_rich_preview'] = $object->getHasRichPreview(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('imageExifRotation') && null !== $object->getImageExifRotation()) { + $data['image_exif_rotation'] = $object->getImageExifRotation(); + } + if ($object->isInitialized('ims') && null !== $object->getIms()) { + $values_2 = []; + foreach ($object->getIms() as $value_2) { + $values_2[] = $value_2; + } + $data['ims'] = $values_2; + } + if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { + $data['is_external'] = $object->getIsExternal(); + } + if ($object->isInitialized('isPublic') && null !== $object->getIsPublic()) { + $data['is_public'] = $object->getIsPublic(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('isTombstoned') && null !== $object->getIsTombstoned()) { + $data['is_tombstoned'] = $object->getIsTombstoned(); + } + if ($object->isInitialized('lastEditor') && null !== $object->getLastEditor()) { + $data['last_editor'] = $object->getLastEditor(); + } + if ($object->isInitialized('mimetype') && null !== $object->getMimetype()) { + $data['mimetype'] = $object->getMimetype(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['mode'] = $object->getMode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('nonOwnerEditable') && null !== $object->getNonOwnerEditable()) { + $data['non_owner_editable'] = $object->getNonOwnerEditable(); + } + if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { + $data['num_stars'] = $object->getNumStars(); + } + if ($object->isInitialized('originalH') && null !== $object->getOriginalH()) { + $data['original_h'] = $object->getOriginalH(); + } + if ($object->isInitialized('originalW') && null !== $object->getOriginalW()) { + $data['original_w'] = $object->getOriginalW(); + } + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); + } + if ($object->isInitialized('permalinkPublic') && null !== $object->getPermalinkPublic()) { + $data['permalink_public'] = $object->getPermalinkPublic(); + } + if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { + $data['pinned_info'] = $object->getPinnedInfo(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values_3 = []; + foreach ($object->getPinnedTo() as $value_3) { + $values_3[] = $value_3; + } + $data['pinned_to'] = $values_3; + } + if ($object->isInitialized('pjpeg') && null !== $object->getPjpeg()) { + $data['pjpeg'] = $object->getPjpeg(); + } + if ($object->isInitialized('prettyType') && null !== $object->getPrettyType()) { + $data['pretty_type'] = $object->getPrettyType(); + } + if ($object->isInitialized('preview') && null !== $object->getPreview()) { + $data['preview'] = $object->getPreview(); + } + if ($object->isInitialized('publicUrlShared') && null !== $object->getPublicUrlShared()) { + $data['public_url_shared'] = $object->getPublicUrlShared(); + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_4 = []; + foreach ($object->getReactions() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['reactions'] = $values_4; + } + if ($object->isInitialized('shares') && null !== $object->getShares()) { + $data['shares'] = $this->normalizer->normalize($object->getShares(), 'json', $context); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['size'] = $object->getSize(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['state'] = $object->getState(); + } + if ($object->isInitialized('thumb1024') && null !== $object->getThumb1024()) { + $data['thumb_1024'] = $object->getThumb1024(); + } + if ($object->isInitialized('thumb1024H') && null !== $object->getThumb1024H()) { + $data['thumb_1024_h'] = $object->getThumb1024H(); + } + if ($object->isInitialized('thumb1024W') && null !== $object->getThumb1024W()) { + $data['thumb_1024_w'] = $object->getThumb1024W(); + } + if ($object->isInitialized('thumb160') && null !== $object->getThumb160()) { + $data['thumb_160'] = $object->getThumb160(); + } + if ($object->isInitialized('thumb360') && null !== $object->getThumb360()) { + $data['thumb_360'] = $object->getThumb360(); + } + if ($object->isInitialized('thumb360Gif') && null !== $object->getThumb360Gif()) { + $data['thumb_360_gif'] = $object->getThumb360Gif(); + } + if ($object->isInitialized('thumb360H') && null !== $object->getThumb360H()) { + $data['thumb_360_h'] = $object->getThumb360H(); + } + if ($object->isInitialized('thumb360W') && null !== $object->getThumb360W()) { + $data['thumb_360_w'] = $object->getThumb360W(); + } + if ($object->isInitialized('thumb480') && null !== $object->getThumb480()) { + $data['thumb_480'] = $object->getThumb480(); + } + if ($object->isInitialized('thumb480H') && null !== $object->getThumb480H()) { + $data['thumb_480_h'] = $object->getThumb480H(); + } + if ($object->isInitialized('thumb480W') && null !== $object->getThumb480W()) { + $data['thumb_480_w'] = $object->getThumb480W(); + } + if ($object->isInitialized('thumb64') && null !== $object->getThumb64()) { + $data['thumb_64'] = $object->getThumb64(); + } + if ($object->isInitialized('thumb720') && null !== $object->getThumb720()) { + $data['thumb_720'] = $object->getThumb720(); + } + if ($object->isInitialized('thumb720H') && null !== $object->getThumb720H()) { + $data['thumb_720_h'] = $object->getThumb720H(); + } + if ($object->isInitialized('thumb720W') && null !== $object->getThumb720W()) { + $data['thumb_720_w'] = $object->getThumb720W(); + } + if ($object->isInitialized('thumb80') && null !== $object->getThumb80()) { + $data['thumb_80'] = $object->getThumb80(); + } + if ($object->isInitialized('thumb800') && null !== $object->getThumb800()) { + $data['thumb_800'] = $object->getThumb800(); + } + if ($object->isInitialized('thumb800H') && null !== $object->getThumb800H()) { + $data['thumb_800_h'] = $object->getThumb800H(); + } + if ($object->isInitialized('thumb800W') && null !== $object->getThumb800W()) { + $data['thumb_800_w'] = $object->getThumb800W(); + } + if ($object->isInitialized('thumb960') && null !== $object->getThumb960()) { + $data['thumb_960'] = $object->getThumb960(); + } + if ($object->isInitialized('thumb960H') && null !== $object->getThumb960H()) { + $data['thumb_960_h'] = $object->getThumb960H(); + } + if ($object->isInitialized('thumb960W') && null !== $object->getThumb960W()) { + $data['thumb_960_w'] = $object->getThumb960W(); + } + if ($object->isInitialized('thumbTiny') && null !== $object->getThumbTiny()) { + $data['thumb_tiny'] = $object->getThumbTiny(); + } + if ($object->isInitialized('timestamp') && null !== $object->getTimestamp()) { + $value_5 = $object->getTimestamp(); + if (\is_int($object->getTimestamp())) { + $value_5 = $object->getTimestamp(); + } elseif (\is_string($object->getTimestamp())) { + $value_5 = $object->getTimestamp(); + } + $data['timestamp'] = $value_5; + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('updated') && null !== $object->getUpdated()) { + $data['updated'] = $object->getUpdated(); + } + if ($object->isInitialized('urlPrivate') && null !== $object->getUrlPrivate()) { + $data['url_private'] = $object->getUrlPrivate(); + } + if ($object->isInitialized('urlPrivateDownload') && null !== $object->getUrlPrivateDownload()) { + $data['url_private_download'] = $object->getUrlPrivateDownload(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + + return $data; } - if (\array_key_exists('thumb_960_h', $data) && null !== $data['thumb_960_h']) { - $object->setThumb960H($data['thumb_960_h']); - } elseif (\array_key_exists('thumb_960_h', $data) && null === $data['thumb_960_h']) { - $object->setThumb960H(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsFile' => false]; } - if (\array_key_exists('thumb_960_w', $data) && null !== $data['thumb_960_w']) { - $object->setThumb960W($data['thumb_960_w']); - } elseif (\array_key_exists('thumb_960_w', $data) && null === $data['thumb_960_w']) { - $object->setThumb960W(null); + } +} else { + class ObjsFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === $type; } - if (\array_key_exists('thumb_tiny', $data) && null !== $data['thumb_tiny']) { - $object->setThumbTiny($data['thumb_tiny']); - } elseif (\array_key_exists('thumb_tiny', $data) && null === $data['thumb_tiny']) { - $object->setThumbTiny(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFile' === \get_class($data); } - if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { - $value_5 = $data['timestamp']; - if (\is_int($data['timestamp'])) { - $value_5 = $data['timestamp']; - } elseif (\is_string($data['timestamp'])) { + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $value; + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('comments_count', $data) && null !== $data['comments_count']) { + $object->setCommentsCount($data['comments_count']); + } elseif (\array_key_exists('comments_count', $data) && null === $data['comments_count']) { + $object->setCommentsCount(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { + $object->setDateDelete($data['date_delete']); + } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { + $object->setDateDelete(null); + } + if (\array_key_exists('deanimate_gif', $data) && null !== $data['deanimate_gif']) { + $object->setDeanimateGif($data['deanimate_gif']); + } elseif (\array_key_exists('deanimate_gif', $data) && null === $data['deanimate_gif']) { + $object->setDeanimateGif(null); + } + if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { + $object->setDisplayAsBot($data['display_as_bot']); + } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { + $object->setDisplayAsBot(null); + } + if (\array_key_exists('editable', $data) && null !== $data['editable']) { + $object->setEditable($data['editable']); + } elseif (\array_key_exists('editable', $data) && null === $data['editable']) { + $object->setEditable(null); + } + if (\array_key_exists('editor', $data) && null !== $data['editor']) { + $object->setEditor($data['editor']); + } elseif (\array_key_exists('editor', $data) && null === $data['editor']) { + $object->setEditor(null); + } + if (\array_key_exists('external_id', $data) && null !== $data['external_id']) { + $object->setExternalId($data['external_id']); + } elseif (\array_key_exists('external_id', $data) && null === $data['external_id']) { + $object->setExternalId(null); + } + if (\array_key_exists('external_type', $data) && null !== $data['external_type']) { + $object->setExternalType($data['external_type']); + } elseif (\array_key_exists('external_type', $data) && null === $data['external_type']) { + $object->setExternalType(null); + } + if (\array_key_exists('external_url', $data) && null !== $data['external_url']) { + $object->setExternalUrl($data['external_url']); + } elseif (\array_key_exists('external_url', $data) && null === $data['external_url']) { + $object->setExternalUrl(null); + } + if (\array_key_exists('filetype', $data) && null !== $data['filetype']) { + $object->setFiletype($data['filetype']); + } elseif (\array_key_exists('filetype', $data) && null === $data['filetype']) { + $object->setFiletype(null); + } + if (\array_key_exists('groups', $data) && null !== $data['groups']) { + $values_1 = []; + foreach ($data['groups'] as $value_1) { + $values_1[] = $value_1; + } + $object->setGroups($values_1); + } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { + $object->setGroups(null); + } + if (\array_key_exists('has_rich_preview', $data) && null !== $data['has_rich_preview']) { + $object->setHasRichPreview($data['has_rich_preview']); + } elseif (\array_key_exists('has_rich_preview', $data) && null === $data['has_rich_preview']) { + $object->setHasRichPreview(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_exif_rotation', $data) && null !== $data['image_exif_rotation']) { + $object->setImageExifRotation($data['image_exif_rotation']); + } elseif (\array_key_exists('image_exif_rotation', $data) && null === $data['image_exif_rotation']) { + $object->setImageExifRotation(null); + } + if (\array_key_exists('ims', $data) && null !== $data['ims']) { + $values_2 = []; + foreach ($data['ims'] as $value_2) { + $values_2[] = $value_2; + } + $object->setIms($values_2); + } elseif (\array_key_exists('ims', $data) && null === $data['ims']) { + $object->setIms(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_public', $data) && null !== $data['is_public']) { + $object->setIsPublic($data['is_public']); + } elseif (\array_key_exists('is_public', $data) && null === $data['is_public']) { + $object->setIsPublic(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('is_tombstoned', $data) && null !== $data['is_tombstoned']) { + $object->setIsTombstoned($data['is_tombstoned']); + } elseif (\array_key_exists('is_tombstoned', $data) && null === $data['is_tombstoned']) { + $object->setIsTombstoned(null); + } + if (\array_key_exists('last_editor', $data) && null !== $data['last_editor']) { + $object->setLastEditor($data['last_editor']); + } elseif (\array_key_exists('last_editor', $data) && null === $data['last_editor']) { + $object->setLastEditor(null); + } + if (\array_key_exists('mimetype', $data) && null !== $data['mimetype']) { + $object->setMimetype($data['mimetype']); + } elseif (\array_key_exists('mimetype', $data) && null === $data['mimetype']) { + $object->setMimetype(null); + } + if (\array_key_exists('mode', $data) && null !== $data['mode']) { + $object->setMode($data['mode']); + } elseif (\array_key_exists('mode', $data) && null === $data['mode']) { + $object->setMode(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('non_owner_editable', $data) && null !== $data['non_owner_editable']) { + $object->setNonOwnerEditable($data['non_owner_editable']); + } elseif (\array_key_exists('non_owner_editable', $data) && null === $data['non_owner_editable']) { + $object->setNonOwnerEditable(null); + } + if (\array_key_exists('num_stars', $data) && null !== $data['num_stars']) { + $object->setNumStars($data['num_stars']); + } elseif (\array_key_exists('num_stars', $data) && null === $data['num_stars']) { + $object->setNumStars(null); + } + if (\array_key_exists('original_h', $data) && null !== $data['original_h']) { + $object->setOriginalH($data['original_h']); + } elseif (\array_key_exists('original_h', $data) && null === $data['original_h']) { + $object->setOriginalH(null); + } + if (\array_key_exists('original_w', $data) && null !== $data['original_w']) { + $object->setOriginalW($data['original_w']); + } elseif (\array_key_exists('original_w', $data) && null === $data['original_w']) { + $object->setOriginalW(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } + if (\array_key_exists('permalink_public', $data) && null !== $data['permalink_public']) { + $object->setPermalinkPublic($data['permalink_public']); + } elseif (\array_key_exists('permalink_public', $data) && null === $data['permalink_public']) { + $object->setPermalinkPublic(null); + } + if (\array_key_exists('pinned_info', $data) && null !== $data['pinned_info']) { + $object->setPinnedInfo($data['pinned_info']); + } elseif (\array_key_exists('pinned_info', $data) && null === $data['pinned_info']) { + $object->setPinnedInfo(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values_3 = []; + foreach ($data['pinned_to'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPinnedTo($values_3); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); + } + if (\array_key_exists('pjpeg', $data) && null !== $data['pjpeg']) { + $object->setPjpeg($data['pjpeg']); + } elseif (\array_key_exists('pjpeg', $data) && null === $data['pjpeg']) { + $object->setPjpeg(null); + } + if (\array_key_exists('pretty_type', $data) && null !== $data['pretty_type']) { + $object->setPrettyType($data['pretty_type']); + } elseif (\array_key_exists('pretty_type', $data) && null === $data['pretty_type']) { + $object->setPrettyType(null); + } + if (\array_key_exists('preview', $data) && null !== $data['preview']) { + $object->setPreview($data['preview']); + } elseif (\array_key_exists('preview', $data) && null === $data['preview']) { + $object->setPreview(null); + } + if (\array_key_exists('public_url_shared', $data) && null !== $data['public_url_shared']) { + $object->setPublicUrlShared($data['public_url_shared']); + } elseif (\array_key_exists('public_url_shared', $data) && null === $data['public_url_shared']) { + $object->setPublicUrlShared(null); + } + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_4 = []; + foreach ($data['reactions'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_4); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('shares', $data) && null !== $data['shares']) { + $object->setShares($this->denormalizer->denormalize($data['shares'], 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares', 'json', $context)); + } elseif (\array_key_exists('shares', $data) && null === $data['shares']) { + $object->setShares(null); + } + if (\array_key_exists('size', $data) && null !== $data['size']) { + $object->setSize($data['size']); + } elseif (\array_key_exists('size', $data) && null === $data['size']) { + $object->setSize(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('state', $data) && null !== $data['state']) { + $object->setState($data['state']); + } elseif (\array_key_exists('state', $data) && null === $data['state']) { + $object->setState(null); + } + if (\array_key_exists('thumb_1024', $data) && null !== $data['thumb_1024']) { + $object->setThumb1024($data['thumb_1024']); + } elseif (\array_key_exists('thumb_1024', $data) && null === $data['thumb_1024']) { + $object->setThumb1024(null); + } + if (\array_key_exists('thumb_1024_h', $data) && null !== $data['thumb_1024_h']) { + $object->setThumb1024H($data['thumb_1024_h']); + } elseif (\array_key_exists('thumb_1024_h', $data) && null === $data['thumb_1024_h']) { + $object->setThumb1024H(null); + } + if (\array_key_exists('thumb_1024_w', $data) && null !== $data['thumb_1024_w']) { + $object->setThumb1024W($data['thumb_1024_w']); + } elseif (\array_key_exists('thumb_1024_w', $data) && null === $data['thumb_1024_w']) { + $object->setThumb1024W(null); + } + if (\array_key_exists('thumb_160', $data) && null !== $data['thumb_160']) { + $object->setThumb160($data['thumb_160']); + } elseif (\array_key_exists('thumb_160', $data) && null === $data['thumb_160']) { + $object->setThumb160(null); + } + if (\array_key_exists('thumb_360', $data) && null !== $data['thumb_360']) { + $object->setThumb360($data['thumb_360']); + } elseif (\array_key_exists('thumb_360', $data) && null === $data['thumb_360']) { + $object->setThumb360(null); + } + if (\array_key_exists('thumb_360_gif', $data) && null !== $data['thumb_360_gif']) { + $object->setThumb360Gif($data['thumb_360_gif']); + } elseif (\array_key_exists('thumb_360_gif', $data) && null === $data['thumb_360_gif']) { + $object->setThumb360Gif(null); + } + if (\array_key_exists('thumb_360_h', $data) && null !== $data['thumb_360_h']) { + $object->setThumb360H($data['thumb_360_h']); + } elseif (\array_key_exists('thumb_360_h', $data) && null === $data['thumb_360_h']) { + $object->setThumb360H(null); + } + if (\array_key_exists('thumb_360_w', $data) && null !== $data['thumb_360_w']) { + $object->setThumb360W($data['thumb_360_w']); + } elseif (\array_key_exists('thumb_360_w', $data) && null === $data['thumb_360_w']) { + $object->setThumb360W(null); + } + if (\array_key_exists('thumb_480', $data) && null !== $data['thumb_480']) { + $object->setThumb480($data['thumb_480']); + } elseif (\array_key_exists('thumb_480', $data) && null === $data['thumb_480']) { + $object->setThumb480(null); + } + if (\array_key_exists('thumb_480_h', $data) && null !== $data['thumb_480_h']) { + $object->setThumb480H($data['thumb_480_h']); + } elseif (\array_key_exists('thumb_480_h', $data) && null === $data['thumb_480_h']) { + $object->setThumb480H(null); + } + if (\array_key_exists('thumb_480_w', $data) && null !== $data['thumb_480_w']) { + $object->setThumb480W($data['thumb_480_w']); + } elseif (\array_key_exists('thumb_480_w', $data) && null === $data['thumb_480_w']) { + $object->setThumb480W(null); + } + if (\array_key_exists('thumb_64', $data) && null !== $data['thumb_64']) { + $object->setThumb64($data['thumb_64']); + } elseif (\array_key_exists('thumb_64', $data) && null === $data['thumb_64']) { + $object->setThumb64(null); + } + if (\array_key_exists('thumb_720', $data) && null !== $data['thumb_720']) { + $object->setThumb720($data['thumb_720']); + } elseif (\array_key_exists('thumb_720', $data) && null === $data['thumb_720']) { + $object->setThumb720(null); + } + if (\array_key_exists('thumb_720_h', $data) && null !== $data['thumb_720_h']) { + $object->setThumb720H($data['thumb_720_h']); + } elseif (\array_key_exists('thumb_720_h', $data) && null === $data['thumb_720_h']) { + $object->setThumb720H(null); + } + if (\array_key_exists('thumb_720_w', $data) && null !== $data['thumb_720_w']) { + $object->setThumb720W($data['thumb_720_w']); + } elseif (\array_key_exists('thumb_720_w', $data) && null === $data['thumb_720_w']) { + $object->setThumb720W(null); + } + if (\array_key_exists('thumb_80', $data) && null !== $data['thumb_80']) { + $object->setThumb80($data['thumb_80']); + } elseif (\array_key_exists('thumb_80', $data) && null === $data['thumb_80']) { + $object->setThumb80(null); + } + if (\array_key_exists('thumb_800', $data) && null !== $data['thumb_800']) { + $object->setThumb800($data['thumb_800']); + } elseif (\array_key_exists('thumb_800', $data) && null === $data['thumb_800']) { + $object->setThumb800(null); + } + if (\array_key_exists('thumb_800_h', $data) && null !== $data['thumb_800_h']) { + $object->setThumb800H($data['thumb_800_h']); + } elseif (\array_key_exists('thumb_800_h', $data) && null === $data['thumb_800_h']) { + $object->setThumb800H(null); + } + if (\array_key_exists('thumb_800_w', $data) && null !== $data['thumb_800_w']) { + $object->setThumb800W($data['thumb_800_w']); + } elseif (\array_key_exists('thumb_800_w', $data) && null === $data['thumb_800_w']) { + $object->setThumb800W(null); + } + if (\array_key_exists('thumb_960', $data) && null !== $data['thumb_960']) { + $object->setThumb960($data['thumb_960']); + } elseif (\array_key_exists('thumb_960', $data) && null === $data['thumb_960']) { + $object->setThumb960(null); + } + if (\array_key_exists('thumb_960_h', $data) && null !== $data['thumb_960_h']) { + $object->setThumb960H($data['thumb_960_h']); + } elseif (\array_key_exists('thumb_960_h', $data) && null === $data['thumb_960_h']) { + $object->setThumb960H(null); + } + if (\array_key_exists('thumb_960_w', $data) && null !== $data['thumb_960_w']) { + $object->setThumb960W($data['thumb_960_w']); + } elseif (\array_key_exists('thumb_960_w', $data) && null === $data['thumb_960_w']) { + $object->setThumb960W(null); + } + if (\array_key_exists('thumb_tiny', $data) && null !== $data['thumb_tiny']) { + $object->setThumbTiny($data['thumb_tiny']); + } elseif (\array_key_exists('thumb_tiny', $data) && null === $data['thumb_tiny']) { + $object->setThumbTiny(null); + } + if (\array_key_exists('timestamp', $data) && null !== $data['timestamp']) { $value_5 = $data['timestamp']; + if (\is_int($data['timestamp'])) { + $value_5 = $data['timestamp']; + } elseif (\is_string($data['timestamp'])) { + $value_5 = $data['timestamp']; + } + $object->setTimestamp($value_5); + } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { + $object->setTimestamp(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('url_private', $data) && null !== $data['url_private']) { + $object->setUrlPrivate($data['url_private']); + } elseif (\array_key_exists('url_private', $data) && null === $data['url_private']) { + $object->setUrlPrivate(null); + } + if (\array_key_exists('url_private_download', $data) && null !== $data['url_private_download']) { + $object->setUrlPrivateDownload($data['url_private_download']); + } elseif (\array_key_exists('url_private_download', $data) && null === $data['url_private_download']) { + $object->setUrlPrivateDownload(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); } - $object->setTimestamp($value_5); - } elseif (\array_key_exists('timestamp', $data) && null === $data['timestamp']) { - $object->setTimestamp(null); - } - if (\array_key_exists('title', $data) && null !== $data['title']) { - $object->setTitle($data['title']); - } elseif (\array_key_exists('title', $data) && null === $data['title']) { - $object->setTitle(null); - } - if (\array_key_exists('updated', $data) && null !== $data['updated']) { - $object->setUpdated($data['updated']); - } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { - $object->setUpdated(null); - } - if (\array_key_exists('url_private', $data) && null !== $data['url_private']) { - $object->setUrlPrivate($data['url_private']); - } elseif (\array_key_exists('url_private', $data) && null === $data['url_private']) { - $object->setUrlPrivate(null); - } - if (\array_key_exists('url_private_download', $data) && null !== $data['url_private_download']) { - $object->setUrlPrivateDownload($data['url_private_download']); - } elseif (\array_key_exists('url_private_download', $data) && null === $data['url_private_download']) { - $object->setUrlPrivateDownload(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { - $object->setUserTeam($data['user_team']); - } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { - $object->setUserTeam(null); - } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $object->setUsername($data['username']); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('channels') && null !== $object->getChannels()) { - $values = []; - foreach ($object->getChannels() as $value) { - $values[] = $value; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('channels') && null !== $object->getChannels()) { + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $value; + } + $data['channels'] = $values; } - $data['channels'] = $values; - } - if ($object->isInitialized('commentsCount') && null !== $object->getCommentsCount()) { - $data['comments_count'] = $object->getCommentsCount(); - } - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['created'] = $object->getCreated(); - } - if ($object->isInitialized('dateDelete') && null !== $object->getDateDelete()) { - $data['date_delete'] = $object->getDateDelete(); - } - if ($object->isInitialized('deanimateGif') && null !== $object->getDeanimateGif()) { - $data['deanimate_gif'] = $object->getDeanimateGif(); - } - if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { - $data['display_as_bot'] = $object->getDisplayAsBot(); - } - if ($object->isInitialized('editable') && null !== $object->getEditable()) { - $data['editable'] = $object->getEditable(); - } - if ($object->isInitialized('editor') && null !== $object->getEditor()) { - $data['editor'] = $object->getEditor(); - } - if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { - $data['external_id'] = $object->getExternalId(); - } - if ($object->isInitialized('externalType') && null !== $object->getExternalType()) { - $data['external_type'] = $object->getExternalType(); - } - if ($object->isInitialized('externalUrl') && null !== $object->getExternalUrl()) { - $data['external_url'] = $object->getExternalUrl(); - } - if ($object->isInitialized('filetype') && null !== $object->getFiletype()) { - $data['filetype'] = $object->getFiletype(); - } - if ($object->isInitialized('groups') && null !== $object->getGroups()) { - $values_1 = []; - foreach ($object->getGroups() as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('commentsCount') && null !== $object->getCommentsCount()) { + $data['comments_count'] = $object->getCommentsCount(); } - $data['groups'] = $values_1; - } - if ($object->isInitialized('hasRichPreview') && null !== $object->getHasRichPreview()) { - $data['has_rich_preview'] = $object->getHasRichPreview(); - } - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - if ($object->isInitialized('imageExifRotation') && null !== $object->getImageExifRotation()) { - $data['image_exif_rotation'] = $object->getImageExifRotation(); - } - if ($object->isInitialized('ims') && null !== $object->getIms()) { - $values_2 = []; - foreach ($object->getIms() as $value_2) { - $values_2[] = $value_2; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); } - $data['ims'] = $values_2; - } - if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { - $data['is_external'] = $object->getIsExternal(); - } - if ($object->isInitialized('isPublic') && null !== $object->getIsPublic()) { - $data['is_public'] = $object->getIsPublic(); - } - if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { - $data['is_starred'] = $object->getIsStarred(); - } - if ($object->isInitialized('isTombstoned') && null !== $object->getIsTombstoned()) { - $data['is_tombstoned'] = $object->getIsTombstoned(); - } - if ($object->isInitialized('lastEditor') && null !== $object->getLastEditor()) { - $data['last_editor'] = $object->getLastEditor(); - } - if ($object->isInitialized('mimetype') && null !== $object->getMimetype()) { - $data['mimetype'] = $object->getMimetype(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('nonOwnerEditable') && null !== $object->getNonOwnerEditable()) { - $data['non_owner_editable'] = $object->getNonOwnerEditable(); - } - if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { - $data['num_stars'] = $object->getNumStars(); - } - if ($object->isInitialized('originalH') && null !== $object->getOriginalH()) { - $data['original_h'] = $object->getOriginalH(); - } - if ($object->isInitialized('originalW') && null !== $object->getOriginalW()) { - $data['original_w'] = $object->getOriginalW(); - } - if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { - $data['permalink'] = $object->getPermalink(); - } - if ($object->isInitialized('permalinkPublic') && null !== $object->getPermalinkPublic()) { - $data['permalink_public'] = $object->getPermalinkPublic(); - } - if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { - $data['pinned_info'] = $object->getPinnedInfo(); - } - if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { - $values_3 = []; - foreach ($object->getPinnedTo() as $value_3) { - $values_3[] = $value_3; + if ($object->isInitialized('dateDelete') && null !== $object->getDateDelete()) { + $data['date_delete'] = $object->getDateDelete(); } - $data['pinned_to'] = $values_3; - } - if ($object->isInitialized('pjpeg') && null !== $object->getPjpeg()) { - $data['pjpeg'] = $object->getPjpeg(); - } - if ($object->isInitialized('prettyType') && null !== $object->getPrettyType()) { - $data['pretty_type'] = $object->getPrettyType(); - } - if ($object->isInitialized('preview') && null !== $object->getPreview()) { - $data['preview'] = $object->getPreview(); - } - if ($object->isInitialized('publicUrlShared') && null !== $object->getPublicUrlShared()) { - $data['public_url_shared'] = $object->getPublicUrlShared(); - } - if ($object->isInitialized('reactions') && null !== $object->getReactions()) { - $values_4 = []; - foreach ($object->getReactions() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + if ($object->isInitialized('deanimateGif') && null !== $object->getDeanimateGif()) { + $data['deanimate_gif'] = $object->getDeanimateGif(); } - $data['reactions'] = $values_4; - } - if ($object->isInitialized('shares') && null !== $object->getShares()) { - $data['shares'] = $this->normalizer->normalize($object->getShares(), 'json', $context); - } - if ($object->isInitialized('size') && null !== $object->getSize()) { - $data['size'] = $object->getSize(); - } - if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { - $data['source_team'] = $object->getSourceTeam(); - } - if ($object->isInitialized('state') && null !== $object->getState()) { - $data['state'] = $object->getState(); - } - if ($object->isInitialized('thumb1024') && null !== $object->getThumb1024()) { - $data['thumb_1024'] = $object->getThumb1024(); - } - if ($object->isInitialized('thumb1024H') && null !== $object->getThumb1024H()) { - $data['thumb_1024_h'] = $object->getThumb1024H(); - } - if ($object->isInitialized('thumb1024W') && null !== $object->getThumb1024W()) { - $data['thumb_1024_w'] = $object->getThumb1024W(); - } - if ($object->isInitialized('thumb160') && null !== $object->getThumb160()) { - $data['thumb_160'] = $object->getThumb160(); - } - if ($object->isInitialized('thumb360') && null !== $object->getThumb360()) { - $data['thumb_360'] = $object->getThumb360(); - } - if ($object->isInitialized('thumb360Gif') && null !== $object->getThumb360Gif()) { - $data['thumb_360_gif'] = $object->getThumb360Gif(); - } - if ($object->isInitialized('thumb360H') && null !== $object->getThumb360H()) { - $data['thumb_360_h'] = $object->getThumb360H(); - } - if ($object->isInitialized('thumb360W') && null !== $object->getThumb360W()) { - $data['thumb_360_w'] = $object->getThumb360W(); - } - if ($object->isInitialized('thumb480') && null !== $object->getThumb480()) { - $data['thumb_480'] = $object->getThumb480(); - } - if ($object->isInitialized('thumb480H') && null !== $object->getThumb480H()) { - $data['thumb_480_h'] = $object->getThumb480H(); - } - if ($object->isInitialized('thumb480W') && null !== $object->getThumb480W()) { - $data['thumb_480_w'] = $object->getThumb480W(); - } - if ($object->isInitialized('thumb64') && null !== $object->getThumb64()) { - $data['thumb_64'] = $object->getThumb64(); - } - if ($object->isInitialized('thumb720') && null !== $object->getThumb720()) { - $data['thumb_720'] = $object->getThumb720(); - } - if ($object->isInitialized('thumb720H') && null !== $object->getThumb720H()) { - $data['thumb_720_h'] = $object->getThumb720H(); - } - if ($object->isInitialized('thumb720W') && null !== $object->getThumb720W()) { - $data['thumb_720_w'] = $object->getThumb720W(); - } - if ($object->isInitialized('thumb80') && null !== $object->getThumb80()) { - $data['thumb_80'] = $object->getThumb80(); - } - if ($object->isInitialized('thumb800') && null !== $object->getThumb800()) { - $data['thumb_800'] = $object->getThumb800(); - } - if ($object->isInitialized('thumb800H') && null !== $object->getThumb800H()) { - $data['thumb_800_h'] = $object->getThumb800H(); - } - if ($object->isInitialized('thumb800W') && null !== $object->getThumb800W()) { - $data['thumb_800_w'] = $object->getThumb800W(); - } - if ($object->isInitialized('thumb960') && null !== $object->getThumb960()) { - $data['thumb_960'] = $object->getThumb960(); - } - if ($object->isInitialized('thumb960H') && null !== $object->getThumb960H()) { - $data['thumb_960_h'] = $object->getThumb960H(); - } - if ($object->isInitialized('thumb960W') && null !== $object->getThumb960W()) { - $data['thumb_960_w'] = $object->getThumb960W(); - } - if ($object->isInitialized('thumbTiny') && null !== $object->getThumbTiny()) { - $data['thumb_tiny'] = $object->getThumbTiny(); - } - if ($object->isInitialized('timestamp') && null !== $object->getTimestamp()) { - $value_5 = $object->getTimestamp(); - if (\is_int($object->getTimestamp())) { - $value_5 = $object->getTimestamp(); - } elseif (\is_string($object->getTimestamp())) { + if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { + $data['display_as_bot'] = $object->getDisplayAsBot(); + } + if ($object->isInitialized('editable') && null !== $object->getEditable()) { + $data['editable'] = $object->getEditable(); + } + if ($object->isInitialized('editor') && null !== $object->getEditor()) { + $data['editor'] = $object->getEditor(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['external_id'] = $object->getExternalId(); + } + if ($object->isInitialized('externalType') && null !== $object->getExternalType()) { + $data['external_type'] = $object->getExternalType(); + } + if ($object->isInitialized('externalUrl') && null !== $object->getExternalUrl()) { + $data['external_url'] = $object->getExternalUrl(); + } + if ($object->isInitialized('filetype') && null !== $object->getFiletype()) { + $data['filetype'] = $object->getFiletype(); + } + if ($object->isInitialized('groups') && null !== $object->getGroups()) { + $values_1 = []; + foreach ($object->getGroups() as $value_1) { + $values_1[] = $value_1; + } + $data['groups'] = $values_1; + } + if ($object->isInitialized('hasRichPreview') && null !== $object->getHasRichPreview()) { + $data['has_rich_preview'] = $object->getHasRichPreview(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('imageExifRotation') && null !== $object->getImageExifRotation()) { + $data['image_exif_rotation'] = $object->getImageExifRotation(); + } + if ($object->isInitialized('ims') && null !== $object->getIms()) { + $values_2 = []; + foreach ($object->getIms() as $value_2) { + $values_2[] = $value_2; + } + $data['ims'] = $values_2; + } + if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { + $data['is_external'] = $object->getIsExternal(); + } + if ($object->isInitialized('isPublic') && null !== $object->getIsPublic()) { + $data['is_public'] = $object->getIsPublic(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('isTombstoned') && null !== $object->getIsTombstoned()) { + $data['is_tombstoned'] = $object->getIsTombstoned(); + } + if ($object->isInitialized('lastEditor') && null !== $object->getLastEditor()) { + $data['last_editor'] = $object->getLastEditor(); + } + if ($object->isInitialized('mimetype') && null !== $object->getMimetype()) { + $data['mimetype'] = $object->getMimetype(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['mode'] = $object->getMode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('nonOwnerEditable') && null !== $object->getNonOwnerEditable()) { + $data['non_owner_editable'] = $object->getNonOwnerEditable(); + } + if ($object->isInitialized('numStars') && null !== $object->getNumStars()) { + $data['num_stars'] = $object->getNumStars(); + } + if ($object->isInitialized('originalH') && null !== $object->getOriginalH()) { + $data['original_h'] = $object->getOriginalH(); + } + if ($object->isInitialized('originalW') && null !== $object->getOriginalW()) { + $data['original_w'] = $object->getOriginalW(); + } + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); + } + if ($object->isInitialized('permalinkPublic') && null !== $object->getPermalinkPublic()) { + $data['permalink_public'] = $object->getPermalinkPublic(); + } + if ($object->isInitialized('pinnedInfo') && null !== $object->getPinnedInfo()) { + $data['pinned_info'] = $object->getPinnedInfo(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values_3 = []; + foreach ($object->getPinnedTo() as $value_3) { + $values_3[] = $value_3; + } + $data['pinned_to'] = $values_3; + } + if ($object->isInitialized('pjpeg') && null !== $object->getPjpeg()) { + $data['pjpeg'] = $object->getPjpeg(); + } + if ($object->isInitialized('prettyType') && null !== $object->getPrettyType()) { + $data['pretty_type'] = $object->getPrettyType(); + } + if ($object->isInitialized('preview') && null !== $object->getPreview()) { + $data['preview'] = $object->getPreview(); + } + if ($object->isInitialized('publicUrlShared') && null !== $object->getPublicUrlShared()) { + $data['public_url_shared'] = $object->getPublicUrlShared(); + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_4 = []; + foreach ($object->getReactions() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['reactions'] = $values_4; + } + if ($object->isInitialized('shares') && null !== $object->getShares()) { + $data['shares'] = $this->normalizer->normalize($object->getShares(), 'json', $context); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['size'] = $object->getSize(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['state'] = $object->getState(); + } + if ($object->isInitialized('thumb1024') && null !== $object->getThumb1024()) { + $data['thumb_1024'] = $object->getThumb1024(); + } + if ($object->isInitialized('thumb1024H') && null !== $object->getThumb1024H()) { + $data['thumb_1024_h'] = $object->getThumb1024H(); + } + if ($object->isInitialized('thumb1024W') && null !== $object->getThumb1024W()) { + $data['thumb_1024_w'] = $object->getThumb1024W(); + } + if ($object->isInitialized('thumb160') && null !== $object->getThumb160()) { + $data['thumb_160'] = $object->getThumb160(); + } + if ($object->isInitialized('thumb360') && null !== $object->getThumb360()) { + $data['thumb_360'] = $object->getThumb360(); + } + if ($object->isInitialized('thumb360Gif') && null !== $object->getThumb360Gif()) { + $data['thumb_360_gif'] = $object->getThumb360Gif(); + } + if ($object->isInitialized('thumb360H') && null !== $object->getThumb360H()) { + $data['thumb_360_h'] = $object->getThumb360H(); + } + if ($object->isInitialized('thumb360W') && null !== $object->getThumb360W()) { + $data['thumb_360_w'] = $object->getThumb360W(); + } + if ($object->isInitialized('thumb480') && null !== $object->getThumb480()) { + $data['thumb_480'] = $object->getThumb480(); + } + if ($object->isInitialized('thumb480H') && null !== $object->getThumb480H()) { + $data['thumb_480_h'] = $object->getThumb480H(); + } + if ($object->isInitialized('thumb480W') && null !== $object->getThumb480W()) { + $data['thumb_480_w'] = $object->getThumb480W(); + } + if ($object->isInitialized('thumb64') && null !== $object->getThumb64()) { + $data['thumb_64'] = $object->getThumb64(); + } + if ($object->isInitialized('thumb720') && null !== $object->getThumb720()) { + $data['thumb_720'] = $object->getThumb720(); + } + if ($object->isInitialized('thumb720H') && null !== $object->getThumb720H()) { + $data['thumb_720_h'] = $object->getThumb720H(); + } + if ($object->isInitialized('thumb720W') && null !== $object->getThumb720W()) { + $data['thumb_720_w'] = $object->getThumb720W(); + } + if ($object->isInitialized('thumb80') && null !== $object->getThumb80()) { + $data['thumb_80'] = $object->getThumb80(); + } + if ($object->isInitialized('thumb800') && null !== $object->getThumb800()) { + $data['thumb_800'] = $object->getThumb800(); + } + if ($object->isInitialized('thumb800H') && null !== $object->getThumb800H()) { + $data['thumb_800_h'] = $object->getThumb800H(); + } + if ($object->isInitialized('thumb800W') && null !== $object->getThumb800W()) { + $data['thumb_800_w'] = $object->getThumb800W(); + } + if ($object->isInitialized('thumb960') && null !== $object->getThumb960()) { + $data['thumb_960'] = $object->getThumb960(); + } + if ($object->isInitialized('thumb960H') && null !== $object->getThumb960H()) { + $data['thumb_960_h'] = $object->getThumb960H(); + } + if ($object->isInitialized('thumb960W') && null !== $object->getThumb960W()) { + $data['thumb_960_w'] = $object->getThumb960W(); + } + if ($object->isInitialized('thumbTiny') && null !== $object->getThumbTiny()) { + $data['thumb_tiny'] = $object->getThumbTiny(); + } + if ($object->isInitialized('timestamp') && null !== $object->getTimestamp()) { $value_5 = $object->getTimestamp(); + if (\is_int($object->getTimestamp())) { + $value_5 = $object->getTimestamp(); + } elseif (\is_string($object->getTimestamp())) { + $value_5 = $object->getTimestamp(); + } + $data['timestamp'] = $value_5; + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('updated') && null !== $object->getUpdated()) { + $data['updated'] = $object->getUpdated(); + } + if ($object->isInitialized('urlPrivate') && null !== $object->getUrlPrivate()) { + $data['url_private'] = $object->getUrlPrivate(); + } + if ($object->isInitialized('urlPrivateDownload') && null !== $object->getUrlPrivateDownload()) { + $data['url_private_download'] = $object->getUrlPrivateDownload(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); } - $data['timestamp'] = $value_5; - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('updated') && null !== $object->getUpdated()) { - $data['updated'] = $object->getUpdated(); - } - if ($object->isInitialized('urlPrivate') && null !== $object->getUrlPrivate()) { - $data['url_private'] = $object->getUrlPrivate(); - } - if ($object->isInitialized('urlPrivateDownload') && null !== $object->getUrlPrivateDownload()) { - $data['url_private_download'] = $object->getUrlPrivateDownload(); - } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); - } - if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { - $data['user_team'] = $object->getUserTeam(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsFile' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsFile' => false]; + } } } diff --git a/generated/Normalizer/ObjsFileSharesNormalizer.php b/generated/Normalizer/ObjsFileSharesNormalizer.php index bbc1cf78..63ceda23 100644 --- a/generated/Normalizer/ObjsFileSharesNormalizer.php +++ b/generated/Normalizer/ObjsFileSharesNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,67 +24,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsFileSharesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsFileSharesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsFileShares(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsFileShares(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('private', $data) && null !== $data['private']) { + $object->setPrivate($data['private']); + } elseif (\array_key_exists('private', $data) && null === $data['private']) { + $object->setPrivate(null); + } + if (\array_key_exists('public', $data) && null !== $data['public']) { + $object->setPublic($data['public']); + } elseif (\array_key_exists('public', $data) && null === $data['public']) { + $object->setPublic(null); + } + return $object; } - if (\array_key_exists('private', $data) && null !== $data['private']) { - $object->setPrivate($data['private']); - } elseif (\array_key_exists('private', $data) && null === $data['private']) { - $object->setPrivate(null); - } - if (\array_key_exists('public', $data) && null !== $data['public']) { - $object->setPublic($data['public']); - } elseif (\array_key_exists('public', $data) && null === $data['public']) { - $object->setPublic(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('private') && null !== $object->getPrivate()) { + $data['private'] = $object->getPrivate(); + } + if ($object->isInitialized('public') && null !== $object->getPublic()) { + $data['public'] = $object->getPublic(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsFileSharesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('private') && null !== $object->getPrivate()) { - $data['private'] = $object->getPrivate(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === $type; } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsFileShares' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsFileShares(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('private', $data) && null !== $data['private']) { + $object->setPrivate($data['private']); + } elseif (\array_key_exists('private', $data) && null === $data['private']) { + $object->setPrivate(null); + } + if (\array_key_exists('public', $data) && null !== $data['public']) { + $object->setPublic($data['public']); + } elseif (\array_key_exists('public', $data) && null === $data['public']) { + $object->setPublic(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('private') && null !== $object->getPrivate()) { + $data['private'] = $object->getPrivate(); + } + if ($object->isInitialized('public') && null !== $object->getPublic()) { + $data['public'] = $object->getPublic(); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsFileShares' => false]; + } } } diff --git a/generated/Normalizer/ObjsIconNormalizer.php b/generated/Normalizer/ObjsIconNormalizer.php index 7b23d4d1..aa451aa4 100644 --- a/generated/Normalizer/ObjsIconNormalizer.php +++ b/generated/Normalizer/ObjsIconNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,115 +24,227 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsIconNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsIconNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsIcon(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsIcon(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { + $object->setImage102($data['image_102']); + } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { + $object->setImage102(null); + } + if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { + $object->setImage132($data['image_132']); + } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { + $object->setImage132(null); + } + if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { + $object->setImage230($data['image_230']); + } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { + $object->setImage230(null); + } + if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { + $object->setImage34($data['image_34']); + } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { + $object->setImage34(null); + } + if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { + $object->setImage44($data['image_44']); + } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { + $object->setImage44(null); + } + if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { + $object->setImage68($data['image_68']); + } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { + $object->setImage68(null); + } + if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { + $object->setImage88($data['image_88']); + } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { + $object->setImage88(null); + } + if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { + $object->setImageDefault($data['image_default']); + } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { + $object->setImageDefault(null); + } + return $object; } - if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { - $object->setImage102($data['image_102']); - } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { - $object->setImage102(null); - } - if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { - $object->setImage132($data['image_132']); - } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { - $object->setImage132(null); - } - if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { - $object->setImage230($data['image_230']); - } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { - $object->setImage230(null); - } - if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { - $object->setImage34($data['image_34']); - } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { - $object->setImage34(null); - } - if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { - $object->setImage44($data['image_44']); - } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { - $object->setImage44(null); - } - if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { - $object->setImage68($data['image_68']); - } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { - $object->setImage68(null); - } - if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { - $object->setImage88($data['image_88']); - } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { - $object->setImage88(null); - } - if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { - $object->setImageDefault($data['image_default']); - } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { - $object->setImageDefault(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('image102') && null !== $object->getImage102()) { + $data['image_102'] = $object->getImage102(); + } + if ($object->isInitialized('image132') && null !== $object->getImage132()) { + $data['image_132'] = $object->getImage132(); + } + if ($object->isInitialized('image230') && null !== $object->getImage230()) { + $data['image_230'] = $object->getImage230(); + } + if ($object->isInitialized('image34') && null !== $object->getImage34()) { + $data['image_34'] = $object->getImage34(); + } + if ($object->isInitialized('image44') && null !== $object->getImage44()) { + $data['image_44'] = $object->getImage44(); + } + if ($object->isInitialized('image68') && null !== $object->getImage68()) { + $data['image_68'] = $object->getImage68(); + } + if ($object->isInitialized('image88') && null !== $object->getImage88()) { + $data['image_88'] = $object->getImage88(); + } + if ($object->isInitialized('imageDefault') && null !== $object->getImageDefault()) { + $data['image_default'] = $object->getImageDefault(); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('image102') && null !== $object->getImage102()) { - $data['image_102'] = $object->getImage102(); - } - if ($object->isInitialized('image132') && null !== $object->getImage132()) { - $data['image_132'] = $object->getImage132(); - } - if ($object->isInitialized('image230') && null !== $object->getImage230()) { - $data['image_230'] = $object->getImage230(); + return $data; } - if ($object->isInitialized('image34') && null !== $object->getImage34()) { - $data['image_34'] = $object->getImage34(); - } - if ($object->isInitialized('image44') && null !== $object->getImage44()) { - $data['image_44'] = $object->getImage44(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false]; } - if ($object->isInitialized('image68') && null !== $object->getImage68()) { - $data['image_68'] = $object->getImage68(); + } +} else { + class ObjsIconNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === $type; } - if ($object->isInitialized('image88') && null !== $object->getImage88()) { - $data['image_88'] = $object->getImage88(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsIcon' === \get_class($data); } - if ($object->isInitialized('imageDefault') && null !== $object->getImageDefault()) { - $data['image_default'] = $object->getImageDefault(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsIcon(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { + $object->setImage102($data['image_102']); + } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { + $object->setImage102(null); + } + if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { + $object->setImage132($data['image_132']); + } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { + $object->setImage132(null); + } + if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { + $object->setImage230($data['image_230']); + } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { + $object->setImage230(null); + } + if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { + $object->setImage34($data['image_34']); + } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { + $object->setImage34(null); + } + if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { + $object->setImage44($data['image_44']); + } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { + $object->setImage44(null); + } + if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { + $object->setImage68($data['image_68']); + } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { + $object->setImage68(null); + } + if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { + $object->setImage88($data['image_88']); + } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { + $object->setImage88(null); + } + if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { + $object->setImageDefault($data['image_default']); + } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { + $object->setImageDefault(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('image102') && null !== $object->getImage102()) { + $data['image_102'] = $object->getImage102(); + } + if ($object->isInitialized('image132') && null !== $object->getImage132()) { + $data['image_132'] = $object->getImage132(); + } + if ($object->isInitialized('image230') && null !== $object->getImage230()) { + $data['image_230'] = $object->getImage230(); + } + if ($object->isInitialized('image34') && null !== $object->getImage34()) { + $data['image_34'] = $object->getImage34(); + } + if ($object->isInitialized('image44') && null !== $object->getImage44()) { + $data['image_44'] = $object->getImage44(); + } + if ($object->isInitialized('image68') && null !== $object->getImage68()) { + $data['image_68'] = $object->getImage68(); + } + if ($object->isInitialized('image88') && null !== $object->getImage88()) { + $data['image_88'] = $object->getImage88(); + } + if ($object->isInitialized('imageDefault') && null !== $object->getImageDefault()) { + $data['image_default'] = $object->getImageDefault(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsIcon' => false]; + } } } diff --git a/generated/Normalizer/ObjsMessageAttachmentsItemActionsItemNormalizer.php b/generated/Normalizer/ObjsMessageAttachmentsItemActionsItemNormalizer.php index 7ee6a261..0997f1b5 100644 --- a/generated/Normalizer/ObjsMessageAttachmentsItemActionsItemNormalizer.php +++ b/generated/Normalizer/ObjsMessageAttachmentsItemActionsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,99 +24,195 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMessageAttachmentsItemActionsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMessageAttachmentsItemActionsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemActionsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemActionsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('style', $data) && null !== $data['style']) { + $object->setStyle($data['style']); + } elseif (\array_key_exists('style', $data) && null === $data['style']) { + $object->setStyle(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('style', $data) && null !== $data['style']) { - $object->setStyle($data['style']); - } elseif (\array_key_exists('style', $data) && null === $data['style']) { - $object->setStyle(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('style') && null !== $object->getStyle()) { + $data['style'] = $object->getStyle(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['value'] = $object->getValue(); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); + return $data; } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false]; } - if ($object->isInitialized('text') && null !== $object->getText()) { - $data['text'] = $object->getText(); + } +} else { + class ObjsMessageAttachmentsItemActionsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === $type; } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' === \get_class($data); } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemActionsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('style', $data) && null !== $data['style']) { + $object->setStyle($data['style']); + } elseif (\array_key_exists('style', $data) && null === $data['style']) { + $object->setStyle(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('style') && null !== $object->getStyle()) { + $data['style'] = $object->getStyle(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['value'] = $object->getValue(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem' => false]; + } } } diff --git a/generated/Normalizer/ObjsMessageAttachmentsItemFieldsItemNormalizer.php b/generated/Normalizer/ObjsMessageAttachmentsItemFieldsItemNormalizer.php index 9881cba8..b50914b5 100644 --- a/generated/Normalizer/ObjsMessageAttachmentsItemFieldsItemNormalizer.php +++ b/generated/Normalizer/ObjsMessageAttachmentsItemFieldsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMessageAttachmentsItemFieldsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMessageAttachmentsItemFieldsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemFieldsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemFieldsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('short', $data) && null !== $data['short']) { + $object->setShort($data['short']); + } elseif (\array_key_exists('short', $data) && null === $data['short']) { + $object->setShort(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + return $object; } - if (\array_key_exists('short', $data) && null !== $data['short']) { - $object->setShort($data['short']); - } elseif (\array_key_exists('short', $data) && null === $data['short']) { - $object->setShort(null); - } - if (\array_key_exists('title', $data) && null !== $data['title']) { - $object->setTitle($data['title']); - } elseif (\array_key_exists('title', $data) && null === $data['title']) { - $object->setTitle(null); - } - if (\array_key_exists('value', $data) && null !== $data['value']) { - $object->setValue($data['value']); - } elseif (\array_key_exists('value', $data) && null === $data['value']) { - $object->setValue(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('short') && null !== $object->getShort()) { + $data['short'] = $object->getShort(); + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['value'] = $object->getValue(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsMessageAttachmentsItemFieldsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('short') && null !== $object->getShort()) { - $data['short'] = $object->getShort(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === $type; } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' === \get_class($data); } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItemFieldsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('short', $data) && null !== $data['short']) { + $object->setShort($data['short']); + } elseif (\array_key_exists('short', $data) && null === $data['short']) { + $object->setShort(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('value', $data) && null !== $data['value']) { + $object->setValue($data['value']); + } elseif (\array_key_exists('value', $data) && null === $data['value']) { + $object->setValue(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('short') && null !== $object->getShort()) { + $data['short'] = $object->getShort(); + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['value'] = $object->getValue(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem' => false]; + } } } diff --git a/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php b/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php index 2241c365..f29c5f67 100644 --- a/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php +++ b/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,276 +24,549 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('actions', $data) && null !== $data['actions']) { + $values = []; + foreach ($data['actions'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem', 'json', $context); + } + $object->setActions($values); + unset($data['actions']); + } elseif (\array_key_exists('actions', $data) && null === $data['actions']) { + $object->setActions(null); + } + if (\array_key_exists('author_icon', $data) && null !== $data['author_icon']) { + $object->setAuthorIcon($data['author_icon']); + unset($data['author_icon']); + } elseif (\array_key_exists('author_icon', $data) && null === $data['author_icon']) { + $object->setAuthorIcon(null); + } + if (\array_key_exists('author_link', $data) && null !== $data['author_link']) { + $object->setAuthorLink($data['author_link']); + unset($data['author_link']); + } elseif (\array_key_exists('author_link', $data) && null === $data['author_link']) { + $object->setAuthorLink(null); + } + if (\array_key_exists('author_name', $data) && null !== $data['author_name']) { + $object->setAuthorName($data['author_name']); + unset($data['author_name']); + } elseif (\array_key_exists('author_name', $data) && null === $data['author_name']) { + $object->setAuthorName(null); + } + if (\array_key_exists('callback_id', $data) && null !== $data['callback_id']) { + $object->setCallbackId($data['callback_id']); + unset($data['callback_id']); + } elseif (\array_key_exists('callback_id', $data) && null === $data['callback_id']) { + $object->setCallbackId(null); + } + if (\array_key_exists('color', $data) && null !== $data['color']) { + $object->setColor($data['color']); + unset($data['color']); + } elseif (\array_key_exists('color', $data) && null === $data['color']) { + $object->setColor(null); + } + if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { + $object->setFallback($data['fallback']); + unset($data['fallback']); + } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { + $object->setFallback(null); + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values_1 = []; + foreach ($data['fields'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem', 'json', $context); + } + $object->setFields($values_1); + unset($data['fields']); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + if (\array_key_exists('footer', $data) && null !== $data['footer']) { + $object->setFooter($data['footer']); + unset($data['footer']); + } elseif (\array_key_exists('footer', $data) && null === $data['footer']) { + $object->setFooter(null); + } + if (\array_key_exists('footer_icon', $data) && null !== $data['footer_icon']) { + $object->setFooterIcon($data['footer_icon']); + unset($data['footer_icon']); + } elseif (\array_key_exists('footer_icon', $data) && null === $data['footer_icon']) { + $object->setFooterIcon(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + unset($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_bytes', $data) && null !== $data['image_bytes']) { + $object->setImageBytes($data['image_bytes']); + unset($data['image_bytes']); + } elseif (\array_key_exists('image_bytes', $data) && null === $data['image_bytes']) { + $object->setImageBytes(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('image_url', $data) && null !== $data['image_url']) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('pretext', $data) && null !== $data['pretext']) { + $object->setPretext($data['pretext']); + unset($data['pretext']); + } elseif (\array_key_exists('pretext', $data) && null === $data['pretext']) { + $object->setPretext(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + unset($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thumb_url', $data) && null !== $data['thumb_url']) { + $object->setThumbUrl($data['thumb_url']); + unset($data['thumb_url']); + } elseif (\array_key_exists('thumb_url', $data) && null === $data['thumb_url']) { + $object->setThumbUrl(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + unset($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('title_link', $data) && null !== $data['title_link']) { + $object->setTitleLink($data['title_link']); + unset($data['title_link']); + } elseif (\array_key_exists('title_link', $data) && null === $data['title_link']) { + $object->setTitleLink(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $value_2 = $data['ts']; + if (\is_float($data['ts'])) { + $value_2 = $data['ts']; + } elseif (\is_string($data['ts'])) { + $value_2 = $data['ts']; + } + $object->setTs($value_2); + unset($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + foreach ($data as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_3; + } + } + return $object; } - if (\array_key_exists('actions', $data) && null !== $data['actions']) { - $values = []; - foreach ($data['actions'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem', 'json', $context); - } - $object->setActions($values); - unset($data['actions']); - } elseif (\array_key_exists('actions', $data) && null === $data['actions']) { - $object->setActions(null); - } - if (\array_key_exists('author_icon', $data) && null !== $data['author_icon']) { - $object->setAuthorIcon($data['author_icon']); - unset($data['author_icon']); - } elseif (\array_key_exists('author_icon', $data) && null === $data['author_icon']) { - $object->setAuthorIcon(null); - } - if (\array_key_exists('author_link', $data) && null !== $data['author_link']) { - $object->setAuthorLink($data['author_link']); - unset($data['author_link']); - } elseif (\array_key_exists('author_link', $data) && null === $data['author_link']) { - $object->setAuthorLink(null); - } - if (\array_key_exists('author_name', $data) && null !== $data['author_name']) { - $object->setAuthorName($data['author_name']); - unset($data['author_name']); - } elseif (\array_key_exists('author_name', $data) && null === $data['author_name']) { - $object->setAuthorName(null); - } - if (\array_key_exists('callback_id', $data) && null !== $data['callback_id']) { - $object->setCallbackId($data['callback_id']); - unset($data['callback_id']); - } elseif (\array_key_exists('callback_id', $data) && null === $data['callback_id']) { - $object->setCallbackId(null); - } - if (\array_key_exists('color', $data) && null !== $data['color']) { - $object->setColor($data['color']); - unset($data['color']); - } elseif (\array_key_exists('color', $data) && null === $data['color']) { - $object->setColor(null); - } - if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { - $object->setFallback($data['fallback']); - unset($data['fallback']); - } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { - $object->setFallback(null); - } - if (\array_key_exists('fields', $data) && null !== $data['fields']) { - $values_1 = []; - foreach ($data['fields'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem', 'json', $context); - } - $object->setFields($values_1); - unset($data['fields']); - } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { - $object->setFields(null); - } - if (\array_key_exists('footer', $data) && null !== $data['footer']) { - $object->setFooter($data['footer']); - unset($data['footer']); - } elseif (\array_key_exists('footer', $data) && null === $data['footer']) { - $object->setFooter(null); - } - if (\array_key_exists('footer_icon', $data) && null !== $data['footer_icon']) { - $object->setFooterIcon($data['footer_icon']); - unset($data['footer_icon']); - } elseif (\array_key_exists('footer_icon', $data) && null === $data['footer_icon']) { - $object->setFooterIcon(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - unset($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('image_bytes', $data) && null !== $data['image_bytes']) { - $object->setImageBytes($data['image_bytes']); - unset($data['image_bytes']); - } elseif (\array_key_exists('image_bytes', $data) && null === $data['image_bytes']) { - $object->setImageBytes(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('image_url', $data) && null !== $data['image_url']) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { - $object->setImageUrl(null); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('pretext', $data) && null !== $data['pretext']) { - $object->setPretext($data['pretext']); - unset($data['pretext']); - } elseif (\array_key_exists('pretext', $data) && null === $data['pretext']) { - $object->setPretext(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - unset($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('actions') && null !== $object->getActions()) { + $values = []; + foreach ($object->getActions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['actions'] = $values; + } + if ($object->isInitialized('authorIcon') && null !== $object->getAuthorIcon()) { + $data['author_icon'] = $object->getAuthorIcon(); + } + if ($object->isInitialized('authorLink') && null !== $object->getAuthorLink()) { + $data['author_link'] = $object->getAuthorLink(); + } + if ($object->isInitialized('authorName') && null !== $object->getAuthorName()) { + $data['author_name'] = $object->getAuthorName(); + } + if ($object->isInitialized('callbackId') && null !== $object->getCallbackId()) { + $data['callback_id'] = $object->getCallbackId(); + } + if ($object->isInitialized('color') && null !== $object->getColor()) { + $data['color'] = $object->getColor(); + } + if ($object->isInitialized('fallback') && null !== $object->getFallback()) { + $data['fallback'] = $object->getFallback(); + } + if ($object->isInitialized('fields') && null !== $object->getFields()) { + $values_1 = []; + foreach ($object->getFields() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['fields'] = $values_1; + } + if ($object->isInitialized('footer') && null !== $object->getFooter()) { + $data['footer'] = $object->getFooter(); + } + if ($object->isInitialized('footerIcon') && null !== $object->getFooterIcon()) { + $data['footer_icon'] = $object->getFooterIcon(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('imageBytes') && null !== $object->getImageBytes()) { + $data['image_bytes'] = $object->getImageBytes(); + } + if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { + $data['image_height'] = $object->getImageHeight(); + } + if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { + $data['image_width'] = $object->getImageWidth(); + } + if ($object->isInitialized('pretext') && null !== $object->getPretext()) { + $data['pretext'] = $object->getPretext(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + if ($object->isInitialized('thumbUrl') && null !== $object->getThumbUrl()) { + $data['thumb_url'] = $object->getThumbUrl(); + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('titleLink') && null !== $object->getTitleLink()) { + $data['title_link'] = $object->getTitleLink(); + } + if ($object->isInitialized('ts') && null !== $object->getTs()) { + $value_2 = $object->getTs(); + if (\is_float($object->getTs())) { + $value_2 = $object->getTs(); + } elseif (\is_string($object->getTs())) { + $value_2 = $object->getTs(); + } + $data['ts'] = $value_2; + } + foreach ($object as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_3; + } + } + + return $data; } - if (\array_key_exists('thumb_url', $data) && null !== $data['thumb_url']) { - $object->setThumbUrl($data['thumb_url']); - unset($data['thumb_url']); - } elseif (\array_key_exists('thumb_url', $data) && null === $data['thumb_url']) { - $object->setThumbUrl(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false]; } - if (\array_key_exists('title', $data) && null !== $data['title']) { - $object->setTitle($data['title']); - unset($data['title']); - } elseif (\array_key_exists('title', $data) && null === $data['title']) { - $object->setTitle(null); + } +} else { + class ObjsMessageAttachmentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === $type; } - if (\array_key_exists('title_link', $data) && null !== $data['title_link']) { - $object->setTitleLink($data['title_link']); - unset($data['title_link']); - } elseif (\array_key_exists('title_link', $data) && null === $data['title_link']) { - $object->setTitleLink(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' === \get_class($data); } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $value_2 = $data['ts']; - if (\is_float($data['ts'])) { - $value_2 = $data['ts']; - } elseif (\is_string($data['ts'])) { + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('actions', $data) && null !== $data['actions']) { + $values = []; + foreach ($data['actions'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemActionsItem', 'json', $context); + } + $object->setActions($values); + unset($data['actions']); + } elseif (\array_key_exists('actions', $data) && null === $data['actions']) { + $object->setActions(null); + } + if (\array_key_exists('author_icon', $data) && null !== $data['author_icon']) { + $object->setAuthorIcon($data['author_icon']); + unset($data['author_icon']); + } elseif (\array_key_exists('author_icon', $data) && null === $data['author_icon']) { + $object->setAuthorIcon(null); + } + if (\array_key_exists('author_link', $data) && null !== $data['author_link']) { + $object->setAuthorLink($data['author_link']); + unset($data['author_link']); + } elseif (\array_key_exists('author_link', $data) && null === $data['author_link']) { + $object->setAuthorLink(null); + } + if (\array_key_exists('author_name', $data) && null !== $data['author_name']) { + $object->setAuthorName($data['author_name']); + unset($data['author_name']); + } elseif (\array_key_exists('author_name', $data) && null === $data['author_name']) { + $object->setAuthorName(null); + } + if (\array_key_exists('callback_id', $data) && null !== $data['callback_id']) { + $object->setCallbackId($data['callback_id']); + unset($data['callback_id']); + } elseif (\array_key_exists('callback_id', $data) && null === $data['callback_id']) { + $object->setCallbackId(null); + } + if (\array_key_exists('color', $data) && null !== $data['color']) { + $object->setColor($data['color']); + unset($data['color']); + } elseif (\array_key_exists('color', $data) && null === $data['color']) { + $object->setColor(null); + } + if (\array_key_exists('fallback', $data) && null !== $data['fallback']) { + $object->setFallback($data['fallback']); + unset($data['fallback']); + } elseif (\array_key_exists('fallback', $data) && null === $data['fallback']) { + $object->setFallback(null); + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values_1 = []; + foreach ($data['fields'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItemFieldsItem', 'json', $context); + } + $object->setFields($values_1); + unset($data['fields']); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + if (\array_key_exists('footer', $data) && null !== $data['footer']) { + $object->setFooter($data['footer']); + unset($data['footer']); + } elseif (\array_key_exists('footer', $data) && null === $data['footer']) { + $object->setFooter(null); + } + if (\array_key_exists('footer_icon', $data) && null !== $data['footer_icon']) { + $object->setFooterIcon($data['footer_icon']); + unset($data['footer_icon']); + } elseif (\array_key_exists('footer_icon', $data) && null === $data['footer_icon']) { + $object->setFooterIcon(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + unset($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_bytes', $data) && null !== $data['image_bytes']) { + $object->setImageBytes($data['image_bytes']); + unset($data['image_bytes']); + } elseif (\array_key_exists('image_bytes', $data) && null === $data['image_bytes']) { + $object->setImageBytes(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('image_url', $data) && null !== $data['image_url']) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } elseif (\array_key_exists('image_url', $data) && null === $data['image_url']) { + $object->setImageUrl(null); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('pretext', $data) && null !== $data['pretext']) { + $object->setPretext($data['pretext']); + unset($data['pretext']); + } elseif (\array_key_exists('pretext', $data) && null === $data['pretext']) { + $object->setPretext(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + unset($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thumb_url', $data) && null !== $data['thumb_url']) { + $object->setThumbUrl($data['thumb_url']); + unset($data['thumb_url']); + } elseif (\array_key_exists('thumb_url', $data) && null === $data['thumb_url']) { + $object->setThumbUrl(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + unset($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('title_link', $data) && null !== $data['title_link']) { + $object->setTitleLink($data['title_link']); + unset($data['title_link']); + } elseif (\array_key_exists('title_link', $data) && null === $data['title_link']) { + $object->setTitleLink(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { $value_2 = $data['ts']; + if (\is_float($data['ts'])) { + $value_2 = $data['ts']; + } elseif (\is_string($data['ts'])) { + $value_2 = $data['ts']; + } + $object->setTs($value_2); + unset($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); } - $object->setTs($value_2); - unset($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); - } - foreach ($data as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_3; + foreach ($data as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_3; + } } - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('actions') && null !== $object->getActions()) { - $values = []; - foreach ($object->getActions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('actions') && null !== $object->getActions()) { + $values = []; + foreach ($object->getActions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['actions'] = $values; } - $data['actions'] = $values; - } - if ($object->isInitialized('authorIcon') && null !== $object->getAuthorIcon()) { - $data['author_icon'] = $object->getAuthorIcon(); - } - if ($object->isInitialized('authorLink') && null !== $object->getAuthorLink()) { - $data['author_link'] = $object->getAuthorLink(); - } - if ($object->isInitialized('authorName') && null !== $object->getAuthorName()) { - $data['author_name'] = $object->getAuthorName(); - } - if ($object->isInitialized('callbackId') && null !== $object->getCallbackId()) { - $data['callback_id'] = $object->getCallbackId(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('fallback') && null !== $object->getFallback()) { - $data['fallback'] = $object->getFallback(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values_1 = []; - foreach ($object->getFields() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + if ($object->isInitialized('authorIcon') && null !== $object->getAuthorIcon()) { + $data['author_icon'] = $object->getAuthorIcon(); } - $data['fields'] = $values_1; - } - if ($object->isInitialized('footer') && null !== $object->getFooter()) { - $data['footer'] = $object->getFooter(); - } - if ($object->isInitialized('footerIcon') && null !== $object->getFooterIcon()) { - $data['footer_icon'] = $object->getFooterIcon(); - } - $data['id'] = $object->getId(); - if ($object->isInitialized('imageBytes') && null !== $object->getImageBytes()) { - $data['image_bytes'] = $object->getImageBytes(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('pretext') && null !== $object->getPretext()) { - $data['pretext'] = $object->getPretext(); - } - if ($object->isInitialized('text') && null !== $object->getText()) { - $data['text'] = $object->getText(); - } - if ($object->isInitialized('thumbUrl') && null !== $object->getThumbUrl()) { - $data['thumb_url'] = $object->getThumbUrl(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('titleLink') && null !== $object->getTitleLink()) { - $data['title_link'] = $object->getTitleLink(); - } - if ($object->isInitialized('ts') && null !== $object->getTs()) { - $value_2 = $object->getTs(); - if (\is_float($object->getTs())) { - $value_2 = $object->getTs(); - } elseif (\is_string($object->getTs())) { + if ($object->isInitialized('authorLink') && null !== $object->getAuthorLink()) { + $data['author_link'] = $object->getAuthorLink(); + } + if ($object->isInitialized('authorName') && null !== $object->getAuthorName()) { + $data['author_name'] = $object->getAuthorName(); + } + if ($object->isInitialized('callbackId') && null !== $object->getCallbackId()) { + $data['callback_id'] = $object->getCallbackId(); + } + if ($object->isInitialized('color') && null !== $object->getColor()) { + $data['color'] = $object->getColor(); + } + if ($object->isInitialized('fallback') && null !== $object->getFallback()) { + $data['fallback'] = $object->getFallback(); + } + if ($object->isInitialized('fields') && null !== $object->getFields()) { + $values_1 = []; + foreach ($object->getFields() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['fields'] = $values_1; + } + if ($object->isInitialized('footer') && null !== $object->getFooter()) { + $data['footer'] = $object->getFooter(); + } + if ($object->isInitialized('footerIcon') && null !== $object->getFooterIcon()) { + $data['footer_icon'] = $object->getFooterIcon(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('imageBytes') && null !== $object->getImageBytes()) { + $data['image_bytes'] = $object->getImageBytes(); + } + if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { + $data['image_height'] = $object->getImageHeight(); + } + if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { + $data['image_url'] = $object->getImageUrl(); + } + if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { + $data['image_width'] = $object->getImageWidth(); + } + if ($object->isInitialized('pretext') && null !== $object->getPretext()) { + $data['pretext'] = $object->getPretext(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); + } + if ($object->isInitialized('thumbUrl') && null !== $object->getThumbUrl()) { + $data['thumb_url'] = $object->getThumbUrl(); + } + if ($object->isInitialized('title') && null !== $object->getTitle()) { + $data['title'] = $object->getTitle(); + } + if ($object->isInitialized('titleLink') && null !== $object->getTitleLink()) { + $data['title_link'] = $object->getTitleLink(); + } + if ($object->isInitialized('ts') && null !== $object->getTs()) { $value_2 = $object->getTs(); + if (\is_float($object->getTs())) { + $value_2 = $object->getTs(); + } elseif (\is_string($object->getTs())) { + $value_2 = $object->getTs(); + } + $data['ts'] = $value_2; } - $data['ts'] = $value_2; - } - foreach ($object as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_3; + foreach ($object as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_3; + } } - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem' => false]; + } } } diff --git a/generated/Normalizer/ObjsMessageIconsNormalizer.php b/generated/Normalizer/ObjsMessageIconsNormalizer.php index d78728ed..c06e072f 100644 --- a/generated/Normalizer/ObjsMessageIconsNormalizer.php +++ b/generated/Normalizer/ObjsMessageIconsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,67 +24,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMessageIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMessageIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMessageIcons(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('emoji', $data) && null !== $data['emoji']) { + $object->setEmoji($data['emoji']); + } elseif (\array_key_exists('emoji', $data) && null === $data['emoji']) { + $object->setEmoji(null); + } + if (\array_key_exists('image_64', $data) && null !== $data['image_64']) { + $object->setImage64($data['image_64']); + } elseif (\array_key_exists('image_64', $data) && null === $data['image_64']) { + $object->setImage64(null); + } + return $object; } - if (\array_key_exists('emoji', $data) && null !== $data['emoji']) { - $object->setEmoji($data['emoji']); - } elseif (\array_key_exists('emoji', $data) && null === $data['emoji']) { - $object->setEmoji(null); - } - if (\array_key_exists('image_64', $data) && null !== $data['image_64']) { - $object->setImage64($data['image_64']); - } elseif (\array_key_exists('image_64', $data) && null === $data['image_64']) { - $object->setImage64(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('emoji') && null !== $object->getEmoji()) { + $data['emoji'] = $object->getEmoji(); + } + if ($object->isInitialized('image64') && null !== $object->getImage64()) { + $data['image_64'] = $object->getImage64(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsMessageIconsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('emoji') && null !== $object->getEmoji()) { - $data['emoji'] = $object->getEmoji(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === $type; } - if ($object->isInitialized('image64') && null !== $object->getImage64()) { - $data['image_64'] = $object->getImage64(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessageIcons(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('emoji', $data) && null !== $data['emoji']) { + $object->setEmoji($data['emoji']); + } elseif (\array_key_exists('emoji', $data) && null === $data['emoji']) { + $object->setEmoji(null); + } + if (\array_key_exists('image_64', $data) && null !== $data['image_64']) { + $object->setImage64($data['image_64']); + } elseif (\array_key_exists('image_64', $data) && null === $data['image_64']) { + $object->setImage64(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('emoji') && null !== $object->getEmoji()) { + $data['emoji'] = $object->getEmoji(); + } + if ($object->isInitialized('image64') && null !== $object->getImage64()) { + $data['image_64'] = $object->getImage64(); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons' => false]; + } } } diff --git a/generated/Normalizer/ObjsMessageNormalizer.php b/generated/Normalizer/ObjsMessageNormalizer.php index 353ab61a..c1896d5e 100644 --- a/generated/Normalizer/ObjsMessageNormalizer.php +++ b/generated/Normalizer/ObjsMessageNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,429 +24,855 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMessage(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessage(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem', 'json', $context); + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { + $values_1 = []; + foreach ($data['blocks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\BlocksItem', 'json', $context); + } + $object->setBlocks($values_1); + } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { + $object->setBlocks(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { + $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); + } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { + $object->setBotProfile(null); + } + if (\array_key_exists('client_msg_id', $data) && null !== $data['client_msg_id']) { + $object->setClientMsgId($data['client_msg_id']); + } elseif (\array_key_exists('client_msg_id', $data) && null === $data['client_msg_id']) { + $object->setClientMsgId(null); + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { + $object->setDisplayAsBot($data['display_as_bot']); + } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { + $object->setDisplayAsBot(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('files', $data) && null !== $data['files']) { + $values_2 = []; + foreach ($data['files'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); + } + $object->setFiles($values_2); + } elseif (\array_key_exists('files', $data) && null === $data['files']) { + $object->setFiles(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('inviter', $data) && null !== $data['inviter']) { + $object->setInviter($data['inviter']); + } elseif (\array_key_exists('inviter', $data) && null === $data['inviter']) { + $object->setInviter(null); + } + if (\array_key_exists('is_delayed_message', $data) && null !== $data['is_delayed_message']) { + $object->setIsDelayedMessage($data['is_delayed_message']); + } elseif (\array_key_exists('is_delayed_message', $data) && null === $data['is_delayed_message']) { + $object->setIsDelayedMessage(null); + } + if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { + $object->setIsIntro($data['is_intro']); + } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { + $object->setIsIntro(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { + $object->setLatestReply($data['latest_reply']); + } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { + $object->setLatestReply(null); + } + if (\array_key_exists('metadata', $data) && null !== $data['metadata']) { + $object->setMetadata($this->denormalizer->denormalize($data['metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata', 'json', $context)); + } elseif (\array_key_exists('metadata', $data) && null === $data['metadata']) { + $object->setMetadata(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('old_name', $data) && null !== $data['old_name']) { + $object->setOldName($data['old_name']); + } elseif (\array_key_exists('old_name', $data) && null === $data['old_name']) { + $object->setOldName(null); + } + if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { + $object->setParentUserId($data['parent_user_id']); + } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { + $object->setParentUserId(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values_3 = []; + foreach ($data['pinned_to'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPinnedTo($values_3); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($data['purpose']); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_4 = []; + foreach ($data['reactions'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_4); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { + $object->setReplyCount($data['reply_count']); + } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { + $object->setReplyCount(null); + } + if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { + $values_5 = []; + foreach ($data['reply_users'] as $value_5) { + $values_5[] = $value_5; + } + $object->setReplyUsers($values_5); + } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { + $object->setReplyUsers(null); + } + if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { + $object->setReplyUsersCount($data['reply_users_count']); + } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { + $object->setReplyUsersCount(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { + $object->setSubscribed($data['subscribed']); + } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { + $object->setSubscribed(null); + } + if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { + $object->setSubtype($data['subtype']); + } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { + $object->setSubtype(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($data['topic']); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('upload', $data) && null !== $data['upload']) { + $object->setUpload($data['upload']); + } elseif (\array_key_exists('upload', $data) && null === $data['upload']) { + $object->setUpload(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + return $object; } - if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { - $values = []; - foreach ($data['attachments'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem', 'json', $context); - } - $object->setAttachments($values); - } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { - $object->setAttachments(null); - } - if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { - $values_1 = []; - foreach ($data['blocks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\BlocksItem', 'json', $context); - } - $object->setBlocks($values_1); - } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { - $object->setBlocks(null); - } - if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { - $object->setBotId($data['bot_id']); - } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { - $object->setBotId(null); - } - if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { - $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); - } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { - $object->setBotProfile(null); - } - if (\array_key_exists('client_msg_id', $data) && null !== $data['client_msg_id']) { - $object->setClientMsgId($data['client_msg_id']); - } elseif (\array_key_exists('client_msg_id', $data) && null === $data['client_msg_id']) { - $object->setClientMsgId(null); - } - if (\array_key_exists('comment', $data) && null !== $data['comment']) { - $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); - } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { - $object->setComment(null); - } - if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { - $object->setDisplayAsBot($data['display_as_bot']); - } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { - $object->setDisplayAsBot(null); - } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('files', $data) && null !== $data['files']) { - $values_2 = []; - foreach ($data['files'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); - } - $object->setFiles($values_2); - } elseif (\array_key_exists('files', $data) && null === $data['files']) { - $object->setFiles(null); - } - if (\array_key_exists('icons', $data) && null !== $data['icons']) { - $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons', 'json', $context)); - } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { - $object->setIcons(null); - } - if (\array_key_exists('inviter', $data) && null !== $data['inviter']) { - $object->setInviter($data['inviter']); - } elseif (\array_key_exists('inviter', $data) && null === $data['inviter']) { - $object->setInviter(null); - } - if (\array_key_exists('is_delayed_message', $data) && null !== $data['is_delayed_message']) { - $object->setIsDelayedMessage($data['is_delayed_message']); - } elseif (\array_key_exists('is_delayed_message', $data) && null === $data['is_delayed_message']) { - $object->setIsDelayedMessage(null); - } - if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { - $object->setIsIntro($data['is_intro']); - } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { - $object->setIsIntro(null); - } - if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { - $object->setIsStarred($data['is_starred']); - } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { - $object->setIsStarred(null); - } - if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { - $object->setLastRead($data['last_read']); - } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { - $object->setLastRead(null); - } - if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { - $object->setLatestReply($data['latest_reply']); - } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { - $object->setLatestReply(null); - } - if (\array_key_exists('metadata', $data) && null !== $data['metadata']) { - $object->setMetadata($this->denormalizer->denormalize($data['metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata', 'json', $context)); - } elseif (\array_key_exists('metadata', $data) && null === $data['metadata']) { - $object->setMetadata(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('old_name', $data) && null !== $data['old_name']) { - $object->setOldName($data['old_name']); - } elseif (\array_key_exists('old_name', $data) && null === $data['old_name']) { - $object->setOldName(null); - } - if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { - $object->setParentUserId($data['parent_user_id']); - } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { - $object->setParentUserId(null); - } - if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { - $object->setPermalink($data['permalink']); - } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { - $object->setPermalink(null); - } - if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { - $values_3 = []; - foreach ($data['pinned_to'] as $value_3) { - $values_3[] = $value_3; - } - $object->setPinnedTo($values_3); - } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { - $object->setPinnedTo(null); - } - if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { - $object->setPurpose($data['purpose']); - } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { - $object->setPurpose(null); - } - if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { - $values_4 = []; - foreach ($data['reactions'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); - } - $object->setReactions($values_4); - } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { - $object->setReactions(null); - } - if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { - $object->setReplyCount($data['reply_count']); - } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { - $object->setReplyCount(null); - } - if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { - $values_5 = []; - foreach ($data['reply_users'] as $value_5) { - $values_5[] = $value_5; - } - $object->setReplyUsers($values_5); - } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { - $object->setReplyUsers(null); - } - if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { - $object->setReplyUsersCount($data['reply_users_count']); - } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { - $object->setReplyUsersCount(null); - } - if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { - $object->setSourceTeam($data['source_team']); - } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { - $object->setSourceTeam(null); - } - if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { - $object->setSubscribed($data['subscribed']); - } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { - $object->setSubscribed(null); - } - if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { - $object->setSubtype($data['subtype']); - } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { - $object->setSubtype(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); - } - if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { - $object->setThreadTs($data['thread_ts']); - } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { - $object->setThreadTs(null); - } - if (\array_key_exists('topic', $data) && null !== $data['topic']) { - $object->setTopic($data['topic']); - } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { - $object->setTopic(null); - } - if (\array_key_exists('ts', $data) && null !== $data['ts']) { - $object->setTs($data['ts']); - } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { - $object->setTs(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { - $object->setUnreadCount($data['unread_count']); - } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { - $object->setUnreadCount(null); - } - if (\array_key_exists('upload', $data) && null !== $data['upload']) { - $object->setUpload($data['upload']); - } elseif (\array_key_exists('upload', $data) && null === $data['upload']) { - $object->setUpload(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { - $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); - } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { - $object->setUserProfile(null); - } - if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { - $object->setUserTeam($data['user_team']); - } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { - $object->setUserTeam(null); - } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $object->setUsername($data['username']); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); - } - - return $object; - } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { - $values = []; - foreach ($object->getAttachments() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['attachments'] = $values; } - $data['attachments'] = $values; - } - if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { - $values_1 = []; - foreach ($object->getBlocks() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { + $values_1 = []; + foreach ($object->getBlocks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['blocks'] = $values_1; } - $data['blocks'] = $values_1; - } - if ($object->isInitialized('botId') && null !== $object->getBotId()) { - $data['bot_id'] = $object->getBotId(); - } - if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { - $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); - } - if ($object->isInitialized('clientMsgId') && null !== $object->getClientMsgId()) { - $data['client_msg_id'] = $object->getClientMsgId(); - } - if ($object->isInitialized('comment') && null !== $object->getComment()) { - $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); - } - if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { - $data['display_as_bot'] = $object->getDisplayAsBot(); - } - if ($object->isInitialized('file') && null !== $object->getFile()) { - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - } - if ($object->isInitialized('files') && null !== $object->getFiles()) { - $values_2 = []; - foreach ($object->getFiles() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); } - $data['files'] = $values_2; - } - if ($object->isInitialized('icons') && null !== $object->getIcons()) { - $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); - } - if ($object->isInitialized('inviter') && null !== $object->getInviter()) { - $data['inviter'] = $object->getInviter(); - } - if ($object->isInitialized('isDelayedMessage') && null !== $object->getIsDelayedMessage()) { - $data['is_delayed_message'] = $object->getIsDelayedMessage(); - } - if ($object->isInitialized('isIntro') && null !== $object->getIsIntro()) { - $data['is_intro'] = $object->getIsIntro(); - } - if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { - $data['is_starred'] = $object->getIsStarred(); - } - if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { - $data['last_read'] = $object->getLastRead(); - } - if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { - $data['latest_reply'] = $object->getLatestReply(); - } - if ($object->isInitialized('metadata') && null !== $object->getMetadata()) { - $data['metadata'] = $this->normalizer->normalize($object->getMetadata(), 'json', $context); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('oldName') && null !== $object->getOldName()) { - $data['old_name'] = $object->getOldName(); - } - if ($object->isInitialized('parentUserId') && null !== $object->getParentUserId()) { - $data['parent_user_id'] = $object->getParentUserId(); - } - if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { - $data['permalink'] = $object->getPermalink(); - } - if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { - $values_3 = []; - foreach ($object->getPinnedTo() as $value_3) { - $values_3[] = $value_3; + if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { + $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); } - $data['pinned_to'] = $values_3; - } - if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { - $data['purpose'] = $object->getPurpose(); - } - if ($object->isInitialized('reactions') && null !== $object->getReactions()) { - $values_4 = []; - foreach ($object->getReactions() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + if ($object->isInitialized('clientMsgId') && null !== $object->getClientMsgId()) { + $data['client_msg_id'] = $object->getClientMsgId(); } - $data['reactions'] = $values_4; - } - if ($object->isInitialized('replyCount') && null !== $object->getReplyCount()) { - $data['reply_count'] = $object->getReplyCount(); - } - if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { - $values_5 = []; - foreach ($object->getReplyUsers() as $value_5) { - $values_5[] = $value_5; + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); } - $data['reply_users'] = $values_5; - } - if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { - $data['reply_users_count'] = $object->getReplyUsersCount(); - } - if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { - $data['source_team'] = $object->getSourceTeam(); - } - if ($object->isInitialized('subscribed') && null !== $object->getSubscribed()) { - $data['subscribed'] = $object->getSubscribed(); - } - if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { - $data['subtype'] = $object->getSubtype(); - } - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $data['team'] = $object->getTeam(); - } - $data['text'] = $object->getText(); - if ($object->isInitialized('threadTs') && null !== $object->getThreadTs()) { - $data['thread_ts'] = $object->getThreadTs(); - } - if ($object->isInitialized('topic') && null !== $object->getTopic()) { - $data['topic'] = $object->getTopic(); - } - $data['ts'] = $object->getTs(); - $data['type'] = $object->getType(); - if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { - $data['unread_count'] = $object->getUnreadCount(); - } - if ($object->isInitialized('upload') && null !== $object->getUpload()) { - $data['upload'] = $object->getUpload(); + if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { + $data['display_as_bot'] = $object->getDisplayAsBot(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('files') && null !== $object->getFiles()) { + $values_2 = []; + foreach ($object->getFiles() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['files'] = $values_2; + } + if ($object->isInitialized('icons') && null !== $object->getIcons()) { + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + } + if ($object->isInitialized('inviter') && null !== $object->getInviter()) { + $data['inviter'] = $object->getInviter(); + } + if ($object->isInitialized('isDelayedMessage') && null !== $object->getIsDelayedMessage()) { + $data['is_delayed_message'] = $object->getIsDelayedMessage(); + } + if ($object->isInitialized('isIntro') && null !== $object->getIsIntro()) { + $data['is_intro'] = $object->getIsIntro(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { + $data['latest_reply'] = $object->getLatestReply(); + } + if ($object->isInitialized('metadata') && null !== $object->getMetadata()) { + $data['metadata'] = $this->normalizer->normalize($object->getMetadata(), 'json', $context); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('oldName') && null !== $object->getOldName()) { + $data['old_name'] = $object->getOldName(); + } + if ($object->isInitialized('parentUserId') && null !== $object->getParentUserId()) { + $data['parent_user_id'] = $object->getParentUserId(); + } + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values_3 = []; + foreach ($object->getPinnedTo() as $value_3) { + $values_3[] = $value_3; + } + $data['pinned_to'] = $values_3; + } + if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { + $data['purpose'] = $object->getPurpose(); + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_4 = []; + foreach ($object->getReactions() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['reactions'] = $values_4; + } + if ($object->isInitialized('replyCount') && null !== $object->getReplyCount()) { + $data['reply_count'] = $object->getReplyCount(); + } + if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { + $values_5 = []; + foreach ($object->getReplyUsers() as $value_5) { + $values_5[] = $value_5; + } + $data['reply_users'] = $values_5; + } + if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { + $data['reply_users_count'] = $object->getReplyUsersCount(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('subscribed') && null !== $object->getSubscribed()) { + $data['subscribed'] = $object->getSubscribed(); + } + if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { + $data['subtype'] = $object->getSubtype(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + if ($object->isInitialized('threadTs') && null !== $object->getThreadTs()) { + $data['thread_ts'] = $object->getThreadTs(); + } + if ($object->isInitialized('topic') && null !== $object->getTopic()) { + $data['topic'] = $object->getTopic(); + } + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('upload') && null !== $object->getUpload()) { + $data['upload'] = $object->getUpload(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + + return $data; } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $object->getUser(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false]; } - if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { - $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } +} else { + class ObjsMessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === $type; } - if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { - $data['user_team'] = $object->getUserTeam(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMessage' === \get_class($data); } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMessage(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attachments', $data) && null !== $data['attachments']) { + $values = []; + foreach ($data['attachments'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsMessageAttachmentsItem', 'json', $context); + } + $object->setAttachments($values); + } elseif (\array_key_exists('attachments', $data) && null === $data['attachments']) { + $object->setAttachments(null); + } + if (\array_key_exists('blocks', $data) && null !== $data['blocks']) { + $values_1 = []; + foreach ($data['blocks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\BlocksItem', 'json', $context); + } + $object->setBlocks($values_1); + } elseif (\array_key_exists('blocks', $data) && null === $data['blocks']) { + $object->setBlocks(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('bot_profile', $data) && null !== $data['bot_profile']) { + $object->setBotProfile($this->denormalizer->denormalize($data['bot_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsBotProfile', 'json', $context)); + } elseif (\array_key_exists('bot_profile', $data) && null === $data['bot_profile']) { + $object->setBotProfile(null); + } + if (\array_key_exists('client_msg_id', $data) && null !== $data['client_msg_id']) { + $object->setClientMsgId($data['client_msg_id']); + } elseif (\array_key_exists('client_msg_id', $data) && null === $data['client_msg_id']) { + $object->setClientMsgId(null); + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('display_as_bot', $data) && null !== $data['display_as_bot']) { + $object->setDisplayAsBot($data['display_as_bot']); + } elseif (\array_key_exists('display_as_bot', $data) && null === $data['display_as_bot']) { + $object->setDisplayAsBot(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('files', $data) && null !== $data['files']) { + $values_2 = []; + foreach ($data['files'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context); + } + $object->setFiles($values_2); + } elseif (\array_key_exists('files', $data) && null === $data['files']) { + $object->setFiles(null); + } + if (\array_key_exists('icons', $data) && null !== $data['icons']) { + $object->setIcons($this->denormalizer->denormalize($data['icons'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessageIcons', 'json', $context)); + } elseif (\array_key_exists('icons', $data) && null === $data['icons']) { + $object->setIcons(null); + } + if (\array_key_exists('inviter', $data) && null !== $data['inviter']) { + $object->setInviter($data['inviter']); + } elseif (\array_key_exists('inviter', $data) && null === $data['inviter']) { + $object->setInviter(null); + } + if (\array_key_exists('is_delayed_message', $data) && null !== $data['is_delayed_message']) { + $object->setIsDelayedMessage($data['is_delayed_message']); + } elseif (\array_key_exists('is_delayed_message', $data) && null === $data['is_delayed_message']) { + $object->setIsDelayedMessage(null); + } + if (\array_key_exists('is_intro', $data) && null !== $data['is_intro']) { + $object->setIsIntro($data['is_intro']); + } elseif (\array_key_exists('is_intro', $data) && null === $data['is_intro']) { + $object->setIsIntro(null); + } + if (\array_key_exists('is_starred', $data) && null !== $data['is_starred']) { + $object->setIsStarred($data['is_starred']); + } elseif (\array_key_exists('is_starred', $data) && null === $data['is_starred']) { + $object->setIsStarred(null); + } + if (\array_key_exists('last_read', $data) && null !== $data['last_read']) { + $object->setLastRead($data['last_read']); + } elseif (\array_key_exists('last_read', $data) && null === $data['last_read']) { + $object->setLastRead(null); + } + if (\array_key_exists('latest_reply', $data) && null !== $data['latest_reply']) { + $object->setLatestReply($data['latest_reply']); + } elseif (\array_key_exists('latest_reply', $data) && null === $data['latest_reply']) { + $object->setLatestReply(null); + } + if (\array_key_exists('metadata', $data) && null !== $data['metadata']) { + $object->setMetadata($this->denormalizer->denormalize($data['metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata', 'json', $context)); + } elseif (\array_key_exists('metadata', $data) && null === $data['metadata']) { + $object->setMetadata(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('old_name', $data) && null !== $data['old_name']) { + $object->setOldName($data['old_name']); + } elseif (\array_key_exists('old_name', $data) && null === $data['old_name']) { + $object->setOldName(null); + } + if (\array_key_exists('parent_user_id', $data) && null !== $data['parent_user_id']) { + $object->setParentUserId($data['parent_user_id']); + } elseif (\array_key_exists('parent_user_id', $data) && null === $data['parent_user_id']) { + $object->setParentUserId(null); + } + if (\array_key_exists('permalink', $data) && null !== $data['permalink']) { + $object->setPermalink($data['permalink']); + } elseif (\array_key_exists('permalink', $data) && null === $data['permalink']) { + $object->setPermalink(null); + } + if (\array_key_exists('pinned_to', $data) && null !== $data['pinned_to']) { + $values_3 = []; + foreach ($data['pinned_to'] as $value_3) { + $values_3[] = $value_3; + } + $object->setPinnedTo($values_3); + } elseif (\array_key_exists('pinned_to', $data) && null === $data['pinned_to']) { + $object->setPinnedTo(null); + } + if (\array_key_exists('purpose', $data) && null !== $data['purpose']) { + $object->setPurpose($data['purpose']); + } elseif (\array_key_exists('purpose', $data) && null === $data['purpose']) { + $object->setPurpose(null); + } + if (\array_key_exists('reactions', $data) && null !== $data['reactions']) { + $values_4 = []; + foreach ($data['reactions'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, 'JoliCode\\Slack\\Api\\Model\\ObjsReaction', 'json', $context); + } + $object->setReactions($values_4); + } elseif (\array_key_exists('reactions', $data) && null === $data['reactions']) { + $object->setReactions(null); + } + if (\array_key_exists('reply_count', $data) && null !== $data['reply_count']) { + $object->setReplyCount($data['reply_count']); + } elseif (\array_key_exists('reply_count', $data) && null === $data['reply_count']) { + $object->setReplyCount(null); + } + if (\array_key_exists('reply_users', $data) && null !== $data['reply_users']) { + $values_5 = []; + foreach ($data['reply_users'] as $value_5) { + $values_5[] = $value_5; + } + $object->setReplyUsers($values_5); + } elseif (\array_key_exists('reply_users', $data) && null === $data['reply_users']) { + $object->setReplyUsers(null); + } + if (\array_key_exists('reply_users_count', $data) && null !== $data['reply_users_count']) { + $object->setReplyUsersCount($data['reply_users_count']); + } elseif (\array_key_exists('reply_users_count', $data) && null === $data['reply_users_count']) { + $object->setReplyUsersCount(null); + } + if (\array_key_exists('source_team', $data) && null !== $data['source_team']) { + $object->setSourceTeam($data['source_team']); + } elseif (\array_key_exists('source_team', $data) && null === $data['source_team']) { + $object->setSourceTeam(null); + } + if (\array_key_exists('subscribed', $data) && null !== $data['subscribed']) { + $object->setSubscribed($data['subscribed']); + } elseif (\array_key_exists('subscribed', $data) && null === $data['subscribed']) { + $object->setSubscribed(null); + } + if (\array_key_exists('subtype', $data) && null !== $data['subtype']) { + $object->setSubtype($data['subtype']); + } elseif (\array_key_exists('subtype', $data) && null === $data['subtype']) { + $object->setSubtype(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('thread_ts', $data) && null !== $data['thread_ts']) { + $object->setThreadTs($data['thread_ts']); + } elseif (\array_key_exists('thread_ts', $data) && null === $data['thread_ts']) { + $object->setThreadTs(null); + } + if (\array_key_exists('topic', $data) && null !== $data['topic']) { + $object->setTopic($data['topic']); + } elseif (\array_key_exists('topic', $data) && null === $data['topic']) { + $object->setTopic(null); + } + if (\array_key_exists('ts', $data) && null !== $data['ts']) { + $object->setTs($data['ts']); + } elseif (\array_key_exists('ts', $data) && null === $data['ts']) { + $object->setTs(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('unread_count', $data) && null !== $data['unread_count']) { + $object->setUnreadCount($data['unread_count']); + } elseif (\array_key_exists('unread_count', $data) && null === $data['unread_count']) { + $object->setUnreadCount(null); + } + if (\array_key_exists('upload', $data) && null !== $data['upload']) { + $object->setUpload($data['upload']); + } elseif (\array_key_exists('upload', $data) && null === $data['upload']) { + $object->setUpload(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + if (\array_key_exists('user_profile', $data) && null !== $data['user_profile']) { + $object->setUserProfile($this->denormalizer->denormalize($data['user_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort', 'json', $context)); + } elseif (\array_key_exists('user_profile', $data) && null === $data['user_profile']) { + $object->setUserProfile(null); + } + if (\array_key_exists('user_team', $data) && null !== $data['user_team']) { + $object->setUserTeam($data['user_team']); + } elseif (\array_key_exists('user_team', $data) && null === $data['user_team']) { + $object->setUserTeam(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('attachments') && null !== $object->getAttachments()) { + $values = []; + foreach ($object->getAttachments() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['attachments'] = $values; + } + if ($object->isInitialized('blocks') && null !== $object->getBlocks()) { + $values_1 = []; + foreach ($object->getBlocks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['blocks'] = $values_1; + } + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); + } + if ($object->isInitialized('botProfile') && null !== $object->getBotProfile()) { + $data['bot_profile'] = $this->normalizer->normalize($object->getBotProfile(), 'json', $context); + } + if ($object->isInitialized('clientMsgId') && null !== $object->getClientMsgId()) { + $data['client_msg_id'] = $object->getClientMsgId(); + } + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); + } + if ($object->isInitialized('displayAsBot') && null !== $object->getDisplayAsBot()) { + $data['display_as_bot'] = $object->getDisplayAsBot(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('files') && null !== $object->getFiles()) { + $values_2 = []; + foreach ($object->getFiles() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['files'] = $values_2; + } + if ($object->isInitialized('icons') && null !== $object->getIcons()) { + $data['icons'] = $this->normalizer->normalize($object->getIcons(), 'json', $context); + } + if ($object->isInitialized('inviter') && null !== $object->getInviter()) { + $data['inviter'] = $object->getInviter(); + } + if ($object->isInitialized('isDelayedMessage') && null !== $object->getIsDelayedMessage()) { + $data['is_delayed_message'] = $object->getIsDelayedMessage(); + } + if ($object->isInitialized('isIntro') && null !== $object->getIsIntro()) { + $data['is_intro'] = $object->getIsIntro(); + } + if ($object->isInitialized('isStarred') && null !== $object->getIsStarred()) { + $data['is_starred'] = $object->getIsStarred(); + } + if ($object->isInitialized('lastRead') && null !== $object->getLastRead()) { + $data['last_read'] = $object->getLastRead(); + } + if ($object->isInitialized('latestReply') && null !== $object->getLatestReply()) { + $data['latest_reply'] = $object->getLatestReply(); + } + if ($object->isInitialized('metadata') && null !== $object->getMetadata()) { + $data['metadata'] = $this->normalizer->normalize($object->getMetadata(), 'json', $context); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('oldName') && null !== $object->getOldName()) { + $data['old_name'] = $object->getOldName(); + } + if ($object->isInitialized('parentUserId') && null !== $object->getParentUserId()) { + $data['parent_user_id'] = $object->getParentUserId(); + } + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); + } + if ($object->isInitialized('pinnedTo') && null !== $object->getPinnedTo()) { + $values_3 = []; + foreach ($object->getPinnedTo() as $value_3) { + $values_3[] = $value_3; + } + $data['pinned_to'] = $values_3; + } + if ($object->isInitialized('purpose') && null !== $object->getPurpose()) { + $data['purpose'] = $object->getPurpose(); + } + if ($object->isInitialized('reactions') && null !== $object->getReactions()) { + $values_4 = []; + foreach ($object->getReactions() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['reactions'] = $values_4; + } + if ($object->isInitialized('replyCount') && null !== $object->getReplyCount()) { + $data['reply_count'] = $object->getReplyCount(); + } + if ($object->isInitialized('replyUsers') && null !== $object->getReplyUsers()) { + $values_5 = []; + foreach ($object->getReplyUsers() as $value_5) { + $values_5[] = $value_5; + } + $data['reply_users'] = $values_5; + } + if ($object->isInitialized('replyUsersCount') && null !== $object->getReplyUsersCount()) { + $data['reply_users_count'] = $object->getReplyUsersCount(); + } + if ($object->isInitialized('sourceTeam') && null !== $object->getSourceTeam()) { + $data['source_team'] = $object->getSourceTeam(); + } + if ($object->isInitialized('subscribed') && null !== $object->getSubscribed()) { + $data['subscribed'] = $object->getSubscribed(); + } + if ($object->isInitialized('subtype') && null !== $object->getSubtype()) { + $data['subtype'] = $object->getSubtype(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['text'] = $object->getText(); + if ($object->isInitialized('threadTs') && null !== $object->getThreadTs()) { + $data['thread_ts'] = $object->getThreadTs(); + } + if ($object->isInitialized('topic') && null !== $object->getTopic()) { + $data['topic'] = $object->getTopic(); + } + $data['ts'] = $object->getTs(); + $data['type'] = $object->getType(); + if ($object->isInitialized('unreadCount') && null !== $object->getUnreadCount()) { + $data['unread_count'] = $object->getUnreadCount(); + } + if ($object->isInitialized('upload') && null !== $object->getUpload()) { + $data['upload'] = $object->getUpload(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('userProfile') && null !== $object->getUserProfile()) { + $data['user_profile'] = $this->normalizer->normalize($object->getUserProfile(), 'json', $context); + } + if ($object->isInitialized('userTeam') && null !== $object->getUserTeam()) { + $data['user_team'] = $object->getUserTeam(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMessage' => false]; + } } } diff --git a/generated/Normalizer/ObjsMetadataNormalizer.php b/generated/Normalizer/ObjsMetadataNormalizer.php index 98414716..ff8552ab 100644 --- a/generated/Normalizer/ObjsMetadataNormalizer.php +++ b/generated/Normalizer/ObjsMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('event_payload', $data) && null !== $data['event_payload']) { + $object->setEventPayload($data['event_payload']); + } elseif (\array_key_exists('event_payload', $data) && null === $data['event_payload']) { + $object->setEventPayload(null); + } + if (\array_key_exists('event_type', $data) && null !== $data['event_type']) { + $object->setEventType($data['event_type']); + } elseif (\array_key_exists('event_type', $data) && null === $data['event_type']) { + $object->setEventType(null); + } + return $object; } - if (\array_key_exists('event_payload', $data) && null !== $data['event_payload']) { - $object->setEventPayload($data['event_payload']); - } elseif (\array_key_exists('event_payload', $data) && null === $data['event_payload']) { - $object->setEventPayload(null); - } - if (\array_key_exists('event_type', $data) && null !== $data['event_type']) { - $object->setEventType($data['event_type']); - } elseif (\array_key_exists('event_type', $data) && null === $data['event_type']) { - $object->setEventType(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['event_payload'] = $object->getEventPayload(); + $data['event_type'] = $object->getEventType(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['event_payload'] = $object->getEventPayload(); - $data['event_type'] = $object->getEventType(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('event_payload', $data) && null !== $data['event_payload']) { + $object->setEventPayload($data['event_payload']); + } elseif (\array_key_exists('event_payload', $data) && null === $data['event_payload']) { + $object->setEventPayload(null); + } + if (\array_key_exists('event_type', $data) && null !== $data['event_type']) { + $object->setEventType($data['event_type']); + } elseif (\array_key_exists('event_type', $data) && null === $data['event_type']) { + $object->setEventType(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['event_payload'] = $object->getEventPayload(); + $data['event_type'] = $object->getEventType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsMetadata' => false]; + } } } diff --git a/generated/Normalizer/ObjsPagingNormalizer.php b/generated/Normalizer/ObjsPagingNormalizer.php index b59f2a7f..5329a05f 100644 --- a/generated/Normalizer/ObjsPagingNormalizer.php +++ b/generated/Normalizer/ObjsPagingNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsPagingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsPagingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsPaging(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsPaging(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('page', $data) && null !== $data['page']) { + $object->setPage($data['page']); + } elseif (\array_key_exists('page', $data) && null === $data['page']) { + $object->setPage(null); + } + if (\array_key_exists('pages', $data) && null !== $data['pages']) { + $object->setPages($data['pages']); + } elseif (\array_key_exists('pages', $data) && null === $data['pages']) { + $object->setPages(null); + } + if (\array_key_exists('per_page', $data) && null !== $data['per_page']) { + $object->setPerPage($data['per_page']); + } elseif (\array_key_exists('per_page', $data) && null === $data['per_page']) { + $object->setPerPage(null); + } + if (\array_key_exists('spill', $data) && null !== $data['spill']) { + $object->setSpill($data['spill']); + } elseif (\array_key_exists('spill', $data) && null === $data['spill']) { + $object->setSpill(null); + } + if (\array_key_exists('total', $data) && null !== $data['total']) { + $object->setTotal($data['total']); + } elseif (\array_key_exists('total', $data) && null === $data['total']) { + $object->setTotal(null); + } + return $object; } - if (\array_key_exists('count', $data) && null !== $data['count']) { - $object->setCount($data['count']); - } elseif (\array_key_exists('count', $data) && null === $data['count']) { - $object->setCount(null); - } - if (\array_key_exists('page', $data) && null !== $data['page']) { - $object->setPage($data['page']); - } elseif (\array_key_exists('page', $data) && null === $data['page']) { - $object->setPage(null); - } - if (\array_key_exists('pages', $data) && null !== $data['pages']) { - $object->setPages($data['pages']); - } elseif (\array_key_exists('pages', $data) && null === $data['pages']) { - $object->setPages(null); - } - if (\array_key_exists('per_page', $data) && null !== $data['per_page']) { - $object->setPerPage($data['per_page']); - } elseif (\array_key_exists('per_page', $data) && null === $data['per_page']) { - $object->setPerPage(null); - } - if (\array_key_exists('spill', $data) && null !== $data['spill']) { - $object->setSpill($data['spill']); - } elseif (\array_key_exists('spill', $data) && null === $data['spill']) { - $object->setSpill(null); - } - if (\array_key_exists('total', $data) && null !== $data['total']) { - $object->setTotal($data['total']); - } elseif (\array_key_exists('total', $data) && null === $data['total']) { - $object->setTotal(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('count') && null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + $data['page'] = $object->getPage(); + if ($object->isInitialized('pages') && null !== $object->getPages()) { + $data['pages'] = $object->getPages(); + } + if ($object->isInitialized('perPage') && null !== $object->getPerPage()) { + $data['per_page'] = $object->getPerPage(); + } + if ($object->isInitialized('spill') && null !== $object->getSpill()) { + $data['spill'] = $object->getSpill(); + } + $data['total'] = $object->getTotal(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsPagingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('count') && null !== $object->getCount()) { - $data['count'] = $object->getCount(); - } - $data['page'] = $object->getPage(); - if ($object->isInitialized('pages') && null !== $object->getPages()) { - $data['pages'] = $object->getPages(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === $type; } - if ($object->isInitialized('perPage') && null !== $object->getPerPage()) { - $data['per_page'] = $object->getPerPage(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPaging' === \get_class($data); } - if ($object->isInitialized('spill') && null !== $object->getSpill()) { - $data['spill'] = $object->getSpill(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsPaging(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('page', $data) && null !== $data['page']) { + $object->setPage($data['page']); + } elseif (\array_key_exists('page', $data) && null === $data['page']) { + $object->setPage(null); + } + if (\array_key_exists('pages', $data) && null !== $data['pages']) { + $object->setPages($data['pages']); + } elseif (\array_key_exists('pages', $data) && null === $data['pages']) { + $object->setPages(null); + } + if (\array_key_exists('per_page', $data) && null !== $data['per_page']) { + $object->setPerPage($data['per_page']); + } elseif (\array_key_exists('per_page', $data) && null === $data['per_page']) { + $object->setPerPage(null); + } + if (\array_key_exists('spill', $data) && null !== $data['spill']) { + $object->setSpill($data['spill']); + } elseif (\array_key_exists('spill', $data) && null === $data['spill']) { + $object->setSpill(null); + } + if (\array_key_exists('total', $data) && null !== $data['total']) { + $object->setTotal($data['total']); + } elseif (\array_key_exists('total', $data) && null === $data['total']) { + $object->setTotal(null); + } + + return $object; } - $data['total'] = $object->getTotal(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('count') && null !== $object->getCount()) { + $data['count'] = $object->getCount(); + } + $data['page'] = $object->getPage(); + if ($object->isInitialized('pages') && null !== $object->getPages()) { + $data['pages'] = $object->getPages(); + } + if ($object->isInitialized('perPage') && null !== $object->getPerPage()) { + $data['per_page'] = $object->getPerPage(); + } + if ($object->isInitialized('spill') && null !== $object->getSpill()) { + $data['spill'] = $object->getSpill(); + } + $data['total'] = $object->getTotal(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsPaging' => false]; + } } } diff --git a/generated/Normalizer/ObjsPrimaryOwnerNormalizer.php b/generated/Normalizer/ObjsPrimaryOwnerNormalizer.php index b06318ae..0d2cf348 100644 --- a/generated/Normalizer/ObjsPrimaryOwnerNormalizer.php +++ b/generated/Normalizer/ObjsPrimaryOwnerNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsPrimaryOwnerNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsPrimaryOwnerNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsPrimaryOwner(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsPrimaryOwner(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $object->setEmail($data['email']); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + return $object; } - if (\array_key_exists('email', $data) && null !== $data['email']) { - $object->setEmail($data['email']); - } elseif (\array_key_exists('email', $data) && null === $data['email']) { - $object->setEmail(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['email'] = $object->getEmail(); + $data['id'] = $object->getId(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsPrimaryOwnerNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['email'] = $object->getEmail(); - $data['id'] = $object->getId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsPrimaryOwner(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $object->setEmail($data['email']); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['email'] = $object->getEmail(); + $data['id'] = $object->getId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner' => false]; + } } } diff --git a/generated/Normalizer/ObjsReactionNormalizer.php b/generated/Normalizer/ObjsReactionNormalizer.php index c196aa45..273804d9 100644 --- a/generated/Normalizer/ObjsReactionNormalizer.php +++ b/generated/Normalizer/ObjsReactionNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,90 +24,177 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsReactionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsReactionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsReaction(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsReaction(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + unset($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + unset($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + unset($data['users']); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } + } + return $object; } - if (\array_key_exists('count', $data) && null !== $data['count']) { - $object->setCount($data['count']); - unset($data['count']); - } elseif (\array_key_exists('count', $data) && null === $data['count']) { - $object->setCount(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('users', $data) && null !== $data['users']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['count'] = $object->getCount(); + $data['name'] = $object->getName(); $values = []; - foreach ($data['users'] as $value) { + foreach ($object->getUsers() as $value) { $values[] = $value; } - $object->setUsers($values); - unset($data['users']); - } elseif (\array_key_exists('users', $data) && null === $data['users']) { - $object->setUsers(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; + $data['users'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsReactionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['count'] = $object->getCount(); - $data['name'] = $object->getName(); - $values = []; - foreach ($object->getUsers() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReaction' === \get_class($data); } - $data['users'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsReaction(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + unset($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + unset($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + unset($data['users']); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['count'] = $object->getCount(); + $data['name'] = $object->getName(); + $values = []; + foreach ($object->getUsers() as $value) { + $values[] = $value; + } + $data['users'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsReaction' => false]; + } } } diff --git a/generated/Normalizer/ObjsReminderNormalizer.php b/generated/Normalizer/ObjsReminderNormalizer.php index e8a97d60..f1e7da65 100644 --- a/generated/Normalizer/ObjsReminderNormalizer.php +++ b/generated/Normalizer/ObjsReminderNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,97 +24,191 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsReminderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsReminderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsReminder(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsReminder(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('complete_ts', $data) && null !== $data['complete_ts']) { + $object->setCompleteTs($data['complete_ts']); + } elseif (\array_key_exists('complete_ts', $data) && null === $data['complete_ts']) { + $object->setCompleteTs(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('recurring', $data) && null !== $data['recurring']) { + $object->setRecurring($data['recurring']); + } elseif (\array_key_exists('recurring', $data) && null === $data['recurring']) { + $object->setRecurring(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('time', $data) && null !== $data['time']) { + $object->setTime($data['time']); + } elseif (\array_key_exists('time', $data) && null === $data['time']) { + $object->setTime(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('complete_ts', $data) && null !== $data['complete_ts']) { - $object->setCompleteTs($data['complete_ts']); - } elseif (\array_key_exists('complete_ts', $data) && null === $data['complete_ts']) { - $object->setCompleteTs(null); - } - if (\array_key_exists('creator', $data) && null !== $data['creator']) { - $object->setCreator($data['creator']); - } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { - $object->setCreator(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('recurring', $data) && null !== $data['recurring']) { - $object->setRecurring($data['recurring']); - } elseif (\array_key_exists('recurring', $data) && null === $data['recurring']) { - $object->setRecurring(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('completeTs') && null !== $object->getCompleteTs()) { + $data['complete_ts'] = $object->getCompleteTs(); + } + $data['creator'] = $object->getCreator(); + $data['id'] = $object->getId(); + $data['recurring'] = $object->getRecurring(); + $data['text'] = $object->getText(); + if ($object->isInitialized('time') && null !== $object->getTime()) { + $data['time'] = $object->getTime(); + } + $data['user'] = $object->getUser(); + + return $data; } - if (\array_key_exists('text', $data) && null !== $data['text']) { - $object->setText($data['text']); - } elseif (\array_key_exists('text', $data) && null === $data['text']) { - $object->setText(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false]; } - if (\array_key_exists('time', $data) && null !== $data['time']) { - $object->setTime($data['time']); - } elseif (\array_key_exists('time', $data) && null === $data['time']) { - $object->setTime(null); + } +} else { + class ObjsReminderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsReminder' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsReminder(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('complete_ts', $data) && null !== $data['complete_ts']) { + $object->setCompleteTs($data['complete_ts']); + } elseif (\array_key_exists('complete_ts', $data) && null === $data['complete_ts']) { + $object->setCompleteTs(null); + } + if (\array_key_exists('creator', $data) && null !== $data['creator']) { + $object->setCreator($data['creator']); + } elseif (\array_key_exists('creator', $data) && null === $data['creator']) { + $object->setCreator(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('recurring', $data) && null !== $data['recurring']) { + $object->setRecurring($data['recurring']); + } elseif (\array_key_exists('recurring', $data) && null === $data['recurring']) { + $object->setRecurring(null); + } + if (\array_key_exists('text', $data) && null !== $data['text']) { + $object->setText($data['text']); + } elseif (\array_key_exists('text', $data) && null === $data['text']) { + $object->setText(null); + } + if (\array_key_exists('time', $data) && null !== $data['time']) { + $object->setTime($data['time']); + } elseif (\array_key_exists('time', $data) && null === $data['time']) { + $object->setTime(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('completeTs') && null !== $object->getCompleteTs()) { - $data['complete_ts'] = $object->getCompleteTs(); - } - $data['creator'] = $object->getCreator(); - $data['id'] = $object->getId(); - $data['recurring'] = $object->getRecurring(); - $data['text'] = $object->getText(); - if ($object->isInitialized('time') && null !== $object->getTime()) { - $data['time'] = $object->getTime(); + return $object; } - $data['user'] = $object->getUser(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('completeTs') && null !== $object->getCompleteTs()) { + $data['complete_ts'] = $object->getCompleteTs(); + } + $data['creator'] = $object->getCreator(); + $data['id'] = $object->getId(); + $data['recurring'] = $object->getRecurring(); + $data['text'] = $object->getText(); + if ($object->isInitialized('time') && null !== $object->getTime()) { + $data['time'] = $object->getTime(); + } + $data['user'] = $object->getUser(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsReminder' => false]; + } } } diff --git a/generated/Normalizer/ObjsResourcesNormalizer.php b/generated/Normalizer/ObjsResourcesNormalizer.php index 4300d4a4..72df4ca2 100644 --- a/generated/Normalizer/ObjsResourcesNormalizer.php +++ b/generated/Normalizer/ObjsResourcesNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,89 +24,175 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsResources(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('excluded_ids', $data) && null !== $data['excluded_ids']) { + $values = []; + foreach ($data['excluded_ids'] as $value) { + $values[] = $value; + } + $object->setExcludedIds($values); + } elseif (\array_key_exists('excluded_ids', $data) && null === $data['excluded_ids']) { + $object->setExcludedIds(null); + } + if (\array_key_exists('ids', $data) && null !== $data['ids']) { + $values_1 = []; + foreach ($data['ids'] as $value_1) { + $values_1[] = $value_1; + } + $object->setIds($values_1); + } elseif (\array_key_exists('ids', $data) && null === $data['ids']) { + $object->setIds(null); + } + if (\array_key_exists('wildcard', $data) && null !== $data['wildcard']) { + $object->setWildcard($data['wildcard']); + } elseif (\array_key_exists('wildcard', $data) && null === $data['wildcard']) { + $object->setWildcard(null); + } + return $object; } - if (\array_key_exists('excluded_ids', $data) && null !== $data['excluded_ids']) { - $values = []; - foreach ($data['excluded_ids'] as $value) { - $values[] = $value; - } - $object->setExcludedIds($values); - } elseif (\array_key_exists('excluded_ids', $data) && null === $data['excluded_ids']) { - $object->setExcludedIds(null); - } - if (\array_key_exists('ids', $data) && null !== $data['ids']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('excludedIds') && null !== $object->getExcludedIds()) { + $values = []; + foreach ($object->getExcludedIds() as $value) { + $values[] = $value; + } + $data['excluded_ids'] = $values; + } $values_1 = []; - foreach ($data['ids'] as $value_1) { + foreach ($object->getIds() as $value_1) { $values_1[] = $value_1; } - $object->setIds($values_1); - } elseif (\array_key_exists('ids', $data) && null === $data['ids']) { - $object->setIds(null); - } - if (\array_key_exists('wildcard', $data) && null !== $data['wildcard']) { - $object->setWildcard($data['wildcard']); - } elseif (\array_key_exists('wildcard', $data) && null === $data['wildcard']) { - $object->setWildcard(null); + $data['ids'] = $values_1; + if ($object->isInitialized('wildcard') && null !== $object->getWildcard()) { + $data['wildcard'] = $object->getWildcard(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsResources' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('excludedIds') && null !== $object->getExcludedIds()) { - $values = []; - foreach ($object->getExcludedIds() as $value) { - $values[] = $value; - } - $data['excluded_ids'] = $values; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === $type; } - $values_1 = []; - foreach ($object->getIds() as $value_1) { - $values_1[] = $value_1; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResources' === \get_class($data); } - $data['ids'] = $values_1; - if ($object->isInitialized('wildcard') && null !== $object->getWildcard()) { - $data['wildcard'] = $object->getWildcard(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('excluded_ids', $data) && null !== $data['excluded_ids']) { + $values = []; + foreach ($data['excluded_ids'] as $value) { + $values[] = $value; + } + $object->setExcludedIds($values); + } elseif (\array_key_exists('excluded_ids', $data) && null === $data['excluded_ids']) { + $object->setExcludedIds(null); + } + if (\array_key_exists('ids', $data) && null !== $data['ids']) { + $values_1 = []; + foreach ($data['ids'] as $value_1) { + $values_1[] = $value_1; + } + $object->setIds($values_1); + } elseif (\array_key_exists('ids', $data) && null === $data['ids']) { + $object->setIds(null); + } + if (\array_key_exists('wildcard', $data) && null !== $data['wildcard']) { + $object->setWildcard($data['wildcard']); + } elseif (\array_key_exists('wildcard', $data) && null === $data['wildcard']) { + $object->setWildcard(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('excludedIds') && null !== $object->getExcludedIds()) { + $values = []; + foreach ($object->getExcludedIds() as $value) { + $values[] = $value; + } + $data['excluded_ids'] = $values; + } + $values_1 = []; + foreach ($object->getIds() as $value_1) { + $values_1[] = $value_1; + } + $data['ids'] = $values_1; + if ($object->isInitialized('wildcard') && null !== $object->getWildcard()) { + $data['wildcard'] = $object->getWildcard(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsResources' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsResources' => false]; + } } } diff --git a/generated/Normalizer/ObjsResponseMetadataNormalizer.php b/generated/Normalizer/ObjsResponseMetadataNormalizer.php index 8397d835..f7be3702 100644 --- a/generated/Normalizer/ObjsResponseMetadataNormalizer.php +++ b/generated/Normalizer/ObjsResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,89 +24,175 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $value; + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { + $values_1 = []; + foreach ($data['warnings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setWarnings($values_1); + } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { + $object->setWarnings(null); + } + return $object; } - if (\array_key_exists('messages', $data) && null !== $data['messages']) { - $values = []; - foreach ($data['messages'] as $value) { - $values[] = $value; - } - $object->setMessages($values); - } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { - $object->setMessages(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('messages') && null !== $object->getMessages()) { + $values = []; + foreach ($object->getMessages() as $value) { + $values[] = $value; + } + $data['messages'] = $values; + } + $data['next_cursor'] = $object->getNextCursor(); + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['warnings'] = $values_1; + } + + return $data; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false]; } - if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { - $values_1 = []; - foreach ($data['warnings'] as $value_1) { - $values_1[] = $value_1; - } - $object->setWarnings($values_1); - } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { - $object->setWarnings(null); + } +} else { + class ObjsResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('messages') && null !== $object->getMessages()) { - $values = []; - foreach ($object->getMessages() as $value) { - $values[] = $value; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['messages'] = $values; - } - $data['next_cursor'] = $object->getNextCursor(); - if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { - $values_1 = []; - foreach ($object->getWarnings() as $value_1) { - $values_1[] = $value_1; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('messages', $data) && null !== $data['messages']) { + $values = []; + foreach ($data['messages'] as $value) { + $values[] = $value; + } + $object->setMessages($values); + } elseif (\array_key_exists('messages', $data) && null === $data['messages']) { + $object->setMessages(null); + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); } - $data['warnings'] = $values_1; + if (\array_key_exists('warnings', $data) && null !== $data['warnings']) { + $values_1 = []; + foreach ($data['warnings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setWarnings($values_1); + } elseif (\array_key_exists('warnings', $data) && null === $data['warnings']) { + $object->setWarnings(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('messages') && null !== $object->getMessages()) { + $values = []; + foreach ($object->getMessages() as $value) { + $values[] = $value; + } + $data['messages'] = $values; + } + $data['next_cursor'] = $object->getNextCursor(); + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['warnings'] = $values_1; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/ObjsSubteamNormalizer.php b/generated/Normalizer/ObjsSubteamNormalizer.php index d1d69cf5..1d5419b3 100644 --- a/generated/Normalizer/ObjsSubteamNormalizer.php +++ b/generated/Normalizer/ObjsSubteamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,191 +24,379 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsSubteamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsSubteamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsSubteam(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsSubteam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('auto_provision', $data) && null !== $data['auto_provision']) { + $object->setAutoProvision($data['auto_provision']); + } elseif (\array_key_exists('auto_provision', $data) && null === $data['auto_provision']) { + $object->setAutoProvision(null); + } + if (\array_key_exists('auto_type', $data) && null !== $data['auto_type']) { + $object->setAutoType($data['auto_type']); + } elseif (\array_key_exists('auto_type', $data) && null === $data['auto_type']) { + $object->setAutoType(null); + } + if (\array_key_exists('channel_count', $data) && null !== $data['channel_count']) { + $object->setChannelCount($data['channel_count']); + } elseif (\array_key_exists('channel_count', $data) && null === $data['channel_count']) { + $object->setChannelCount(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { + $object->setDateDelete($data['date_delete']); + } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { + $object->setDateDelete(null); + } + if (\array_key_exists('date_update', $data) && null !== $data['date_update']) { + $object->setDateUpdate($data['date_update']); + } elseif (\array_key_exists('date_update', $data) && null === $data['date_update']) { + $object->setDateUpdate(null); + } + if (\array_key_exists('deleted_by', $data) && null !== $data['deleted_by']) { + $object->setDeletedBy($data['deleted_by']); + } elseif (\array_key_exists('deleted_by', $data) && null === $data['deleted_by']) { + $object->setDeletedBy(null); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('enterprise_subteam_id', $data) && null !== $data['enterprise_subteam_id']) { + $object->setEnterpriseSubteamId($data['enterprise_subteam_id']); + } elseif (\array_key_exists('enterprise_subteam_id', $data) && null === $data['enterprise_subteam_id']) { + $object->setEnterpriseSubteamId(null); + } + if (\array_key_exists('handle', $data) && null !== $data['handle']) { + $object->setHandle($data['handle']); + } elseif (\array_key_exists('handle', $data) && null === $data['handle']) { + $object->setHandle(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_subteam', $data) && null !== $data['is_subteam']) { + $object->setIsSubteam($data['is_subteam']); + } elseif (\array_key_exists('is_subteam', $data) && null === $data['is_subteam']) { + $object->setIsSubteam(null); + } + if (\array_key_exists('is_usergroup', $data) && null !== $data['is_usergroup']) { + $object->setIsUsergroup($data['is_usergroup']); + } elseif (\array_key_exists('is_usergroup', $data) && null === $data['is_usergroup']) { + $object->setIsUsergroup(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { + $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs', 'json', $context)); + } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { + $object->setPrefs(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('updated_by', $data) && null !== $data['updated_by']) { + $object->setUpdatedBy($data['updated_by']); + } elseif (\array_key_exists('updated_by', $data) && null === $data['updated_by']) { + $object->setUpdatedBy(null); + } + if (\array_key_exists('user_count', $data) && null !== $data['user_count']) { + $object->setUserCount($data['user_count']); + } elseif (\array_key_exists('user_count', $data) && null === $data['user_count']) { + $object->setUserCount(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + return $object; } - if (\array_key_exists('auto_provision', $data) && null !== $data['auto_provision']) { - $object->setAutoProvision($data['auto_provision']); - } elseif (\array_key_exists('auto_provision', $data) && null === $data['auto_provision']) { - $object->setAutoProvision(null); - } - if (\array_key_exists('auto_type', $data) && null !== $data['auto_type']) { - $object->setAutoType($data['auto_type']); - } elseif (\array_key_exists('auto_type', $data) && null === $data['auto_type']) { - $object->setAutoType(null); - } - if (\array_key_exists('channel_count', $data) && null !== $data['channel_count']) { - $object->setChannelCount($data['channel_count']); - } elseif (\array_key_exists('channel_count', $data) && null === $data['channel_count']) { - $object->setChannelCount(null); - } - if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { - $object->setCreatedBy($data['created_by']); - } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { - $object->setCreatedBy(null); - } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); - } - if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { - $object->setDateDelete($data['date_delete']); - } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { - $object->setDateDelete(null); - } - if (\array_key_exists('date_update', $data) && null !== $data['date_update']) { - $object->setDateUpdate($data['date_update']); - } elseif (\array_key_exists('date_update', $data) && null === $data['date_update']) { - $object->setDateUpdate(null); - } - if (\array_key_exists('deleted_by', $data) && null !== $data['deleted_by']) { - $object->setDeletedBy($data['deleted_by']); - } elseif (\array_key_exists('deleted_by', $data) && null === $data['deleted_by']) { - $object->setDeletedBy(null); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('enterprise_subteam_id', $data) && null !== $data['enterprise_subteam_id']) { - $object->setEnterpriseSubteamId($data['enterprise_subteam_id']); - } elseif (\array_key_exists('enterprise_subteam_id', $data) && null === $data['enterprise_subteam_id']) { - $object->setEnterpriseSubteamId(null); - } - if (\array_key_exists('handle', $data) && null !== $data['handle']) { - $object->setHandle($data['handle']); - } elseif (\array_key_exists('handle', $data) && null === $data['handle']) { - $object->setHandle(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { - $object->setIsExternal($data['is_external']); - } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { - $object->setIsExternal(null); - } - if (\array_key_exists('is_subteam', $data) && null !== $data['is_subteam']) { - $object->setIsSubteam($data['is_subteam']); - } elseif (\array_key_exists('is_subteam', $data) && null === $data['is_subteam']) { - $object->setIsSubteam(null); - } - if (\array_key_exists('is_usergroup', $data) && null !== $data['is_usergroup']) { - $object->setIsUsergroup($data['is_usergroup']); - } elseif (\array_key_exists('is_usergroup', $data) && null === $data['is_usergroup']) { - $object->setIsUsergroup(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { - $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs', 'json', $context)); - } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { - $object->setPrefs(null); - } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); - } - if (\array_key_exists('updated_by', $data) && null !== $data['updated_by']) { - $object->setUpdatedBy($data['updated_by']); - } elseif (\array_key_exists('updated_by', $data) && null === $data['updated_by']) { - $object->setUpdatedBy(null); - } - if (\array_key_exists('user_count', $data) && null !== $data['user_count']) { - $object->setUserCount($data['user_count']); - } elseif (\array_key_exists('user_count', $data) && null === $data['user_count']) { - $object->setUserCount(null); - } - if (\array_key_exists('users', $data) && null !== $data['users']) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $value; - } - $object->setUsers($values); - } elseif (\array_key_exists('users', $data) && null === $data['users']) { - $object->setUsers(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['auto_provision'] = $object->getAutoProvision(); + $data['auto_type'] = $object->getAutoType(); + if ($object->isInitialized('channelCount') && null !== $object->getChannelCount()) { + $data['channel_count'] = $object->getChannelCount(); + } + $data['created_by'] = $object->getCreatedBy(); + $data['date_create'] = $object->getDateCreate(); + $data['date_delete'] = $object->getDateDelete(); + $data['date_update'] = $object->getDateUpdate(); + $data['deleted_by'] = $object->getDeletedBy(); + $data['description'] = $object->getDescription(); + $data['enterprise_subteam_id'] = $object->getEnterpriseSubteamId(); + $data['handle'] = $object->getHandle(); + $data['id'] = $object->getId(); + $data['is_external'] = $object->getIsExternal(); + $data['is_subteam'] = $object->getIsSubteam(); + $data['is_usergroup'] = $object->getIsUsergroup(); + $data['name'] = $object->getName(); + $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); + $data['team_id'] = $object->getTeamId(); + $data['updated_by'] = $object->getUpdatedBy(); + if ($object->isInitialized('userCount') && null !== $object->getUserCount()) { + $data['user_count'] = $object->getUserCount(); + } + if ($object->isInitialized('users') && null !== $object->getUsers()) { + $values = []; + foreach ($object->getUsers() as $value) { + $values[] = $value; + } + $data['users'] = $values; + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsSubteamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['auto_provision'] = $object->getAutoProvision(); - $data['auto_type'] = $object->getAutoType(); - if ($object->isInitialized('channelCount') && null !== $object->getChannelCount()) { - $data['channel_count'] = $object->getChannelCount(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === $type; } - $data['created_by'] = $object->getCreatedBy(); - $data['date_create'] = $object->getDateCreate(); - $data['date_delete'] = $object->getDateDelete(); - $data['date_update'] = $object->getDateUpdate(); - $data['deleted_by'] = $object->getDeletedBy(); - $data['description'] = $object->getDescription(); - $data['enterprise_subteam_id'] = $object->getEnterpriseSubteamId(); - $data['handle'] = $object->getHandle(); - $data['id'] = $object->getId(); - $data['is_external'] = $object->getIsExternal(); - $data['is_subteam'] = $object->getIsSubteam(); - $data['is_usergroup'] = $object->getIsUsergroup(); - $data['name'] = $object->getName(); - $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); - $data['team_id'] = $object->getTeamId(); - $data['updated_by'] = $object->getUpdatedBy(); - if ($object->isInitialized('userCount') && null !== $object->getUserCount()) { - $data['user_count'] = $object->getUserCount(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam' === \get_class($data); } - if ($object->isInitialized('users') && null !== $object->getUsers()) { - $values = []; - foreach ($object->getUsers() as $value) { - $values[] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsSubteam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('auto_provision', $data) && null !== $data['auto_provision']) { + $object->setAutoProvision($data['auto_provision']); + } elseif (\array_key_exists('auto_provision', $data) && null === $data['auto_provision']) { + $object->setAutoProvision(null); + } + if (\array_key_exists('auto_type', $data) && null !== $data['auto_type']) { + $object->setAutoType($data['auto_type']); + } elseif (\array_key_exists('auto_type', $data) && null === $data['auto_type']) { + $object->setAutoType(null); + } + if (\array_key_exists('channel_count', $data) && null !== $data['channel_count']) { + $object->setChannelCount($data['channel_count']); + } elseif (\array_key_exists('channel_count', $data) && null === $data['channel_count']) { + $object->setChannelCount(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('date_delete', $data) && null !== $data['date_delete']) { + $object->setDateDelete($data['date_delete']); + } elseif (\array_key_exists('date_delete', $data) && null === $data['date_delete']) { + $object->setDateDelete(null); + } + if (\array_key_exists('date_update', $data) && null !== $data['date_update']) { + $object->setDateUpdate($data['date_update']); + } elseif (\array_key_exists('date_update', $data) && null === $data['date_update']) { + $object->setDateUpdate(null); } - $data['users'] = $values; + if (\array_key_exists('deleted_by', $data) && null !== $data['deleted_by']) { + $object->setDeletedBy($data['deleted_by']); + } elseif (\array_key_exists('deleted_by', $data) && null === $data['deleted_by']) { + $object->setDeletedBy(null); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('enterprise_subteam_id', $data) && null !== $data['enterprise_subteam_id']) { + $object->setEnterpriseSubteamId($data['enterprise_subteam_id']); + } elseif (\array_key_exists('enterprise_subteam_id', $data) && null === $data['enterprise_subteam_id']) { + $object->setEnterpriseSubteamId(null); + } + if (\array_key_exists('handle', $data) && null !== $data['handle']) { + $object->setHandle($data['handle']); + } elseif (\array_key_exists('handle', $data) && null === $data['handle']) { + $object->setHandle(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_subteam', $data) && null !== $data['is_subteam']) { + $object->setIsSubteam($data['is_subteam']); + } elseif (\array_key_exists('is_subteam', $data) && null === $data['is_subteam']) { + $object->setIsSubteam(null); + } + if (\array_key_exists('is_usergroup', $data) && null !== $data['is_usergroup']) { + $object->setIsUsergroup($data['is_usergroup']); + } elseif (\array_key_exists('is_usergroup', $data) && null === $data['is_usergroup']) { + $object->setIsUsergroup(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('prefs', $data) && null !== $data['prefs']) { + $object->setPrefs($this->denormalizer->denormalize($data['prefs'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs', 'json', $context)); + } elseif (\array_key_exists('prefs', $data) && null === $data['prefs']) { + $object->setPrefs(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('updated_by', $data) && null !== $data['updated_by']) { + $object->setUpdatedBy($data['updated_by']); + } elseif (\array_key_exists('updated_by', $data) && null === $data['updated_by']) { + $object->setUpdatedBy(null); + } + if (\array_key_exists('user_count', $data) && null !== $data['user_count']) { + $object->setUserCount($data['user_count']); + } elseif (\array_key_exists('user_count', $data) && null === $data['user_count']) { + $object->setUserCount(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['auto_provision'] = $object->getAutoProvision(); + $data['auto_type'] = $object->getAutoType(); + if ($object->isInitialized('channelCount') && null !== $object->getChannelCount()) { + $data['channel_count'] = $object->getChannelCount(); + } + $data['created_by'] = $object->getCreatedBy(); + $data['date_create'] = $object->getDateCreate(); + $data['date_delete'] = $object->getDateDelete(); + $data['date_update'] = $object->getDateUpdate(); + $data['deleted_by'] = $object->getDeletedBy(); + $data['description'] = $object->getDescription(); + $data['enterprise_subteam_id'] = $object->getEnterpriseSubteamId(); + $data['handle'] = $object->getHandle(); + $data['id'] = $object->getId(); + $data['is_external'] = $object->getIsExternal(); + $data['is_subteam'] = $object->getIsSubteam(); + $data['is_usergroup'] = $object->getIsUsergroup(); + $data['name'] = $object->getName(); + $data['prefs'] = $this->normalizer->normalize($object->getPrefs(), 'json', $context); + $data['team_id'] = $object->getTeamId(); + $data['updated_by'] = $object->getUpdatedBy(); + if ($object->isInitialized('userCount') && null !== $object->getUserCount()) { + $data['user_count'] = $object->getUserCount(); + } + if ($object->isInitialized('users') && null !== $object->getUsers()) { + $values = []; + foreach ($object->getUsers() as $value) { + $values[] = $value; + } + $data['users'] = $values; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteam' => false]; + } } } diff --git a/generated/Normalizer/ObjsSubteamPrefsNormalizer.php b/generated/Normalizer/ObjsSubteamPrefsNormalizer.php index 63c95dcf..30283084 100644 --- a/generated/Normalizer/ObjsSubteamPrefsNormalizer.php +++ b/generated/Normalizer/ObjsSubteamPrefsNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsSubteamPrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsSubteamPrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsSubteamPrefs(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsSubteamPrefs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $value; + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('groups', $data) && null !== $data['groups']) { + $values_1 = []; + foreach ($data['groups'] as $value_1) { + $values_1[] = $value_1; + } + $object->setGroups($values_1); + } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { + $object->setGroups(null); + } + return $object; } - if (\array_key_exists('channels', $data) && null !== $data['channels']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['channels'] as $value) { + foreach ($object->getChannels() as $value) { $values[] = $value; } - $object->setChannels($values); - } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { - $object->setChannels(null); - } - if (\array_key_exists('groups', $data) && null !== $data['groups']) { + $data['channels'] = $values; $values_1 = []; - foreach ($data['groups'] as $value_1) { + foreach ($object->getGroups() as $value_1) { $values_1[] = $value_1; } - $object->setGroups($values_1); - } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { - $object->setGroups(null); + $data['groups'] = $values_1; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsSubteamPrefsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getChannels() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === $type; } - $data['channels'] = $values; - $values_1 = []; - foreach ($object->getGroups() as $value_1) { - $values_1[] = $value_1; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' === \get_class($data); } - $data['groups'] = $values_1; - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsSubteamPrefs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $value; + } + $object->setChannels($values); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('groups', $data) && null !== $data['groups']) { + $values_1 = []; + foreach ($data['groups'] as $value_1) { + $values_1[] = $value_1; + } + $object->setGroups($values_1); + } elseif (\array_key_exists('groups', $data) && null === $data['groups']) { + $object->setGroups(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $value; + } + $data['channels'] = $values; + $values_1 = []; + foreach ($object->getGroups() as $value_1) { + $values_1[] = $value_1; + } + $data['groups'] = $values_1; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsSubteamPrefs' => false]; + } } } diff --git a/generated/Normalizer/ObjsTeamNormalizer.php b/generated/Normalizer/ObjsTeamNormalizer.php index 97b75736..69846135 100644 --- a/generated/Normalizer/ObjsTeamNormalizer.php +++ b/generated/Normalizer/ObjsTeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,281 +24,559 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsTeam(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('archived', $data) && null !== $data['archived']) { - $object->setArchived($data['archived']); - } elseif (\array_key_exists('archived', $data) && null === $data['archived']) { - $object->setArchived(null); - } - if (\array_key_exists('avatar_base_url', $data) && null !== $data['avatar_base_url']) { - $object->setAvatarBaseUrl($data['avatar_base_url']); - } elseif (\array_key_exists('avatar_base_url', $data) && null === $data['avatar_base_url']) { - $object->setAvatarBaseUrl(null); - } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === $type; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); - } - if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { - $object->setDeleted($data['deleted']); - } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { - $object->setDeleted(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === \get_class($data); } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $value = $data['description']; - if (\is_string($data['description'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('archived', $data) && null !== $data['archived']) { + $object->setArchived($data['archived']); + } elseif (\array_key_exists('archived', $data) && null === $data['archived']) { + $object->setArchived(null); + } + if (\array_key_exists('avatar_base_url', $data) && null !== $data['avatar_base_url']) { + $object->setAvatarBaseUrl($data['avatar_base_url']); + } elseif (\array_key_exists('avatar_base_url', $data) && null === $data['avatar_base_url']) { + $object->setAvatarBaseUrl(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { $value = $data['description']; + if (\is_string($data['description'])) { + $value = $data['description']; + } + $object->setDescription($value); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - $object->setDescription($value); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('discoverable', $data) && null !== $data['discoverable']) { - $object->setDiscoverable($data['discoverable']); - } elseif (\array_key_exists('discoverable', $data) && null === $data['discoverable']) { - $object->setDiscoverable(null); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('email_domain', $data) && null !== $data['email_domain']) { - $object->setEmailDomain($data['email_domain']); - } elseif (\array_key_exists('email_domain', $data) && null === $data['email_domain']) { - $object->setEmailDomain(null); - } - if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { - $object->setEnterpriseId($data['enterprise_id']); - } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { - $object->setEnterpriseId(null); - } - if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { - $object->setEnterpriseName($data['enterprise_name']); - } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { - $object->setEnterpriseName(null); - } - if (\array_key_exists('external_org_migrations', $data) && null !== $data['external_org_migrations']) { - $object->setExternalOrgMigrations($this->denormalizer->denormalize($data['external_org_migrations'], 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations', 'json', $context)); - } elseif (\array_key_exists('external_org_migrations', $data) && null === $data['external_org_migrations']) { - $object->setExternalOrgMigrations(null); - } - if (\array_key_exists('has_compliance_export', $data) && null !== $data['has_compliance_export']) { - $object->setHasComplianceExport($data['has_compliance_export']); - } elseif (\array_key_exists('has_compliance_export', $data) && null === $data['has_compliance_export']) { - $object->setHasComplianceExport(null); - } - if (\array_key_exists('icon', $data) && null !== $data['icon']) { - $object->setIcon($this->denormalizer->denormalize($data['icon'], 'JoliCode\\Slack\\Api\\Model\\ObjsIcon', 'json', $context)); - } elseif (\array_key_exists('icon', $data) && null === $data['icon']) { - $object->setIcon(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_assigned', $data) && null !== $data['is_assigned']) { - $object->setIsAssigned($data['is_assigned']); - } elseif (\array_key_exists('is_assigned', $data) && null === $data['is_assigned']) { - $object->setIsAssigned(null); - } - if (\array_key_exists('is_enterprise', $data) && null !== $data['is_enterprise']) { - $object->setIsEnterprise($data['is_enterprise']); - } elseif (\array_key_exists('is_enterprise', $data) && null === $data['is_enterprise']) { - $object->setIsEnterprise(null); - } - if (\array_key_exists('is_over_storage_limit', $data) && null !== $data['is_over_storage_limit']) { - $object->setIsOverStorageLimit($data['is_over_storage_limit']); - } elseif (\array_key_exists('is_over_storage_limit', $data) && null === $data['is_over_storage_limit']) { - $object->setIsOverStorageLimit(null); - } - if (\array_key_exists('limit_ts', $data) && null !== $data['limit_ts']) { - $object->setLimitTs($data['limit_ts']); - } elseif (\array_key_exists('limit_ts', $data) && null === $data['limit_ts']) { - $object->setLimitTs(null); - } - if (\array_key_exists('locale', $data) && null !== $data['locale']) { - $object->setLocale($data['locale']); - } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { - $object->setLocale(null); - } - if (\array_key_exists('messages_count', $data) && null !== $data['messages_count']) { - $object->setMessagesCount($data['messages_count']); - } elseif (\array_key_exists('messages_count', $data) && null === $data['messages_count']) { - $object->setMessagesCount(null); - } - if (\array_key_exists('msg_edit_window_mins', $data) && null !== $data['msg_edit_window_mins']) { - $object->setMsgEditWindowMins($data['msg_edit_window_mins']); - } elseif (\array_key_exists('msg_edit_window_mins', $data) && null === $data['msg_edit_window_mins']) { - $object->setMsgEditWindowMins(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('over_integrations_limit', $data) && null !== $data['over_integrations_limit']) { - $object->setOverIntegrationsLimit($data['over_integrations_limit']); - } elseif (\array_key_exists('over_integrations_limit', $data) && null === $data['over_integrations_limit']) { - $object->setOverIntegrationsLimit(null); - } - if (\array_key_exists('over_storage_limit', $data) && null !== $data['over_storage_limit']) { - $object->setOverStorageLimit($data['over_storage_limit']); - } elseif (\array_key_exists('over_storage_limit', $data) && null === $data['over_storage_limit']) { - $object->setOverStorageLimit(null); - } - if (\array_key_exists('pay_prod_cur', $data) && null !== $data['pay_prod_cur']) { - $object->setPayProdCur($data['pay_prod_cur']); - } elseif (\array_key_exists('pay_prod_cur', $data) && null === $data['pay_prod_cur']) { - $object->setPayProdCur(null); - } - if (\array_key_exists('plan', $data) && null !== $data['plan']) { - $object->setPlan($data['plan']); - } elseif (\array_key_exists('plan', $data) && null === $data['plan']) { - $object->setPlan(null); - } - if (\array_key_exists('primary_owner', $data) && null !== $data['primary_owner']) { - $object->setPrimaryOwner($this->denormalizer->denormalize($data['primary_owner'], 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner', 'json', $context)); - } elseif (\array_key_exists('primary_owner', $data) && null === $data['primary_owner']) { - $object->setPrimaryOwner(null); - } - if (\array_key_exists('sso_provider', $data) && null !== $data['sso_provider']) { - $object->setSsoProvider($this->denormalizer->denormalize($data['sso_provider'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider', 'json', $context)); - } elseif (\array_key_exists('sso_provider', $data) && null === $data['sso_provider']) { - $object->setSsoProvider(null); + if (\array_key_exists('discoverable', $data) && null !== $data['discoverable']) { + $object->setDiscoverable($data['discoverable']); + } elseif (\array_key_exists('discoverable', $data) && null === $data['discoverable']) { + $object->setDiscoverable(null); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('email_domain', $data) && null !== $data['email_domain']) { + $object->setEmailDomain($data['email_domain']); + } elseif (\array_key_exists('email_domain', $data) && null === $data['email_domain']) { + $object->setEmailDomain(null); + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { + $object->setEnterpriseName($data['enterprise_name']); + } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { + $object->setEnterpriseName(null); + } + if (\array_key_exists('external_org_migrations', $data) && null !== $data['external_org_migrations']) { + $object->setExternalOrgMigrations($this->denormalizer->denormalize($data['external_org_migrations'], 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations', 'json', $context)); + } elseif (\array_key_exists('external_org_migrations', $data) && null === $data['external_org_migrations']) { + $object->setExternalOrgMigrations(null); + } + if (\array_key_exists('has_compliance_export', $data) && null !== $data['has_compliance_export']) { + $object->setHasComplianceExport($data['has_compliance_export']); + } elseif (\array_key_exists('has_compliance_export', $data) && null === $data['has_compliance_export']) { + $object->setHasComplianceExport(null); + } + if (\array_key_exists('icon', $data) && null !== $data['icon']) { + $object->setIcon($this->denormalizer->denormalize($data['icon'], 'JoliCode\\Slack\\Api\\Model\\ObjsIcon', 'json', $context)); + } elseif (\array_key_exists('icon', $data) && null === $data['icon']) { + $object->setIcon(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_assigned', $data) && null !== $data['is_assigned']) { + $object->setIsAssigned($data['is_assigned']); + } elseif (\array_key_exists('is_assigned', $data) && null === $data['is_assigned']) { + $object->setIsAssigned(null); + } + if (\array_key_exists('is_enterprise', $data) && null !== $data['is_enterprise']) { + $object->setIsEnterprise($data['is_enterprise']); + } elseif (\array_key_exists('is_enterprise', $data) && null === $data['is_enterprise']) { + $object->setIsEnterprise(null); + } + if (\array_key_exists('is_over_storage_limit', $data) && null !== $data['is_over_storage_limit']) { + $object->setIsOverStorageLimit($data['is_over_storage_limit']); + } elseif (\array_key_exists('is_over_storage_limit', $data) && null === $data['is_over_storage_limit']) { + $object->setIsOverStorageLimit(null); + } + if (\array_key_exists('limit_ts', $data) && null !== $data['limit_ts']) { + $object->setLimitTs($data['limit_ts']); + } elseif (\array_key_exists('limit_ts', $data) && null === $data['limit_ts']) { + $object->setLimitTs(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('messages_count', $data) && null !== $data['messages_count']) { + $object->setMessagesCount($data['messages_count']); + } elseif (\array_key_exists('messages_count', $data) && null === $data['messages_count']) { + $object->setMessagesCount(null); + } + if (\array_key_exists('msg_edit_window_mins', $data) && null !== $data['msg_edit_window_mins']) { + $object->setMsgEditWindowMins($data['msg_edit_window_mins']); + } elseif (\array_key_exists('msg_edit_window_mins', $data) && null === $data['msg_edit_window_mins']) { + $object->setMsgEditWindowMins(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('over_integrations_limit', $data) && null !== $data['over_integrations_limit']) { + $object->setOverIntegrationsLimit($data['over_integrations_limit']); + } elseif (\array_key_exists('over_integrations_limit', $data) && null === $data['over_integrations_limit']) { + $object->setOverIntegrationsLimit(null); + } + if (\array_key_exists('over_storage_limit', $data) && null !== $data['over_storage_limit']) { + $object->setOverStorageLimit($data['over_storage_limit']); + } elseif (\array_key_exists('over_storage_limit', $data) && null === $data['over_storage_limit']) { + $object->setOverStorageLimit(null); + } + if (\array_key_exists('pay_prod_cur', $data) && null !== $data['pay_prod_cur']) { + $object->setPayProdCur($data['pay_prod_cur']); + } elseif (\array_key_exists('pay_prod_cur', $data) && null === $data['pay_prod_cur']) { + $object->setPayProdCur(null); + } + if (\array_key_exists('plan', $data) && null !== $data['plan']) { + $object->setPlan($data['plan']); + } elseif (\array_key_exists('plan', $data) && null === $data['plan']) { + $object->setPlan(null); + } + if (\array_key_exists('primary_owner', $data) && null !== $data['primary_owner']) { + $object->setPrimaryOwner($this->denormalizer->denormalize($data['primary_owner'], 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner', 'json', $context)); + } elseif (\array_key_exists('primary_owner', $data) && null === $data['primary_owner']) { + $object->setPrimaryOwner(null); + } + if (\array_key_exists('sso_provider', $data) && null !== $data['sso_provider']) { + $object->setSsoProvider($this->denormalizer->denormalize($data['sso_provider'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider', 'json', $context)); + } elseif (\array_key_exists('sso_provider', $data) && null === $data['sso_provider']) { + $object->setSsoProvider(null); + } + + return $object; } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('archived') && null !== $object->getArchived()) { + $data['archived'] = $object->getArchived(); + } + if ($object->isInitialized('avatarBaseUrl') && null !== $object->getAvatarBaseUrl()) { + $data['avatar_base_url'] = $object->getAvatarBaseUrl(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('dateCreate') && null !== $object->getDateCreate()) { + $data['date_create'] = $object->getDateCreate(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['deleted'] = $object->getDeleted(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $value = $object->getDescription(); + if (\is_string($object->getDescription())) { + $value = $object->getDescription(); + } + $data['description'] = $value; + } + if ($object->isInitialized('discoverable') && null !== $object->getDiscoverable()) { + $data['discoverable'] = $object->getDiscoverable(); + } + $data['domain'] = $object->getDomain(); + $data['email_domain'] = $object->getEmailDomain(); + if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { + $data['enterprise_id'] = $object->getEnterpriseId(); + } + if ($object->isInitialized('enterpriseName') && null !== $object->getEnterpriseName()) { + $data['enterprise_name'] = $object->getEnterpriseName(); + } + if ($object->isInitialized('externalOrgMigrations') && null !== $object->getExternalOrgMigrations()) { + $data['external_org_migrations'] = $this->normalizer->normalize($object->getExternalOrgMigrations(), 'json', $context); + } + if ($object->isInitialized('hasComplianceExport') && null !== $object->getHasComplianceExport()) { + $data['has_compliance_export'] = $object->getHasComplianceExport(); + } + $data['icon'] = $this->normalizer->normalize($object->getIcon(), 'json', $context); + $data['id'] = $object->getId(); + if ($object->isInitialized('isAssigned') && null !== $object->getIsAssigned()) { + $data['is_assigned'] = $object->getIsAssigned(); + } + if ($object->isInitialized('isEnterprise') && null !== $object->getIsEnterprise()) { + $data['is_enterprise'] = $object->getIsEnterprise(); + } + if ($object->isInitialized('isOverStorageLimit') && null !== $object->getIsOverStorageLimit()) { + $data['is_over_storage_limit'] = $object->getIsOverStorageLimit(); + } + if ($object->isInitialized('limitTs') && null !== $object->getLimitTs()) { + $data['limit_ts'] = $object->getLimitTs(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + if ($object->isInitialized('messagesCount') && null !== $object->getMessagesCount()) { + $data['messages_count'] = $object->getMessagesCount(); + } + if ($object->isInitialized('msgEditWindowMins') && null !== $object->getMsgEditWindowMins()) { + $data['msg_edit_window_mins'] = $object->getMsgEditWindowMins(); + } + $data['name'] = $object->getName(); + if ($object->isInitialized('overIntegrationsLimit') && null !== $object->getOverIntegrationsLimit()) { + $data['over_integrations_limit'] = $object->getOverIntegrationsLimit(); + } + if ($object->isInitialized('overStorageLimit') && null !== $object->getOverStorageLimit()) { + $data['over_storage_limit'] = $object->getOverStorageLimit(); + } + if ($object->isInitialized('payProdCur') && null !== $object->getPayProdCur()) { + $data['pay_prod_cur'] = $object->getPayProdCur(); + } + if ($object->isInitialized('plan') && null !== $object->getPlan()) { + $data['plan'] = $object->getPlan(); + } + if ($object->isInitialized('primaryOwner') && null !== $object->getPrimaryOwner()) { + $data['primary_owner'] = $this->normalizer->normalize($object->getPrimaryOwner(), 'json', $context); + } + if ($object->isInitialized('ssoProvider') && null !== $object->getSsoProvider()) { + $data['sso_provider'] = $this->normalizer->normalize($object->getSsoProvider(), 'json', $context); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('archived') && null !== $object->getArchived()) { - $data['archived'] = $object->getArchived(); + return $data; } - if ($object->isInitialized('avatarBaseUrl') && null !== $object->getAvatarBaseUrl()) { - $data['avatar_base_url'] = $object->getAvatarBaseUrl(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false]; } - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['created'] = $object->getCreated(); + } +} else { + class ObjsTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === $type; } - if ($object->isInitialized('dateCreate') && null !== $object->getDateCreate()) { - $data['date_create'] = $object->getDateCreate(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeam' === \get_class($data); } - if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { - $data['deleted'] = $object->getDeleted(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeam(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('archived', $data) && null !== $data['archived']) { + $object->setArchived($data['archived']); + } elseif (\array_key_exists('archived', $data) && null === $data['archived']) { + $object->setArchived(null); + } + if (\array_key_exists('avatar_base_url', $data) && null !== $data['avatar_base_url']) { + $object->setAvatarBaseUrl($data['avatar_base_url']); + } elseif (\array_key_exists('avatar_base_url', $data) && null === $data['avatar_base_url']) { + $object->setAvatarBaseUrl(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $value = $data['description']; + if (\is_string($data['description'])) { + $value = $data['description']; + } + $object->setDescription($value); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('discoverable', $data) && null !== $data['discoverable']) { + $object->setDiscoverable($data['discoverable']); + } elseif (\array_key_exists('discoverable', $data) && null === $data['discoverable']) { + $object->setDiscoverable(null); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('email_domain', $data) && null !== $data['email_domain']) { + $object->setEmailDomain($data['email_domain']); + } elseif (\array_key_exists('email_domain', $data) && null === $data['email_domain']) { + $object->setEmailDomain(null); + } + if (\array_key_exists('enterprise_id', $data) && null !== $data['enterprise_id']) { + $object->setEnterpriseId($data['enterprise_id']); + } elseif (\array_key_exists('enterprise_id', $data) && null === $data['enterprise_id']) { + $object->setEnterpriseId(null); + } + if (\array_key_exists('enterprise_name', $data) && null !== $data['enterprise_name']) { + $object->setEnterpriseName($data['enterprise_name']); + } elseif (\array_key_exists('enterprise_name', $data) && null === $data['enterprise_name']) { + $object->setEnterpriseName(null); + } + if (\array_key_exists('external_org_migrations', $data) && null !== $data['external_org_migrations']) { + $object->setExternalOrgMigrations($this->denormalizer->denormalize($data['external_org_migrations'], 'JoliCode\\Slack\\Api\\Model\\ObjsExternalOrgMigrations', 'json', $context)); + } elseif (\array_key_exists('external_org_migrations', $data) && null === $data['external_org_migrations']) { + $object->setExternalOrgMigrations(null); + } + if (\array_key_exists('has_compliance_export', $data) && null !== $data['has_compliance_export']) { + $object->setHasComplianceExport($data['has_compliance_export']); + } elseif (\array_key_exists('has_compliance_export', $data) && null === $data['has_compliance_export']) { + $object->setHasComplianceExport(null); + } + if (\array_key_exists('icon', $data) && null !== $data['icon']) { + $object->setIcon($this->denormalizer->denormalize($data['icon'], 'JoliCode\\Slack\\Api\\Model\\ObjsIcon', 'json', $context)); + } elseif (\array_key_exists('icon', $data) && null === $data['icon']) { + $object->setIcon(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_assigned', $data) && null !== $data['is_assigned']) { + $object->setIsAssigned($data['is_assigned']); + } elseif (\array_key_exists('is_assigned', $data) && null === $data['is_assigned']) { + $object->setIsAssigned(null); + } + if (\array_key_exists('is_enterprise', $data) && null !== $data['is_enterprise']) { + $object->setIsEnterprise($data['is_enterprise']); + } elseif (\array_key_exists('is_enterprise', $data) && null === $data['is_enterprise']) { + $object->setIsEnterprise(null); + } + if (\array_key_exists('is_over_storage_limit', $data) && null !== $data['is_over_storage_limit']) { + $object->setIsOverStorageLimit($data['is_over_storage_limit']); + } elseif (\array_key_exists('is_over_storage_limit', $data) && null === $data['is_over_storage_limit']) { + $object->setIsOverStorageLimit(null); + } + if (\array_key_exists('limit_ts', $data) && null !== $data['limit_ts']) { + $object->setLimitTs($data['limit_ts']); + } elseif (\array_key_exists('limit_ts', $data) && null === $data['limit_ts']) { + $object->setLimitTs(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('messages_count', $data) && null !== $data['messages_count']) { + $object->setMessagesCount($data['messages_count']); + } elseif (\array_key_exists('messages_count', $data) && null === $data['messages_count']) { + $object->setMessagesCount(null); + } + if (\array_key_exists('msg_edit_window_mins', $data) && null !== $data['msg_edit_window_mins']) { + $object->setMsgEditWindowMins($data['msg_edit_window_mins']); + } elseif (\array_key_exists('msg_edit_window_mins', $data) && null === $data['msg_edit_window_mins']) { + $object->setMsgEditWindowMins(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('over_integrations_limit', $data) && null !== $data['over_integrations_limit']) { + $object->setOverIntegrationsLimit($data['over_integrations_limit']); + } elseif (\array_key_exists('over_integrations_limit', $data) && null === $data['over_integrations_limit']) { + $object->setOverIntegrationsLimit(null); + } + if (\array_key_exists('over_storage_limit', $data) && null !== $data['over_storage_limit']) { + $object->setOverStorageLimit($data['over_storage_limit']); + } elseif (\array_key_exists('over_storage_limit', $data) && null === $data['over_storage_limit']) { + $object->setOverStorageLimit(null); + } + if (\array_key_exists('pay_prod_cur', $data) && null !== $data['pay_prod_cur']) { + $object->setPayProdCur($data['pay_prod_cur']); + } elseif (\array_key_exists('pay_prod_cur', $data) && null === $data['pay_prod_cur']) { + $object->setPayProdCur(null); + } + if (\array_key_exists('plan', $data) && null !== $data['plan']) { + $object->setPlan($data['plan']); + } elseif (\array_key_exists('plan', $data) && null === $data['plan']) { + $object->setPlan(null); + } + if (\array_key_exists('primary_owner', $data) && null !== $data['primary_owner']) { + $object->setPrimaryOwner($this->denormalizer->denormalize($data['primary_owner'], 'JoliCode\\Slack\\Api\\Model\\ObjsPrimaryOwner', 'json', $context)); + } elseif (\array_key_exists('primary_owner', $data) && null === $data['primary_owner']) { + $object->setPrimaryOwner(null); + } + if (\array_key_exists('sso_provider', $data) && null !== $data['sso_provider']) { + $object->setSsoProvider($this->denormalizer->denormalize($data['sso_provider'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider', 'json', $context)); + } elseif (\array_key_exists('sso_provider', $data) && null === $data['sso_provider']) { + $object->setSsoProvider(null); + } + + return $object; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $value = $object->getDescription(); - if (\is_string($object->getDescription())) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('archived') && null !== $object->getArchived()) { + $data['archived'] = $object->getArchived(); + } + if ($object->isInitialized('avatarBaseUrl') && null !== $object->getAvatarBaseUrl()) { + $data['avatar_base_url'] = $object->getAvatarBaseUrl(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('dateCreate') && null !== $object->getDateCreate()) { + $data['date_create'] = $object->getDateCreate(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['deleted'] = $object->getDeleted(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { $value = $object->getDescription(); + if (\is_string($object->getDescription())) { + $value = $object->getDescription(); + } + $data['description'] = $value; + } + if ($object->isInitialized('discoverable') && null !== $object->getDiscoverable()) { + $data['discoverable'] = $object->getDiscoverable(); + } + $data['domain'] = $object->getDomain(); + $data['email_domain'] = $object->getEmailDomain(); + if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { + $data['enterprise_id'] = $object->getEnterpriseId(); + } + if ($object->isInitialized('enterpriseName') && null !== $object->getEnterpriseName()) { + $data['enterprise_name'] = $object->getEnterpriseName(); + } + if ($object->isInitialized('externalOrgMigrations') && null !== $object->getExternalOrgMigrations()) { + $data['external_org_migrations'] = $this->normalizer->normalize($object->getExternalOrgMigrations(), 'json', $context); + } + if ($object->isInitialized('hasComplianceExport') && null !== $object->getHasComplianceExport()) { + $data['has_compliance_export'] = $object->getHasComplianceExport(); + } + $data['icon'] = $this->normalizer->normalize($object->getIcon(), 'json', $context); + $data['id'] = $object->getId(); + if ($object->isInitialized('isAssigned') && null !== $object->getIsAssigned()) { + $data['is_assigned'] = $object->getIsAssigned(); + } + if ($object->isInitialized('isEnterprise') && null !== $object->getIsEnterprise()) { + $data['is_enterprise'] = $object->getIsEnterprise(); + } + if ($object->isInitialized('isOverStorageLimit') && null !== $object->getIsOverStorageLimit()) { + $data['is_over_storage_limit'] = $object->getIsOverStorageLimit(); + } + if ($object->isInitialized('limitTs') && null !== $object->getLimitTs()) { + $data['limit_ts'] = $object->getLimitTs(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + if ($object->isInitialized('messagesCount') && null !== $object->getMessagesCount()) { + $data['messages_count'] = $object->getMessagesCount(); + } + if ($object->isInitialized('msgEditWindowMins') && null !== $object->getMsgEditWindowMins()) { + $data['msg_edit_window_mins'] = $object->getMsgEditWindowMins(); + } + $data['name'] = $object->getName(); + if ($object->isInitialized('overIntegrationsLimit') && null !== $object->getOverIntegrationsLimit()) { + $data['over_integrations_limit'] = $object->getOverIntegrationsLimit(); + } + if ($object->isInitialized('overStorageLimit') && null !== $object->getOverStorageLimit()) { + $data['over_storage_limit'] = $object->getOverStorageLimit(); + } + if ($object->isInitialized('payProdCur') && null !== $object->getPayProdCur()) { + $data['pay_prod_cur'] = $object->getPayProdCur(); + } + if ($object->isInitialized('plan') && null !== $object->getPlan()) { + $data['plan'] = $object->getPlan(); + } + if ($object->isInitialized('primaryOwner') && null !== $object->getPrimaryOwner()) { + $data['primary_owner'] = $this->normalizer->normalize($object->getPrimaryOwner(), 'json', $context); + } + if ($object->isInitialized('ssoProvider') && null !== $object->getSsoProvider()) { + $data['sso_provider'] = $this->normalizer->normalize($object->getSsoProvider(), 'json', $context); } - $data['description'] = $value; - } - if ($object->isInitialized('discoverable') && null !== $object->getDiscoverable()) { - $data['discoverable'] = $object->getDiscoverable(); - } - $data['domain'] = $object->getDomain(); - $data['email_domain'] = $object->getEmailDomain(); - if ($object->isInitialized('enterpriseId') && null !== $object->getEnterpriseId()) { - $data['enterprise_id'] = $object->getEnterpriseId(); - } - if ($object->isInitialized('enterpriseName') && null !== $object->getEnterpriseName()) { - $data['enterprise_name'] = $object->getEnterpriseName(); - } - if ($object->isInitialized('externalOrgMigrations') && null !== $object->getExternalOrgMigrations()) { - $data['external_org_migrations'] = $this->normalizer->normalize($object->getExternalOrgMigrations(), 'json', $context); - } - if ($object->isInitialized('hasComplianceExport') && null !== $object->getHasComplianceExport()) { - $data['has_compliance_export'] = $object->getHasComplianceExport(); - } - $data['icon'] = $this->normalizer->normalize($object->getIcon(), 'json', $context); - $data['id'] = $object->getId(); - if ($object->isInitialized('isAssigned') && null !== $object->getIsAssigned()) { - $data['is_assigned'] = $object->getIsAssigned(); - } - if ($object->isInitialized('isEnterprise') && null !== $object->getIsEnterprise()) { - $data['is_enterprise'] = $object->getIsEnterprise(); - } - if ($object->isInitialized('isOverStorageLimit') && null !== $object->getIsOverStorageLimit()) { - $data['is_over_storage_limit'] = $object->getIsOverStorageLimit(); - } - if ($object->isInitialized('limitTs') && null !== $object->getLimitTs()) { - $data['limit_ts'] = $object->getLimitTs(); - } - if ($object->isInitialized('locale') && null !== $object->getLocale()) { - $data['locale'] = $object->getLocale(); - } - if ($object->isInitialized('messagesCount') && null !== $object->getMessagesCount()) { - $data['messages_count'] = $object->getMessagesCount(); - } - if ($object->isInitialized('msgEditWindowMins') && null !== $object->getMsgEditWindowMins()) { - $data['msg_edit_window_mins'] = $object->getMsgEditWindowMins(); - } - $data['name'] = $object->getName(); - if ($object->isInitialized('overIntegrationsLimit') && null !== $object->getOverIntegrationsLimit()) { - $data['over_integrations_limit'] = $object->getOverIntegrationsLimit(); - } - if ($object->isInitialized('overStorageLimit') && null !== $object->getOverStorageLimit()) { - $data['over_storage_limit'] = $object->getOverStorageLimit(); - } - if ($object->isInitialized('payProdCur') && null !== $object->getPayProdCur()) { - $data['pay_prod_cur'] = $object->getPayProdCur(); - } - if ($object->isInitialized('plan') && null !== $object->getPlan()) { - $data['plan'] = $object->getPlan(); - } - if ($object->isInitialized('primaryOwner') && null !== $object->getPrimaryOwner()) { - $data['primary_owner'] = $this->normalizer->normalize($object->getPrimaryOwner(), 'json', $context); - } - if ($object->isInitialized('ssoProvider') && null !== $object->getSsoProvider()) { - $data['sso_provider'] = $this->normalizer->normalize($object->getSsoProvider(), 'json', $context); - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeam' => false]; + } } } diff --git a/generated/Normalizer/ObjsTeamProfileFieldNormalizer.php b/generated/Normalizer/ObjsTeamProfileFieldNormalizer.php index c9baa047..4053ec36 100644 --- a/generated/Normalizer/ObjsTeamProfileFieldNormalizer.php +++ b/generated/Normalizer/ObjsTeamProfileFieldNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,140 +24,277 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsTeamProfileFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsTeamProfileFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileField(); - if (\array_key_exists('ordering', $data) && \is_int($data['ordering'])) { - $data['ordering'] = (float) $data['ordering']; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === $type; } - if (null === $data || false === \is_array($data)) { - return $object; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === \get_class($data); } - if (\array_key_exists('field_name', $data) && null !== $data['field_name']) { - $value = $data['field_name']; - if (\is_string($data['field_name'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileField(); + if (\array_key_exists('ordering', $data) && \is_int($data['ordering'])) { + $data['ordering'] = (float) $data['ordering']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('field_name', $data) && null !== $data['field_name']) { $value = $data['field_name']; + if (\is_string($data['field_name'])) { + $value = $data['field_name']; + } + $object->setFieldName($value); + } elseif (\array_key_exists('field_name', $data) && null === $data['field_name']) { + $object->setFieldName(null); } - $object->setFieldName($value); - } elseif (\array_key_exists('field_name', $data) && null === $data['field_name']) { - $object->setFieldName(null); - } - if (\array_key_exists('hint', $data) && null !== $data['hint']) { - $object->setHint($data['hint']); - } elseif (\array_key_exists('hint', $data) && null === $data['hint']) { - $object->setHint(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + if (\array_key_exists('hint', $data) && null !== $data['hint']) { + $object->setHint($data['hint']); + } elseif (\array_key_exists('hint', $data) && null === $data['hint']) { + $object->setHint(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_hidden', $data) && null !== $data['is_hidden']) { + $object->setIsHidden($data['is_hidden']); + } elseif (\array_key_exists('is_hidden', $data) && null === $data['is_hidden']) { + $object->setIsHidden(null); + } + if (\array_key_exists('label', $data) && null !== $data['label']) { + $object->setLabel($data['label']); + } elseif (\array_key_exists('label', $data) && null === $data['label']) { + $object->setLabel(null); + } + if (\array_key_exists('options', $data) && null !== $data['options']) { + $object->setOptions($this->denormalizer->denormalize($data['options'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption', 'json', $context)); + } elseif (\array_key_exists('options', $data) && null === $data['options']) { + $object->setOptions(null); + } + if (\array_key_exists('ordering', $data) && null !== $data['ordering']) { + $object->setOrdering($data['ordering']); + } elseif (\array_key_exists('ordering', $data) && null === $data['ordering']) { + $object->setOrdering(null); + } + if (\array_key_exists('possible_values', $data) && null !== $data['possible_values']) { + $value_1 = $data['possible_values']; + if (\is_array($data['possible_values']) && $this->isOnlyNumericKeys($data['possible_values'])) { + $values = []; + foreach ($data['possible_values'] as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } + $object->setPossibleValues($value_1); + } elseif (\array_key_exists('possible_values', $data) && null === $data['possible_values']) { + $object->setPossibleValues(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + + return $object; } - if (\array_key_exists('is_hidden', $data) && null !== $data['is_hidden']) { - $object->setIsHidden($data['is_hidden']); - } elseif (\array_key_exists('is_hidden', $data) && null === $data['is_hidden']) { - $object->setIsHidden(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('fieldName') && null !== $object->getFieldName()) { + $value = $object->getFieldName(); + if (\is_string($object->getFieldName())) { + $value = $object->getFieldName(); + } + $data['field_name'] = $value; + } + $data['hint'] = $object->getHint(); + $data['id'] = $object->getId(); + if ($object->isInitialized('isHidden') && null !== $object->getIsHidden()) { + $data['is_hidden'] = $object->getIsHidden(); + } + $data['label'] = $object->getLabel(); + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $data['options'] = $this->normalizer->normalize($object->getOptions(), 'json', $context); + } + $data['ordering'] = $object->getOrdering(); + if ($object->isInitialized('possibleValues') && null !== $object->getPossibleValues()) { + $value_1 = $object->getPossibleValues(); + if (\is_array($object->getPossibleValues())) { + $values = []; + foreach ($object->getPossibleValues() as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } + $data['possible_values'] = $value_1; + } + $data['type'] = $object->getType(); + + return $data; } - if (\array_key_exists('label', $data) && null !== $data['label']) { - $object->setLabel($data['label']); - } elseif (\array_key_exists('label', $data) && null === $data['label']) { - $object->setLabel(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false]; } - if (\array_key_exists('options', $data) && null !== $data['options']) { - $object->setOptions($this->denormalizer->denormalize($data['options'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption', 'json', $context)); - } elseif (\array_key_exists('options', $data) && null === $data['options']) { - $object->setOptions(null); + } +} else { + class ObjsTeamProfileFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === $type; } - if (\array_key_exists('ordering', $data) && null !== $data['ordering']) { - $object->setOrdering($data['ordering']); - } elseif (\array_key_exists('ordering', $data) && null === $data['ordering']) { - $object->setOrdering(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' === \get_class($data); } - if (\array_key_exists('possible_values', $data) && null !== $data['possible_values']) { - $value_1 = $data['possible_values']; - if (\is_array($data['possible_values']) && $this->isOnlyNumericKeys($data['possible_values'])) { - $values = []; - foreach ($data['possible_values'] as $value_2) { - $values[] = $value_2; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileField(); + if (\array_key_exists('ordering', $data) && \is_int($data['ordering'])) { + $data['ordering'] = (float) $data['ordering']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('field_name', $data) && null !== $data['field_name']) { + $value = $data['field_name']; + if (\is_string($data['field_name'])) { + $value = $data['field_name']; } - $value_1 = $values; + $object->setFieldName($value); + } elseif (\array_key_exists('field_name', $data) && null === $data['field_name']) { + $object->setFieldName(null); + } + if (\array_key_exists('hint', $data) && null !== $data['hint']) { + $object->setHint($data['hint']); + } elseif (\array_key_exists('hint', $data) && null === $data['hint']) { + $object->setHint(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_hidden', $data) && null !== $data['is_hidden']) { + $object->setIsHidden($data['is_hidden']); + } elseif (\array_key_exists('is_hidden', $data) && null === $data['is_hidden']) { + $object->setIsHidden(null); + } + if (\array_key_exists('label', $data) && null !== $data['label']) { + $object->setLabel($data['label']); + } elseif (\array_key_exists('label', $data) && null === $data['label']) { + $object->setLabel(null); + } + if (\array_key_exists('options', $data) && null !== $data['options']) { + $object->setOptions($this->denormalizer->denormalize($data['options'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption', 'json', $context)); + } elseif (\array_key_exists('options', $data) && null === $data['options']) { + $object->setOptions(null); + } + if (\array_key_exists('ordering', $data) && null !== $data['ordering']) { + $object->setOrdering($data['ordering']); + } elseif (\array_key_exists('ordering', $data) && null === $data['ordering']) { + $object->setOrdering(null); + } + if (\array_key_exists('possible_values', $data) && null !== $data['possible_values']) { + $value_1 = $data['possible_values']; + if (\is_array($data['possible_values']) && $this->isOnlyNumericKeys($data['possible_values'])) { + $values = []; + foreach ($data['possible_values'] as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } + $object->setPossibleValues($value_1); + } elseif (\array_key_exists('possible_values', $data) && null === $data['possible_values']) { + $object->setPossibleValues(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); } - $object->setPossibleValues($value_1); - } elseif (\array_key_exists('possible_values', $data) && null === $data['possible_values']) { - $object->setPossibleValues(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldName') && null !== $object->getFieldName()) { - $value = $object->getFieldName(); - if (\is_string($object->getFieldName())) { + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('fieldName') && null !== $object->getFieldName()) { $value = $object->getFieldName(); + if (\is_string($object->getFieldName())) { + $value = $object->getFieldName(); + } + $data['field_name'] = $value; } - $data['field_name'] = $value; - } - $data['hint'] = $object->getHint(); - $data['id'] = $object->getId(); - if ($object->isInitialized('isHidden') && null !== $object->getIsHidden()) { - $data['is_hidden'] = $object->getIsHidden(); - } - $data['label'] = $object->getLabel(); - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $data['options'] = $this->normalizer->normalize($object->getOptions(), 'json', $context); - } - $data['ordering'] = $object->getOrdering(); - if ($object->isInitialized('possibleValues') && null !== $object->getPossibleValues()) { - $value_1 = $object->getPossibleValues(); - if (\is_array($object->getPossibleValues())) { - $values = []; - foreach ($object->getPossibleValues() as $value_2) { - $values[] = $value_2; + $data['hint'] = $object->getHint(); + $data['id'] = $object->getId(); + if ($object->isInitialized('isHidden') && null !== $object->getIsHidden()) { + $data['is_hidden'] = $object->getIsHidden(); + } + $data['label'] = $object->getLabel(); + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $data['options'] = $this->normalizer->normalize($object->getOptions(), 'json', $context); + } + $data['ordering'] = $object->getOrdering(); + if ($object->isInitialized('possibleValues') && null !== $object->getPossibleValues()) { + $value_1 = $object->getPossibleValues(); + if (\is_array($object->getPossibleValues())) { + $values = []; + foreach ($object->getPossibleValues() as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; } - $value_1 = $values; + $data['possible_values'] = $value_1; } - $data['possible_values'] = $value_1; - } - $data['type'] = $object->getType(); + $data['type'] = $object->getType(); - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField' => false]; + } } } diff --git a/generated/Normalizer/ObjsTeamProfileFieldOptionNormalizer.php b/generated/Normalizer/ObjsTeamProfileFieldOptionNormalizer.php index afc7e5fe..46da4283 100644 --- a/generated/Normalizer/ObjsTeamProfileFieldOptionNormalizer.php +++ b/generated/Normalizer/ObjsTeamProfileFieldOptionNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,115 +24,227 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsTeamProfileFieldOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsTeamProfileFieldOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileFieldOption(); - if (null === $data || false === \is_array($data)) { - return $object; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === \get_class($data); } - if (\array_key_exists('is_custom', $data) && null !== $data['is_custom']) { - $value = $data['is_custom']; - if (\is_bool($data['is_custom'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileFieldOption(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('is_custom', $data) && null !== $data['is_custom']) { $value = $data['is_custom']; + if (\is_bool($data['is_custom'])) { + $value = $data['is_custom']; + } + $object->setIsCustom($value); + } elseif (\array_key_exists('is_custom', $data) && null === $data['is_custom']) { + $object->setIsCustom(null); } - $object->setIsCustom($value); - } elseif (\array_key_exists('is_custom', $data) && null === $data['is_custom']) { - $object->setIsCustom(null); - } - if (\array_key_exists('is_multiple_entry', $data) && null !== $data['is_multiple_entry']) { - $value_1 = $data['is_multiple_entry']; - if (\is_bool($data['is_multiple_entry'])) { + if (\array_key_exists('is_multiple_entry', $data) && null !== $data['is_multiple_entry']) { $value_1 = $data['is_multiple_entry']; + if (\is_bool($data['is_multiple_entry'])) { + $value_1 = $data['is_multiple_entry']; + } + $object->setIsMultipleEntry($value_1); + } elseif (\array_key_exists('is_multiple_entry', $data) && null === $data['is_multiple_entry']) { + $object->setIsMultipleEntry(null); } - $object->setIsMultipleEntry($value_1); - } elseif (\array_key_exists('is_multiple_entry', $data) && null === $data['is_multiple_entry']) { - $object->setIsMultipleEntry(null); - } - if (\array_key_exists('is_protected', $data) && null !== $data['is_protected']) { - $value_2 = $data['is_protected']; - if (\is_bool($data['is_protected'])) { + if (\array_key_exists('is_protected', $data) && null !== $data['is_protected']) { $value_2 = $data['is_protected']; + if (\is_bool($data['is_protected'])) { + $value_2 = $data['is_protected']; + } + $object->setIsProtected($value_2); + } elseif (\array_key_exists('is_protected', $data) && null === $data['is_protected']) { + $object->setIsProtected(null); } - $object->setIsProtected($value_2); - } elseif (\array_key_exists('is_protected', $data) && null === $data['is_protected']) { - $object->setIsProtected(null); - } - if (\array_key_exists('is_scim', $data) && null !== $data['is_scim']) { - $value_3 = $data['is_scim']; - if (\is_bool($data['is_scim'])) { + if (\array_key_exists('is_scim', $data) && null !== $data['is_scim']) { $value_3 = $data['is_scim']; + if (\is_bool($data['is_scim'])) { + $value_3 = $data['is_scim']; + } + $object->setIsScim($value_3); + } elseif (\array_key_exists('is_scim', $data) && null === $data['is_scim']) { + $object->setIsScim(null); } - $object->setIsScim($value_3); - } elseif (\array_key_exists('is_scim', $data) && null === $data['is_scim']) { - $object->setIsScim(null); - } - return $object; - } + return $object; + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('isCustom') && null !== $object->getIsCustom()) { - $value = $object->getIsCustom(); - if (\is_bool($object->getIsCustom())) { + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('isCustom') && null !== $object->getIsCustom()) { $value = $object->getIsCustom(); + if (\is_bool($object->getIsCustom())) { + $value = $object->getIsCustom(); + } + $data['is_custom'] = $value; } - $data['is_custom'] = $value; - } - if ($object->isInitialized('isMultipleEntry') && null !== $object->getIsMultipleEntry()) { - $value_1 = $object->getIsMultipleEntry(); - if (\is_bool($object->getIsMultipleEntry())) { + if ($object->isInitialized('isMultipleEntry') && null !== $object->getIsMultipleEntry()) { $value_1 = $object->getIsMultipleEntry(); + if (\is_bool($object->getIsMultipleEntry())) { + $value_1 = $object->getIsMultipleEntry(); + } + $data['is_multiple_entry'] = $value_1; } - $data['is_multiple_entry'] = $value_1; - } - if ($object->isInitialized('isProtected') && null !== $object->getIsProtected()) { - $value_2 = $object->getIsProtected(); - if (\is_bool($object->getIsProtected())) { + if ($object->isInitialized('isProtected') && null !== $object->getIsProtected()) { $value_2 = $object->getIsProtected(); + if (\is_bool($object->getIsProtected())) { + $value_2 = $object->getIsProtected(); + } + $data['is_protected'] = $value_2; } - $data['is_protected'] = $value_2; - } - if ($object->isInitialized('isScim') && null !== $object->getIsScim()) { - $value_3 = $object->getIsScim(); - if (\is_bool($object->getIsScim())) { + if ($object->isInitialized('isScim') && null !== $object->getIsScim()) { $value_3 = $object->getIsScim(); + if (\is_bool($object->getIsScim())) { + $value_3 = $object->getIsScim(); + } + $data['is_scim'] = $value_3; } - $data['is_scim'] = $value_3; + + return $data; } - return $data; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false]; + } } - - public function getSupportedTypes(string $format = null): array +} else { + class ObjsTeamProfileFieldOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false]; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamProfileFieldOption(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('is_custom', $data) && null !== $data['is_custom']) { + $value = $data['is_custom']; + if (\is_bool($data['is_custom'])) { + $value = $data['is_custom']; + } + $object->setIsCustom($value); + } elseif (\array_key_exists('is_custom', $data) && null === $data['is_custom']) { + $object->setIsCustom(null); + } + if (\array_key_exists('is_multiple_entry', $data) && null !== $data['is_multiple_entry']) { + $value_1 = $data['is_multiple_entry']; + if (\is_bool($data['is_multiple_entry'])) { + $value_1 = $data['is_multiple_entry']; + } + $object->setIsMultipleEntry($value_1); + } elseif (\array_key_exists('is_multiple_entry', $data) && null === $data['is_multiple_entry']) { + $object->setIsMultipleEntry(null); + } + if (\array_key_exists('is_protected', $data) && null !== $data['is_protected']) { + $value_2 = $data['is_protected']; + if (\is_bool($data['is_protected'])) { + $value_2 = $data['is_protected']; + } + $object->setIsProtected($value_2); + } elseif (\array_key_exists('is_protected', $data) && null === $data['is_protected']) { + $object->setIsProtected(null); + } + if (\array_key_exists('is_scim', $data) && null !== $data['is_scim']) { + $value_3 = $data['is_scim']; + if (\is_bool($data['is_scim'])) { + $value_3 = $data['is_scim']; + } + $object->setIsScim($value_3); + } elseif (\array_key_exists('is_scim', $data) && null === $data['is_scim']) { + $object->setIsScim(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('isCustom') && null !== $object->getIsCustom()) { + $value = $object->getIsCustom(); + if (\is_bool($object->getIsCustom())) { + $value = $object->getIsCustom(); + } + $data['is_custom'] = $value; + } + if ($object->isInitialized('isMultipleEntry') && null !== $object->getIsMultipleEntry()) { + $value_1 = $object->getIsMultipleEntry(); + if (\is_bool($object->getIsMultipleEntry())) { + $value_1 = $object->getIsMultipleEntry(); + } + $data['is_multiple_entry'] = $value_1; + } + if ($object->isInitialized('isProtected') && null !== $object->getIsProtected()) { + $value_2 = $object->getIsProtected(); + if (\is_bool($object->getIsProtected())) { + $value_2 = $object->getIsProtected(); + } + $data['is_protected'] = $value_2; + } + if ($object->isInitialized('isScim') && null !== $object->getIsScim()) { + $value_3 = $object->getIsScim(); + if (\is_bool($object->getIsScim())) { + $value_3 = $object->getIsScim(); + } + $data['is_scim'] = $value_3; + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileFieldOption' => false]; + } } } diff --git a/generated/Normalizer/ObjsTeamSsoProviderNormalizer.php b/generated/Normalizer/ObjsTeamSsoProviderNormalizer.php index 009cc1f8..86f57210 100644 --- a/generated/Normalizer/ObjsTeamSsoProviderNormalizer.php +++ b/generated/Normalizer/ObjsTeamSsoProviderNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsTeamSsoProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsTeamSsoProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsTeamSsoProvider(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamSsoProvider(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('label', $data) && null !== $data['label']) { + $object->setLabel($data['label']); + } elseif (\array_key_exists('label', $data) && null === $data['label']) { + $object->setLabel(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('label', $data) && null !== $data['label']) { - $object->setLabel($data['label']); - } elseif (\array_key_exists('label', $data) && null === $data['label']) { - $object->setLabel(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('label') && null !== $object->getLabel()) { + $data['label'] = $object->getLabel(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsTeamSsoProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === $type; } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' === \get_class($data); } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsTeamSsoProvider(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('label', $data) && null !== $data['label']) { + $object->setLabel($data['label']); + } elseif (\array_key_exists('label', $data) && null === $data['label']) { + $object->setLabel(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('label') && null !== $object->getLabel()) { + $data['label'] = $object->getLabel(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsTeamSsoProvider' => false]; + } } } diff --git a/generated/Normalizer/ObjsUserNormalizer.php b/generated/Normalizer/ObjsUserNormalizer.php index 51c02253..5b18ee05 100644 --- a/generated/Normalizer/ObjsUserNormalizer.php +++ b/generated/Normalizer/ObjsUserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,293 +24,583 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsUser(); - if (\array_key_exists('tz_offset', $data) && \is_int($data['tz_offset'])) { - $data['tz_offset'] = (float) $data['tz_offset']; - } - if (\array_key_exists('updated', $data) && \is_int($data['updated'])) { - $data['updated'] = (float) $data['updated']; + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === \get_class($data); } - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUser(); + if (\array_key_exists('tz_offset', $data) && \is_int($data['tz_offset'])) { + $data['tz_offset'] = (float) $data['tz_offset']; + } + if (\array_key_exists('updated', $data) && \is_int($data['updated'])) { + $data['updated'] = (float) $data['updated']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('color', $data) && null !== $data['color']) { + $object->setColor($data['color']); + } elseif (\array_key_exists('color', $data) && null === $data['color']) { + $object->setColor(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('enterprise_user', $data) && null !== $data['enterprise_user']) { + $object->setEnterpriseUser($this->denormalizer->denormalize($data['enterprise_user'], 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser', 'json', $context)); + } elseif (\array_key_exists('enterprise_user', $data) && null === $data['enterprise_user']) { + $object->setEnterpriseUser(null); + } + if (\array_key_exists('has_2fa', $data) && null !== $data['has_2fa']) { + $object->setHas2fa($data['has_2fa']); + } elseif (\array_key_exists('has_2fa', $data) && null === $data['has_2fa']) { + $object->setHas2fa(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { + $object->setIsAdmin($data['is_admin']); + } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { + $object->setIsAdmin(null); + } + if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { + $object->setIsAppUser($data['is_app_user']); + } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { + $object->setIsAppUser(null); + } + if (\array_key_exists('is_bot', $data) && null !== $data['is_bot']) { + $object->setIsBot($data['is_bot']); + } elseif (\array_key_exists('is_bot', $data) && null === $data['is_bot']) { + $object->setIsBot(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_forgotten', $data) && null !== $data['is_forgotten']) { + $object->setIsForgotten($data['is_forgotten']); + } elseif (\array_key_exists('is_forgotten', $data) && null === $data['is_forgotten']) { + $object->setIsForgotten(null); + } + if (\array_key_exists('is_invited_user', $data) && null !== $data['is_invited_user']) { + $object->setIsInvitedUser($data['is_invited_user']); + } elseif (\array_key_exists('is_invited_user', $data) && null === $data['is_invited_user']) { + $object->setIsInvitedUser(null); + } + if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { + $object->setIsOwner($data['is_owner']); + } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { + $object->setIsOwner(null); + } + if (\array_key_exists('is_primary_owner', $data) && null !== $data['is_primary_owner']) { + $object->setIsPrimaryOwner($data['is_primary_owner']); + } elseif (\array_key_exists('is_primary_owner', $data) && null === $data['is_primary_owner']) { + $object->setIsPrimaryOwner(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { + $object->setIsRestricted($data['is_restricted']); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); + } + if (\array_key_exists('is_stranger', $data) && null !== $data['is_stranger']) { + $object->setIsStranger($data['is_stranger']); + } elseif (\array_key_exists('is_stranger', $data) && null === $data['is_stranger']) { + $object->setIsStranger(null); + } + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { + $object->setIsUltraRestricted($data['is_ultra_restricted']); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('presence', $data) && null !== $data['presence']) { + $object->setPresence($data['presence']); + } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { + $object->setPresence(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('team_profile', $data) && null !== $data['team_profile']) { + $object->setTeamProfile($this->denormalizer->denormalize($data['team_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile', 'json', $context)); + } elseif (\array_key_exists('team_profile', $data) && null === $data['team_profile']) { + $object->setTeamProfile(null); + } + if (\array_key_exists('teams', $data) && null !== $data['teams']) { + $values = []; + foreach ($data['teams'] as $value) { + $values[] = $value; + } + $object->setTeams($values); + } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { + $object->setTeams(null); + } + if (\array_key_exists('two_factor_type', $data) && null !== $data['two_factor_type']) { + $object->setTwoFactorType($data['two_factor_type']); + } elseif (\array_key_exists('two_factor_type', $data) && null === $data['two_factor_type']) { + $object->setTwoFactorType(null); + } + if (\array_key_exists('tz', $data) && null !== $data['tz']) { + $object->setTz($data['tz']); + } elseif (\array_key_exists('tz', $data) && null === $data['tz']) { + $object->setTz(null); + } + if (\array_key_exists('tz_label', $data) && null !== $data['tz_label']) { + $object->setTzLabel($data['tz_label']); + } elseif (\array_key_exists('tz_label', $data) && null === $data['tz_label']) { + $object->setTzLabel(null); + } + if (\array_key_exists('tz_offset', $data) && null !== $data['tz_offset']) { + $object->setTzOffset($data['tz_offset']); + } elseif (\array_key_exists('tz_offset', $data) && null === $data['tz_offset']) { + $object->setTzOffset(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + return $object; } - if (\array_key_exists('color', $data) && null !== $data['color']) { - $object->setColor($data['color']); - } elseif (\array_key_exists('color', $data) && null === $data['color']) { - $object->setColor(null); - } - if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { - $object->setDeleted($data['deleted']); - } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { - $object->setDeleted(null); - } - if (\array_key_exists('enterprise_user', $data) && null !== $data['enterprise_user']) { - $object->setEnterpriseUser($this->denormalizer->denormalize($data['enterprise_user'], 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser', 'json', $context)); - } elseif (\array_key_exists('enterprise_user', $data) && null === $data['enterprise_user']) { - $object->setEnterpriseUser(null); - } - if (\array_key_exists('has_2fa', $data) && null !== $data['has_2fa']) { - $object->setHas2fa($data['has_2fa']); - } elseif (\array_key_exists('has_2fa', $data) && null === $data['has_2fa']) { - $object->setHas2fa(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { - $object->setIsAdmin($data['is_admin']); - } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { - $object->setIsAdmin(null); - } - if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { - $object->setIsAppUser($data['is_app_user']); - } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { - $object->setIsAppUser(null); - } - if (\array_key_exists('is_bot', $data) && null !== $data['is_bot']) { - $object->setIsBot($data['is_bot']); - } elseif (\array_key_exists('is_bot', $data) && null === $data['is_bot']) { - $object->setIsBot(null); - } - if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { - $object->setIsExternal($data['is_external']); - } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { - $object->setIsExternal(null); - } - if (\array_key_exists('is_forgotten', $data) && null !== $data['is_forgotten']) { - $object->setIsForgotten($data['is_forgotten']); - } elseif (\array_key_exists('is_forgotten', $data) && null === $data['is_forgotten']) { - $object->setIsForgotten(null); - } - if (\array_key_exists('is_invited_user', $data) && null !== $data['is_invited_user']) { - $object->setIsInvitedUser($data['is_invited_user']); - } elseif (\array_key_exists('is_invited_user', $data) && null === $data['is_invited_user']) { - $object->setIsInvitedUser(null); - } - if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { - $object->setIsOwner($data['is_owner']); - } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { - $object->setIsOwner(null); - } - if (\array_key_exists('is_primary_owner', $data) && null !== $data['is_primary_owner']) { - $object->setIsPrimaryOwner($data['is_primary_owner']); - } elseif (\array_key_exists('is_primary_owner', $data) && null === $data['is_primary_owner']) { - $object->setIsPrimaryOwner(null); - } - if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { - $object->setIsRestricted($data['is_restricted']); - } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { - $object->setIsRestricted(null); - } - if (\array_key_exists('is_stranger', $data) && null !== $data['is_stranger']) { - $object->setIsStranger($data['is_stranger']); - } elseif (\array_key_exists('is_stranger', $data) && null === $data['is_stranger']) { - $object->setIsStranger(null); - } - if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { - $object->setIsUltraRestricted($data['is_ultra_restricted']); - } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { - $object->setIsUltraRestricted(null); - } - if (\array_key_exists('locale', $data) && null !== $data['locale']) { - $object->setLocale($data['locale']); - } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { - $object->setLocale(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('presence', $data) && null !== $data['presence']) { - $object->setPresence($data['presence']); - } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { - $object->setPresence(null); - } - if (\array_key_exists('profile', $data) && null !== $data['profile']) { - $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); - } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { - $object->setProfile(null); - } - if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { - $object->setRealName($data['real_name']); - } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { - $object->setRealName(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { - $object->setTeamId($data['team_id']); - } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { - $object->setTeamId(null); - } - if (\array_key_exists('team_profile', $data) && null !== $data['team_profile']) { - $object->setTeamProfile($this->denormalizer->denormalize($data['team_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile', 'json', $context)); - } elseif (\array_key_exists('team_profile', $data) && null === $data['team_profile']) { - $object->setTeamProfile(null); - } - if (\array_key_exists('teams', $data) && null !== $data['teams']) { - $values = []; - foreach ($data['teams'] as $value) { - $values[] = $value; - } - $object->setTeams($values); - } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { - $object->setTeams(null); - } - if (\array_key_exists('two_factor_type', $data) && null !== $data['two_factor_type']) { - $object->setTwoFactorType($data['two_factor_type']); - } elseif (\array_key_exists('two_factor_type', $data) && null === $data['two_factor_type']) { - $object->setTwoFactorType(null); - } - if (\array_key_exists('tz', $data) && null !== $data['tz']) { - $object->setTz($data['tz']); - } elseif (\array_key_exists('tz', $data) && null === $data['tz']) { - $object->setTz(null); - } - if (\array_key_exists('tz_label', $data) && null !== $data['tz_label']) { - $object->setTzLabel($data['tz_label']); - } elseif (\array_key_exists('tz_label', $data) && null === $data['tz_label']) { - $object->setTzLabel(null); - } - if (\array_key_exists('tz_offset', $data) && null !== $data['tz_offset']) { - $object->setTzOffset($data['tz_offset']); - } elseif (\array_key_exists('tz_offset', $data) && null === $data['tz_offset']) { - $object->setTzOffset(null); - } - if (\array_key_exists('updated', $data) && null !== $data['updated']) { - $object->setUpdated($data['updated']); - } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { - $object->setUpdated(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('color') && null !== $object->getColor()) { + $data['color'] = $object->getColor(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['deleted'] = $object->getDeleted(); + } + if ($object->isInitialized('enterpriseUser') && null !== $object->getEnterpriseUser()) { + $data['enterprise_user'] = $this->normalizer->normalize($object->getEnterpriseUser(), 'json', $context); + } + if ($object->isInitialized('has2fa') && null !== $object->getHas2fa()) { + $data['has_2fa'] = $object->getHas2fa(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('isAdmin') && null !== $object->getIsAdmin()) { + $data['is_admin'] = $object->getIsAdmin(); + } + $data['is_app_user'] = $object->getIsAppUser(); + $data['is_bot'] = $object->getIsBot(); + if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { + $data['is_external'] = $object->getIsExternal(); + } + if ($object->isInitialized('isForgotten') && null !== $object->getIsForgotten()) { + $data['is_forgotten'] = $object->getIsForgotten(); + } + if ($object->isInitialized('isInvitedUser') && null !== $object->getIsInvitedUser()) { + $data['is_invited_user'] = $object->getIsInvitedUser(); + } + if ($object->isInitialized('isOwner') && null !== $object->getIsOwner()) { + $data['is_owner'] = $object->getIsOwner(); + } + if ($object->isInitialized('isPrimaryOwner') && null !== $object->getIsPrimaryOwner()) { + $data['is_primary_owner'] = $object->getIsPrimaryOwner(); + } + if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { + $data['is_restricted'] = $object->getIsRestricted(); + } + if ($object->isInitialized('isStranger') && null !== $object->getIsStranger()) { + $data['is_stranger'] = $object->getIsStranger(); + } + if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { + $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + $data['name'] = $object->getName(); + if ($object->isInitialized('presence') && null !== $object->getPresence()) { + $data['presence'] = $object->getPresence(); + } + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + if ($object->isInitialized('realName') && null !== $object->getRealName()) { + $data['real_name'] = $object->getRealName(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + if ($object->isInitialized('teamId') && null !== $object->getTeamId()) { + $data['team_id'] = $object->getTeamId(); + } + if ($object->isInitialized('teamProfile') && null !== $object->getTeamProfile()) { + $data['team_profile'] = $this->normalizer->normalize($object->getTeamProfile(), 'json', $context); + } + if ($object->isInitialized('teams') && null !== $object->getTeams()) { + $values = []; + foreach ($object->getTeams() as $value) { + $values[] = $value; + } + $data['teams'] = $values; + } + if ($object->isInitialized('twoFactorType') && null !== $object->getTwoFactorType()) { + $data['two_factor_type'] = $object->getTwoFactorType(); + } + if ($object->isInitialized('tz') && null !== $object->getTz()) { + $data['tz'] = $object->getTz(); + } + if ($object->isInitialized('tzLabel') && null !== $object->getTzLabel()) { + $data['tz_label'] = $object->getTzLabel(); + } + if ($object->isInitialized('tzOffset') && null !== $object->getTzOffset()) { + $data['tz_offset'] = $object->getTzOffset(); + } + $data['updated'] = $object->getUpdated(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { - $data['deleted'] = $object->getDeleted(); - } - if ($object->isInitialized('enterpriseUser') && null !== $object->getEnterpriseUser()) { - $data['enterprise_user'] = $this->normalizer->normalize($object->getEnterpriseUser(), 'json', $context); - } - if ($object->isInitialized('has2fa') && null !== $object->getHas2fa()) { - $data['has_2fa'] = $object->getHas2fa(); - } - $data['id'] = $object->getId(); - if ($object->isInitialized('isAdmin') && null !== $object->getIsAdmin()) { - $data['is_admin'] = $object->getIsAdmin(); - } - $data['is_app_user'] = $object->getIsAppUser(); - $data['is_bot'] = $object->getIsBot(); - if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { - $data['is_external'] = $object->getIsExternal(); - } - if ($object->isInitialized('isForgotten') && null !== $object->getIsForgotten()) { - $data['is_forgotten'] = $object->getIsForgotten(); + return $data; } - if ($object->isInitialized('isInvitedUser') && null !== $object->getIsInvitedUser()) { - $data['is_invited_user'] = $object->getIsInvitedUser(); - } - if ($object->isInitialized('isOwner') && null !== $object->getIsOwner()) { - $data['is_owner'] = $object->getIsOwner(); - } - if ($object->isInitialized('isPrimaryOwner') && null !== $object->getIsPrimaryOwner()) { - $data['is_primary_owner'] = $object->getIsPrimaryOwner(); - } - if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { - $data['is_restricted'] = $object->getIsRestricted(); - } - if ($object->isInitialized('isStranger') && null !== $object->getIsStranger()) { - $data['is_stranger'] = $object->getIsStranger(); - } - if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { - $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); - } - if ($object->isInitialized('locale') && null !== $object->getLocale()) { - $data['locale'] = $object->getLocale(); - } - $data['name'] = $object->getName(); - if ($object->isInitialized('presence') && null !== $object->getPresence()) { - $data['presence'] = $object->getPresence(); - } - $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); - if ($object->isInitialized('realName') && null !== $object->getRealName()) { - $data['real_name'] = $object->getRealName(); - } - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $data['team'] = $object->getTeam(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUser' => false]; } - if ($object->isInitialized('teamId') && null !== $object->getTeamId()) { - $data['team_id'] = $object->getTeamId(); + } +} else { + class ObjsUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === $type; } - if ($object->isInitialized('teamProfile') && null !== $object->getTeamProfile()) { - $data['team_profile'] = $this->normalizer->normalize($object->getTeamProfile(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUser' === \get_class($data); } - if ($object->isInitialized('teams') && null !== $object->getTeams()) { - $values = []; - foreach ($object->getTeams() as $value) { - $values[] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data['teams'] = $values; - } - if ($object->isInitialized('twoFactorType') && null !== $object->getTwoFactorType()) { - $data['two_factor_type'] = $object->getTwoFactorType(); - } - if ($object->isInitialized('tz') && null !== $object->getTz()) { - $data['tz'] = $object->getTz(); - } - if ($object->isInitialized('tzLabel') && null !== $object->getTzLabel()) { - $data['tz_label'] = $object->getTzLabel(); - } - if ($object->isInitialized('tzOffset') && null !== $object->getTzOffset()) { - $data['tz_offset'] = $object->getTzOffset(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUser(); + if (\array_key_exists('tz_offset', $data) && \is_int($data['tz_offset'])) { + $data['tz_offset'] = (float) $data['tz_offset']; + } + if (\array_key_exists('updated', $data) && \is_int($data['updated'])) { + $data['updated'] = (float) $data['updated']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('color', $data) && null !== $data['color']) { + $object->setColor($data['color']); + } elseif (\array_key_exists('color', $data) && null === $data['color']) { + $object->setColor(null); + } + if (\array_key_exists('deleted', $data) && null !== $data['deleted']) { + $object->setDeleted($data['deleted']); + } elseif (\array_key_exists('deleted', $data) && null === $data['deleted']) { + $object->setDeleted(null); + } + if (\array_key_exists('enterprise_user', $data) && null !== $data['enterprise_user']) { + $object->setEnterpriseUser($this->denormalizer->denormalize($data['enterprise_user'], 'JoliCode\\Slack\\Api\\Model\\ObjsEnterpriseUser', 'json', $context)); + } elseif (\array_key_exists('enterprise_user', $data) && null === $data['enterprise_user']) { + $object->setEnterpriseUser(null); + } + if (\array_key_exists('has_2fa', $data) && null !== $data['has_2fa']) { + $object->setHas2fa($data['has_2fa']); + } elseif (\array_key_exists('has_2fa', $data) && null === $data['has_2fa']) { + $object->setHas2fa(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('is_admin', $data) && null !== $data['is_admin']) { + $object->setIsAdmin($data['is_admin']); + } elseif (\array_key_exists('is_admin', $data) && null === $data['is_admin']) { + $object->setIsAdmin(null); + } + if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { + $object->setIsAppUser($data['is_app_user']); + } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { + $object->setIsAppUser(null); + } + if (\array_key_exists('is_bot', $data) && null !== $data['is_bot']) { + $object->setIsBot($data['is_bot']); + } elseif (\array_key_exists('is_bot', $data) && null === $data['is_bot']) { + $object->setIsBot(null); + } + if (\array_key_exists('is_external', $data) && null !== $data['is_external']) { + $object->setIsExternal($data['is_external']); + } elseif (\array_key_exists('is_external', $data) && null === $data['is_external']) { + $object->setIsExternal(null); + } + if (\array_key_exists('is_forgotten', $data) && null !== $data['is_forgotten']) { + $object->setIsForgotten($data['is_forgotten']); + } elseif (\array_key_exists('is_forgotten', $data) && null === $data['is_forgotten']) { + $object->setIsForgotten(null); + } + if (\array_key_exists('is_invited_user', $data) && null !== $data['is_invited_user']) { + $object->setIsInvitedUser($data['is_invited_user']); + } elseif (\array_key_exists('is_invited_user', $data) && null === $data['is_invited_user']) { + $object->setIsInvitedUser(null); + } + if (\array_key_exists('is_owner', $data) && null !== $data['is_owner']) { + $object->setIsOwner($data['is_owner']); + } elseif (\array_key_exists('is_owner', $data) && null === $data['is_owner']) { + $object->setIsOwner(null); + } + if (\array_key_exists('is_primary_owner', $data) && null !== $data['is_primary_owner']) { + $object->setIsPrimaryOwner($data['is_primary_owner']); + } elseif (\array_key_exists('is_primary_owner', $data) && null === $data['is_primary_owner']) { + $object->setIsPrimaryOwner(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { + $object->setIsRestricted($data['is_restricted']); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); + } + if (\array_key_exists('is_stranger', $data) && null !== $data['is_stranger']) { + $object->setIsStranger($data['is_stranger']); + } elseif (\array_key_exists('is_stranger', $data) && null === $data['is_stranger']) { + $object->setIsStranger(null); + } + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { + $object->setIsUltraRestricted($data['is_ultra_restricted']); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); + } + if (\array_key_exists('locale', $data) && null !== $data['locale']) { + $object->setLocale($data['locale']); + } elseif (\array_key_exists('locale', $data) && null === $data['locale']) { + $object->setLocale(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('presence', $data) && null !== $data['presence']) { + $object->setPresence($data['presence']); + } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { + $object->setPresence(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('team_id', $data) && null !== $data['team_id']) { + $object->setTeamId($data['team_id']); + } elseif (\array_key_exists('team_id', $data) && null === $data['team_id']) { + $object->setTeamId(null); + } + if (\array_key_exists('team_profile', $data) && null !== $data['team_profile']) { + $object->setTeamProfile($this->denormalizer->denormalize($data['team_profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile', 'json', $context)); + } elseif (\array_key_exists('team_profile', $data) && null === $data['team_profile']) { + $object->setTeamProfile(null); + } + if (\array_key_exists('teams', $data) && null !== $data['teams']) { + $values = []; + foreach ($data['teams'] as $value) { + $values[] = $value; + } + $object->setTeams($values); + } elseif (\array_key_exists('teams', $data) && null === $data['teams']) { + $object->setTeams(null); + } + if (\array_key_exists('two_factor_type', $data) && null !== $data['two_factor_type']) { + $object->setTwoFactorType($data['two_factor_type']); + } elseif (\array_key_exists('two_factor_type', $data) && null === $data['two_factor_type']) { + $object->setTwoFactorType(null); + } + if (\array_key_exists('tz', $data) && null !== $data['tz']) { + $object->setTz($data['tz']); + } elseif (\array_key_exists('tz', $data) && null === $data['tz']) { + $object->setTz(null); + } + if (\array_key_exists('tz_label', $data) && null !== $data['tz_label']) { + $object->setTzLabel($data['tz_label']); + } elseif (\array_key_exists('tz_label', $data) && null === $data['tz_label']) { + $object->setTzLabel(null); + } + if (\array_key_exists('tz_offset', $data) && null !== $data['tz_offset']) { + $object->setTzOffset($data['tz_offset']); + } elseif (\array_key_exists('tz_offset', $data) && null === $data['tz_offset']) { + $object->setTzOffset(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + + return $object; } - $data['updated'] = $object->getUpdated(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('color') && null !== $object->getColor()) { + $data['color'] = $object->getColor(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['deleted'] = $object->getDeleted(); + } + if ($object->isInitialized('enterpriseUser') && null !== $object->getEnterpriseUser()) { + $data['enterprise_user'] = $this->normalizer->normalize($object->getEnterpriseUser(), 'json', $context); + } + if ($object->isInitialized('has2fa') && null !== $object->getHas2fa()) { + $data['has_2fa'] = $object->getHas2fa(); + } + $data['id'] = $object->getId(); + if ($object->isInitialized('isAdmin') && null !== $object->getIsAdmin()) { + $data['is_admin'] = $object->getIsAdmin(); + } + $data['is_app_user'] = $object->getIsAppUser(); + $data['is_bot'] = $object->getIsBot(); + if ($object->isInitialized('isExternal') && null !== $object->getIsExternal()) { + $data['is_external'] = $object->getIsExternal(); + } + if ($object->isInitialized('isForgotten') && null !== $object->getIsForgotten()) { + $data['is_forgotten'] = $object->getIsForgotten(); + } + if ($object->isInitialized('isInvitedUser') && null !== $object->getIsInvitedUser()) { + $data['is_invited_user'] = $object->getIsInvitedUser(); + } + if ($object->isInitialized('isOwner') && null !== $object->getIsOwner()) { + $data['is_owner'] = $object->getIsOwner(); + } + if ($object->isInitialized('isPrimaryOwner') && null !== $object->getIsPrimaryOwner()) { + $data['is_primary_owner'] = $object->getIsPrimaryOwner(); + } + if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { + $data['is_restricted'] = $object->getIsRestricted(); + } + if ($object->isInitialized('isStranger') && null !== $object->getIsStranger()) { + $data['is_stranger'] = $object->getIsStranger(); + } + if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { + $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); + } + if ($object->isInitialized('locale') && null !== $object->getLocale()) { + $data['locale'] = $object->getLocale(); + } + $data['name'] = $object->getName(); + if ($object->isInitialized('presence') && null !== $object->getPresence()) { + $data['presence'] = $object->getPresence(); + } + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + if ($object->isInitialized('realName') && null !== $object->getRealName()) { + $data['real_name'] = $object->getRealName(); + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + if ($object->isInitialized('teamId') && null !== $object->getTeamId()) { + $data['team_id'] = $object->getTeamId(); + } + if ($object->isInitialized('teamProfile') && null !== $object->getTeamProfile()) { + $data['team_profile'] = $this->normalizer->normalize($object->getTeamProfile(), 'json', $context); + } + if ($object->isInitialized('teams') && null !== $object->getTeams()) { + $values = []; + foreach ($object->getTeams() as $value) { + $values[] = $value; + } + $data['teams'] = $values; + } + if ($object->isInitialized('twoFactorType') && null !== $object->getTwoFactorType()) { + $data['two_factor_type'] = $object->getTwoFactorType(); + } + if ($object->isInitialized('tz') && null !== $object->getTz()) { + $data['tz'] = $object->getTz(); + } + if ($object->isInitialized('tzLabel') && null !== $object->getTzLabel()) { + $data['tz_label'] = $object->getTzLabel(); + } + if ($object->isInitialized('tzOffset') && null !== $object->getTzOffset()) { + $data['tz_offset'] = $object->getTzOffset(); + } + $data['updated'] = $object->getUpdated(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsUser' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUser' => false]; + } } } diff --git a/generated/Normalizer/ObjsUserProfileNormalizer.php b/generated/Normalizer/ObjsUserProfileNormalizer.php index f4dd0000..c7ee5d59 100644 --- a/generated/Normalizer/ObjsUserProfileNormalizer.php +++ b/generated/Normalizer/ObjsUserProfileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,553 +24,1103 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsUserProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsUserProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsUserProfile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('always_active', $data) && null !== $data['always_active']) { + $object->setAlwaysActive($data['always_active']); + } elseif (\array_key_exists('always_active', $data) && null === $data['always_active']) { + $object->setAlwaysActive(null); + } + if (\array_key_exists('api_app_id', $data) && null !== $data['api_app_id']) { + $object->setApiAppId($data['api_app_id']); + } elseif (\array_key_exists('api_app_id', $data) && null === $data['api_app_id']) { + $object->setApiAppId(null); + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { + $object->setDisplayName($data['display_name']); + } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { + $object->setDisplayName(null); + } + if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { + $object->setDisplayNameNormalized($data['display_name_normalized']); + } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { + $object->setDisplayNameNormalized(null); + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $value = $data['email']; + if (\is_string($data['email'])) { + $value = $data['email']; + } + $object->setEmail($value); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $value_1 = $data['fields']; + if (\is_array($data['fields']) && $this->isOnlyNumericKeys($data['fields'])) { + $values = []; + foreach ($data['fields'] as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } elseif (isset($data['fields'])) { + $value_1 = $data['fields']; + } + $object->setFields($value_1); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { + $value_3 = $data['first_name']; + if (\is_string($data['first_name'])) { + $value_3 = $data['first_name']; + } + $object->setFirstName($value_3); + } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { + $object->setFirstName(null); + } + if (\array_key_exists('guest_expiration_ts', $data) && null !== $data['guest_expiration_ts']) { + $value_4 = $data['guest_expiration_ts']; + if (\is_int($data['guest_expiration_ts'])) { + $value_4 = $data['guest_expiration_ts']; + } + $object->setGuestExpirationTs($value_4); + } elseif (\array_key_exists('guest_expiration_ts', $data) && null === $data['guest_expiration_ts']) { + $object->setGuestExpirationTs(null); + } + if (\array_key_exists('guest_invited_by', $data) && null !== $data['guest_invited_by']) { + $value_5 = $data['guest_invited_by']; + if (\is_string($data['guest_invited_by'])) { + $value_5 = $data['guest_invited_by']; + } + $object->setGuestInvitedBy($value_5); + } elseif (\array_key_exists('guest_invited_by', $data) && null === $data['guest_invited_by']) { + $object->setGuestInvitedBy(null); + } + if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { + $value_6 = $data['image_1024']; + if (\is_string($data['image_1024'])) { + $value_6 = $data['image_1024']; + } + $object->setImage1024($value_6); + } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { + $object->setImage1024(null); + } + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { + $value_7 = $data['image_192']; + if (\is_string($data['image_192'])) { + $value_7 = $data['image_192']; + } + $object->setImage192($value_7); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); + } + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { + $value_8 = $data['image_24']; + if (\is_string($data['image_24'])) { + $value_8 = $data['image_24']; + } + $object->setImage24($value_8); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); + } + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { + $value_9 = $data['image_32']; + if (\is_string($data['image_32'])) { + $value_9 = $data['image_32']; + } + $object->setImage32($value_9); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $value_10 = $data['image_48']; + if (\is_string($data['image_48'])) { + $value_10 = $data['image_48']; + } + $object->setImage48($value_10); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { + $value_11 = $data['image_512']; + if (\is_string($data['image_512'])) { + $value_11 = $data['image_512']; + } + $object->setImage512($value_11); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $value_12 = $data['image_72']; + if (\is_string($data['image_72'])) { + $value_12 = $data['image_72']; + } + $object->setImage72($value_12); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { + $value_13 = $data['image_original']; + if (\is_string($data['image_original'])) { + $value_13 = $data['image_original']; + } + $object->setImageOriginal($value_13); + } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { + $object->setImageOriginal(null); + } + if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { + $object->setIsAppUser($data['is_app_user']); + } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { + $object->setIsAppUser(null); + } + if (\array_key_exists('is_custom_image', $data) && null !== $data['is_custom_image']) { + $object->setIsCustomImage($data['is_custom_image']); + } elseif (\array_key_exists('is_custom_image', $data) && null === $data['is_custom_image']) { + $object->setIsCustomImage(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { + $value_14 = $data['is_restricted']; + if (\is_bool($data['is_restricted'])) { + $value_14 = $data['is_restricted']; + } + $object->setIsRestricted($value_14); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); + } + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { + $value_15 = $data['is_ultra_restricted']; + if (\is_bool($data['is_ultra_restricted'])) { + $value_15 = $data['is_ultra_restricted']; + } + $object->setIsUltraRestricted($value_15); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); + } + if (\array_key_exists('last_avatar_image_hash', $data) && null !== $data['last_avatar_image_hash']) { + $object->setLastAvatarImageHash($data['last_avatar_image_hash']); + } elseif (\array_key_exists('last_avatar_image_hash', $data) && null === $data['last_avatar_image_hash']) { + $object->setLastAvatarImageHash(null); + } + if (\array_key_exists('last_name', $data) && null !== $data['last_name']) { + $value_16 = $data['last_name']; + if (\is_string($data['last_name'])) { + $value_16 = $data['last_name']; + } + $object->setLastName($value_16); + } elseif (\array_key_exists('last_name', $data) && null === $data['last_name']) { + $object->setLastName(null); + } + if (\array_key_exists('memberships_count', $data) && null !== $data['memberships_count']) { + $object->setMembershipsCount($data['memberships_count']); + } elseif (\array_key_exists('memberships_count', $data) && null === $data['memberships_count']) { + $object->setMembershipsCount(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $value_17 = $data['name']; + if (\is_string($data['name'])) { + $value_17 = $data['name']; + } + $object->setName($value_17); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('phone', $data) && null !== $data['phone']) { + $object->setPhone($data['phone']); + } elseif (\array_key_exists('phone', $data) && null === $data['phone']) { + $object->setPhone(null); + } + if (\array_key_exists('pronouns', $data) && null !== $data['pronouns']) { + $object->setPronouns($data['pronouns']); + } elseif (\array_key_exists('pronouns', $data) && null === $data['pronouns']) { + $object->setPronouns(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { + $object->setRealNameNormalized($data['real_name_normalized']); + } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { + $object->setRealNameNormalized(null); + } + if (\array_key_exists('skype', $data) && null !== $data['skype']) { + $object->setSkype($data['skype']); + } elseif (\array_key_exists('skype', $data) && null === $data['skype']) { + $object->setSkype(null); + } + if (\array_key_exists('status_default_emoji', $data) && null !== $data['status_default_emoji']) { + $object->setStatusDefaultEmoji($data['status_default_emoji']); + } elseif (\array_key_exists('status_default_emoji', $data) && null === $data['status_default_emoji']) { + $object->setStatusDefaultEmoji(null); + } + if (\array_key_exists('status_default_text', $data) && null !== $data['status_default_text']) { + $object->setStatusDefaultText($data['status_default_text']); + } elseif (\array_key_exists('status_default_text', $data) && null === $data['status_default_text']) { + $object->setStatusDefaultText(null); + } + if (\array_key_exists('status_default_text_canonical', $data) && null !== $data['status_default_text_canonical']) { + $value_18 = $data['status_default_text_canonical']; + if (\is_string($data['status_default_text_canonical'])) { + $value_18 = $data['status_default_text_canonical']; + } + $object->setStatusDefaultTextCanonical($value_18); + } elseif (\array_key_exists('status_default_text_canonical', $data) && null === $data['status_default_text_canonical']) { + $object->setStatusDefaultTextCanonical(null); + } + if (\array_key_exists('status_emoji', $data) && null !== $data['status_emoji']) { + $object->setStatusEmoji($data['status_emoji']); + } elseif (\array_key_exists('status_emoji', $data) && null === $data['status_emoji']) { + $object->setStatusEmoji(null); + } + if (\array_key_exists('status_expiration', $data) && null !== $data['status_expiration']) { + $object->setStatusExpiration($data['status_expiration']); + } elseif (\array_key_exists('status_expiration', $data) && null === $data['status_expiration']) { + $object->setStatusExpiration(null); + } + if (\array_key_exists('status_text', $data) && null !== $data['status_text']) { + $object->setStatusText($data['status_text']); + } elseif (\array_key_exists('status_text', $data) && null === $data['status_text']) { + $object->setStatusText(null); + } + if (\array_key_exists('status_text_canonical', $data) && null !== $data['status_text_canonical']) { + $value_19 = $data['status_text_canonical']; + if (\is_string($data['status_text_canonical'])) { + $value_19 = $data['status_text_canonical']; + } + $object->setStatusTextCanonical($value_19); + } elseif (\array_key_exists('status_text_canonical', $data) && null === $data['status_text_canonical']) { + $object->setStatusTextCanonical(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $value_20 = $data['username']; + if (\is_string($data['username'])) { + $value_20 = $data['username']; + } + $object->setUsername($value_20); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + return $object; } - if (\array_key_exists('always_active', $data) && null !== $data['always_active']) { - $object->setAlwaysActive($data['always_active']); - } elseif (\array_key_exists('always_active', $data) && null === $data['always_active']) { - $object->setAlwaysActive(null); - } - if (\array_key_exists('api_app_id', $data) && null !== $data['api_app_id']) { - $object->setApiAppId($data['api_app_id']); - } elseif (\array_key_exists('api_app_id', $data) && null === $data['api_app_id']) { - $object->setApiAppId(null); - } - if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { - $object->setAvatarHash($data['avatar_hash']); - } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { - $object->setAvatarHash(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('alwaysActive') && null !== $object->getAlwaysActive()) { + $data['always_active'] = $object->getAlwaysActive(); + } + if ($object->isInitialized('apiAppId') && null !== $object->getApiAppId()) { + $data['api_app_id'] = $object->getApiAppId(); + } + $data['avatar_hash'] = $object->getAvatarHash(); + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); + } + $data['display_name'] = $object->getDisplayName(); + $data['display_name_normalized'] = $object->getDisplayNameNormalized(); + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $value = $object->getEmail(); + if (\is_string($object->getEmail())) { + $value = $object->getEmail(); + } + $data['email'] = $value; + } + $value_1 = $object->getFields(); + if (\is_array($object->getFields())) { + $values = []; + foreach ($object->getFields() as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } elseif (null !== $object->getFields()) { + $value_1 = $object->getFields(); + } + $data['fields'] = $value_1; + if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { + $value_3 = $object->getFirstName(); + if (\is_string($object->getFirstName())) { + $value_3 = $object->getFirstName(); + } + $data['first_name'] = $value_3; + } + if ($object->isInitialized('guestExpirationTs') && null !== $object->getGuestExpirationTs()) { + $value_4 = $object->getGuestExpirationTs(); + if (\is_int($object->getGuestExpirationTs())) { + $value_4 = $object->getGuestExpirationTs(); + } + $data['guest_expiration_ts'] = $value_4; + } + if ($object->isInitialized('guestInvitedBy') && null !== $object->getGuestInvitedBy()) { + $value_5 = $object->getGuestInvitedBy(); + if (\is_string($object->getGuestInvitedBy())) { + $value_5 = $object->getGuestInvitedBy(); + } + $data['guest_invited_by'] = $value_5; + } + if ($object->isInitialized('image1024') && null !== $object->getImage1024()) { + $value_6 = $object->getImage1024(); + if (\is_string($object->getImage1024())) { + $value_6 = $object->getImage1024(); + } + $data['image_1024'] = $value_6; + } + if ($object->isInitialized('image192') && null !== $object->getImage192()) { + $value_7 = $object->getImage192(); + if (\is_string($object->getImage192())) { + $value_7 = $object->getImage192(); + } + $data['image_192'] = $value_7; + } + if ($object->isInitialized('image24') && null !== $object->getImage24()) { + $value_8 = $object->getImage24(); + if (\is_string($object->getImage24())) { + $value_8 = $object->getImage24(); + } + $data['image_24'] = $value_8; + } + if ($object->isInitialized('image32') && null !== $object->getImage32()) { + $value_9 = $object->getImage32(); + if (\is_string($object->getImage32())) { + $value_9 = $object->getImage32(); + } + $data['image_32'] = $value_9; + } + if ($object->isInitialized('image48') && null !== $object->getImage48()) { + $value_10 = $object->getImage48(); + if (\is_string($object->getImage48())) { + $value_10 = $object->getImage48(); + } + $data['image_48'] = $value_10; + } + if ($object->isInitialized('image512') && null !== $object->getImage512()) { + $value_11 = $object->getImage512(); + if (\is_string($object->getImage512())) { + $value_11 = $object->getImage512(); + } + $data['image_512'] = $value_11; + } + if ($object->isInitialized('image72') && null !== $object->getImage72()) { + $value_12 = $object->getImage72(); + if (\is_string($object->getImage72())) { + $value_12 = $object->getImage72(); + } + $data['image_72'] = $value_12; + } + if ($object->isInitialized('imageOriginal') && null !== $object->getImageOriginal()) { + $value_13 = $object->getImageOriginal(); + if (\is_string($object->getImageOriginal())) { + $value_13 = $object->getImageOriginal(); + } + $data['image_original'] = $value_13; + } + if ($object->isInitialized('isAppUser') && null !== $object->getIsAppUser()) { + $data['is_app_user'] = $object->getIsAppUser(); + } + if ($object->isInitialized('isCustomImage') && null !== $object->getIsCustomImage()) { + $data['is_custom_image'] = $object->getIsCustomImage(); + } + if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { + $value_14 = $object->getIsRestricted(); + if (\is_bool($object->getIsRestricted())) { + $value_14 = $object->getIsRestricted(); + } + $data['is_restricted'] = $value_14; + } + if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { + $value_15 = $object->getIsUltraRestricted(); + if (\is_bool($object->getIsUltraRestricted())) { + $value_15 = $object->getIsUltraRestricted(); + } + $data['is_ultra_restricted'] = $value_15; + } + if ($object->isInitialized('lastAvatarImageHash') && null !== $object->getLastAvatarImageHash()) { + $data['last_avatar_image_hash'] = $object->getLastAvatarImageHash(); + } + if ($object->isInitialized('lastName') && null !== $object->getLastName()) { + $value_16 = $object->getLastName(); + if (\is_string($object->getLastName())) { + $value_16 = $object->getLastName(); + } + $data['last_name'] = $value_16; + } + if ($object->isInitialized('membershipsCount') && null !== $object->getMembershipsCount()) { + $data['memberships_count'] = $object->getMembershipsCount(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $value_17 = $object->getName(); + if (\is_string($object->getName())) { + $value_17 = $object->getName(); + } + $data['name'] = $value_17; + } + $data['phone'] = $object->getPhone(); + if ($object->isInitialized('pronouns') && null !== $object->getPronouns()) { + $data['pronouns'] = $object->getPronouns(); + } + $data['real_name'] = $object->getRealName(); + $data['real_name_normalized'] = $object->getRealNameNormalized(); + $data['skype'] = $object->getSkype(); + if ($object->isInitialized('statusDefaultEmoji') && null !== $object->getStatusDefaultEmoji()) { + $data['status_default_emoji'] = $object->getStatusDefaultEmoji(); + } + if ($object->isInitialized('statusDefaultText') && null !== $object->getStatusDefaultText()) { + $data['status_default_text'] = $object->getStatusDefaultText(); + } + if ($object->isInitialized('statusDefaultTextCanonical') && null !== $object->getStatusDefaultTextCanonical()) { + $value_18 = $object->getStatusDefaultTextCanonical(); + if (\is_string($object->getStatusDefaultTextCanonical())) { + $value_18 = $object->getStatusDefaultTextCanonical(); + } + $data['status_default_text_canonical'] = $value_18; + } + $data['status_emoji'] = $object->getStatusEmoji(); + if ($object->isInitialized('statusExpiration') && null !== $object->getStatusExpiration()) { + $data['status_expiration'] = $object->getStatusExpiration(); + } + $data['status_text'] = $object->getStatusText(); + if ($object->isInitialized('statusTextCanonical') && null !== $object->getStatusTextCanonical()) { + $value_19 = $object->getStatusTextCanonical(); + if (\is_string($object->getStatusTextCanonical())) { + $value_19 = $object->getStatusTextCanonical(); + } + $data['status_text_canonical'] = $value_19; + } + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['title'] = $object->getTitle(); + if ($object->isInitialized('updated') && null !== $object->getUpdated()) { + $data['updated'] = $object->getUpdated(); + } + if ($object->isInitialized('userId') && null !== $object->getUserId()) { + $data['user_id'] = $object->getUserId(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $value_20 = $object->getUsername(); + if (\is_string($object->getUsername())) { + $value_20 = $object->getUsername(); + } + $data['username'] = $value_20; + } + + return $data; } - if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { - $object->setBotId($data['bot_id']); - } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { - $object->setBotId(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false]; } - if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { - $object->setDisplayName($data['display_name']); - } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { - $object->setDisplayName(null); + } +} else { + class ObjsUserProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === $type; } - if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { - $object->setDisplayNameNormalized($data['display_name_normalized']); - } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { - $object->setDisplayNameNormalized(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' === \get_class($data); } - if (\array_key_exists('email', $data) && null !== $data['email']) { - $value = $data['email']; - if (\is_string($data['email'])) { - $value = $data['email']; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $object->setEmail($value); - } elseif (\array_key_exists('email', $data) && null === $data['email']) { - $object->setEmail(null); - } - if (\array_key_exists('fields', $data) && null !== $data['fields']) { - $value_1 = $data['fields']; - if (\is_array($data['fields']) && $this->isOnlyNumericKeys($data['fields'])) { - $values = []; - foreach ($data['fields'] as $value_2) { - $values[] = $value_2; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('always_active', $data) && null !== $data['always_active']) { + $object->setAlwaysActive($data['always_active']); + } elseif (\array_key_exists('always_active', $data) && null === $data['always_active']) { + $object->setAlwaysActive(null); + } + if (\array_key_exists('api_app_id', $data) && null !== $data['api_app_id']) { + $object->setApiAppId($data['api_app_id']); + } elseif (\array_key_exists('api_app_id', $data) && null === $data['api_app_id']) { + $object->setApiAppId(null); + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('bot_id', $data) && null !== $data['bot_id']) { + $object->setBotId($data['bot_id']); + } elseif (\array_key_exists('bot_id', $data) && null === $data['bot_id']) { + $object->setBotId(null); + } + if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { + $object->setDisplayName($data['display_name']); + } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { + $object->setDisplayName(null); + } + if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { + $object->setDisplayNameNormalized($data['display_name_normalized']); + } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { + $object->setDisplayNameNormalized(null); + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $value = $data['email']; + if (\is_string($data['email'])) { + $value = $data['email']; } - $value_1 = $values; - } elseif (isset($data['fields'])) { + $object->setEmail($value); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { $value_1 = $data['fields']; + if (\is_array($data['fields']) && $this->isOnlyNumericKeys($data['fields'])) { + $values = []; + foreach ($data['fields'] as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } elseif (isset($data['fields'])) { + $value_1 = $data['fields']; + } + $object->setFields($value_1); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); } - $object->setFields($value_1); - } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { - $object->setFields(null); - } - if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { - $value_3 = $data['first_name']; - if (\is_string($data['first_name'])) { + if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { $value_3 = $data['first_name']; + if (\is_string($data['first_name'])) { + $value_3 = $data['first_name']; + } + $object->setFirstName($value_3); + } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { + $object->setFirstName(null); } - $object->setFirstName($value_3); - } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { - $object->setFirstName(null); - } - if (\array_key_exists('guest_expiration_ts', $data) && null !== $data['guest_expiration_ts']) { - $value_4 = $data['guest_expiration_ts']; - if (\is_int($data['guest_expiration_ts'])) { + if (\array_key_exists('guest_expiration_ts', $data) && null !== $data['guest_expiration_ts']) { $value_4 = $data['guest_expiration_ts']; + if (\is_int($data['guest_expiration_ts'])) { + $value_4 = $data['guest_expiration_ts']; + } + $object->setGuestExpirationTs($value_4); + } elseif (\array_key_exists('guest_expiration_ts', $data) && null === $data['guest_expiration_ts']) { + $object->setGuestExpirationTs(null); } - $object->setGuestExpirationTs($value_4); - } elseif (\array_key_exists('guest_expiration_ts', $data) && null === $data['guest_expiration_ts']) { - $object->setGuestExpirationTs(null); - } - if (\array_key_exists('guest_invited_by', $data) && null !== $data['guest_invited_by']) { - $value_5 = $data['guest_invited_by']; - if (\is_string($data['guest_invited_by'])) { + if (\array_key_exists('guest_invited_by', $data) && null !== $data['guest_invited_by']) { $value_5 = $data['guest_invited_by']; + if (\is_string($data['guest_invited_by'])) { + $value_5 = $data['guest_invited_by']; + } + $object->setGuestInvitedBy($value_5); + } elseif (\array_key_exists('guest_invited_by', $data) && null === $data['guest_invited_by']) { + $object->setGuestInvitedBy(null); } - $object->setGuestInvitedBy($value_5); - } elseif (\array_key_exists('guest_invited_by', $data) && null === $data['guest_invited_by']) { - $object->setGuestInvitedBy(null); - } - if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { - $value_6 = $data['image_1024']; - if (\is_string($data['image_1024'])) { + if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { $value_6 = $data['image_1024']; + if (\is_string($data['image_1024'])) { + $value_6 = $data['image_1024']; + } + $object->setImage1024($value_6); + } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { + $object->setImage1024(null); } - $object->setImage1024($value_6); - } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { - $object->setImage1024(null); - } - if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { - $value_7 = $data['image_192']; - if (\is_string($data['image_192'])) { + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { $value_7 = $data['image_192']; + if (\is_string($data['image_192'])) { + $value_7 = $data['image_192']; + } + $object->setImage192($value_7); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); } - $object->setImage192($value_7); - } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { - $object->setImage192(null); - } - if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { - $value_8 = $data['image_24']; - if (\is_string($data['image_24'])) { + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { $value_8 = $data['image_24']; + if (\is_string($data['image_24'])) { + $value_8 = $data['image_24']; + } + $object->setImage24($value_8); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); } - $object->setImage24($value_8); - } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { - $object->setImage24(null); - } - if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { - $value_9 = $data['image_32']; - if (\is_string($data['image_32'])) { + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { $value_9 = $data['image_32']; + if (\is_string($data['image_32'])) { + $value_9 = $data['image_32']; + } + $object->setImage32($value_9); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); } - $object->setImage32($value_9); - } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { - $object->setImage32(null); - } - if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { - $value_10 = $data['image_48']; - if (\is_string($data['image_48'])) { + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { $value_10 = $data['image_48']; + if (\is_string($data['image_48'])) { + $value_10 = $data['image_48']; + } + $object->setImage48($value_10); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); } - $object->setImage48($value_10); - } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { - $object->setImage48(null); - } - if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { - $value_11 = $data['image_512']; - if (\is_string($data['image_512'])) { + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { $value_11 = $data['image_512']; + if (\is_string($data['image_512'])) { + $value_11 = $data['image_512']; + } + $object->setImage512($value_11); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); } - $object->setImage512($value_11); - } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { - $object->setImage512(null); - } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $value_12 = $data['image_72']; - if (\is_string($data['image_72'])) { + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { $value_12 = $data['image_72']; + if (\is_string($data['image_72'])) { + $value_12 = $data['image_72']; + } + $object->setImage72($value_12); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); } - $object->setImage72($value_12); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); - } - if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { - $value_13 = $data['image_original']; - if (\is_string($data['image_original'])) { + if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { $value_13 = $data['image_original']; + if (\is_string($data['image_original'])) { + $value_13 = $data['image_original']; + } + $object->setImageOriginal($value_13); + } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { + $object->setImageOriginal(null); } - $object->setImageOriginal($value_13); - } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { - $object->setImageOriginal(null); - } - if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { - $object->setIsAppUser($data['is_app_user']); - } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { - $object->setIsAppUser(null); - } - if (\array_key_exists('is_custom_image', $data) && null !== $data['is_custom_image']) { - $object->setIsCustomImage($data['is_custom_image']); - } elseif (\array_key_exists('is_custom_image', $data) && null === $data['is_custom_image']) { - $object->setIsCustomImage(null); - } - if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { - $value_14 = $data['is_restricted']; - if (\is_bool($data['is_restricted'])) { + if (\array_key_exists('is_app_user', $data) && null !== $data['is_app_user']) { + $object->setIsAppUser($data['is_app_user']); + } elseif (\array_key_exists('is_app_user', $data) && null === $data['is_app_user']) { + $object->setIsAppUser(null); + } + if (\array_key_exists('is_custom_image', $data) && null !== $data['is_custom_image']) { + $object->setIsCustomImage($data['is_custom_image']); + } elseif (\array_key_exists('is_custom_image', $data) && null === $data['is_custom_image']) { + $object->setIsCustomImage(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { $value_14 = $data['is_restricted']; + if (\is_bool($data['is_restricted'])) { + $value_14 = $data['is_restricted']; + } + $object->setIsRestricted($value_14); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); } - $object->setIsRestricted($value_14); - } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { - $object->setIsRestricted(null); - } - if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { - $value_15 = $data['is_ultra_restricted']; - if (\is_bool($data['is_ultra_restricted'])) { + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { $value_15 = $data['is_ultra_restricted']; + if (\is_bool($data['is_ultra_restricted'])) { + $value_15 = $data['is_ultra_restricted']; + } + $object->setIsUltraRestricted($value_15); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); } - $object->setIsUltraRestricted($value_15); - } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { - $object->setIsUltraRestricted(null); - } - if (\array_key_exists('last_avatar_image_hash', $data) && null !== $data['last_avatar_image_hash']) { - $object->setLastAvatarImageHash($data['last_avatar_image_hash']); - } elseif (\array_key_exists('last_avatar_image_hash', $data) && null === $data['last_avatar_image_hash']) { - $object->setLastAvatarImageHash(null); - } - if (\array_key_exists('last_name', $data) && null !== $data['last_name']) { - $value_16 = $data['last_name']; - if (\is_string($data['last_name'])) { + if (\array_key_exists('last_avatar_image_hash', $data) && null !== $data['last_avatar_image_hash']) { + $object->setLastAvatarImageHash($data['last_avatar_image_hash']); + } elseif (\array_key_exists('last_avatar_image_hash', $data) && null === $data['last_avatar_image_hash']) { + $object->setLastAvatarImageHash(null); + } + if (\array_key_exists('last_name', $data) && null !== $data['last_name']) { $value_16 = $data['last_name']; + if (\is_string($data['last_name'])) { + $value_16 = $data['last_name']; + } + $object->setLastName($value_16); + } elseif (\array_key_exists('last_name', $data) && null === $data['last_name']) { + $object->setLastName(null); } - $object->setLastName($value_16); - } elseif (\array_key_exists('last_name', $data) && null === $data['last_name']) { - $object->setLastName(null); - } - if (\array_key_exists('memberships_count', $data) && null !== $data['memberships_count']) { - $object->setMembershipsCount($data['memberships_count']); - } elseif (\array_key_exists('memberships_count', $data) && null === $data['memberships_count']) { - $object->setMembershipsCount(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $value_17 = $data['name']; - if (\is_string($data['name'])) { + if (\array_key_exists('memberships_count', $data) && null !== $data['memberships_count']) { + $object->setMembershipsCount($data['memberships_count']); + } elseif (\array_key_exists('memberships_count', $data) && null === $data['memberships_count']) { + $object->setMembershipsCount(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { $value_17 = $data['name']; + if (\is_string($data['name'])) { + $value_17 = $data['name']; + } + $object->setName($value_17); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); } - $object->setName($value_17); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('phone', $data) && null !== $data['phone']) { - $object->setPhone($data['phone']); - } elseif (\array_key_exists('phone', $data) && null === $data['phone']) { - $object->setPhone(null); - } - if (\array_key_exists('pronouns', $data) && null !== $data['pronouns']) { - $object->setPronouns($data['pronouns']); - } elseif (\array_key_exists('pronouns', $data) && null === $data['pronouns']) { - $object->setPronouns(null); - } - if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { - $object->setRealName($data['real_name']); - } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { - $object->setRealName(null); - } - if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { - $object->setRealNameNormalized($data['real_name_normalized']); - } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { - $object->setRealNameNormalized(null); - } - if (\array_key_exists('skype', $data) && null !== $data['skype']) { - $object->setSkype($data['skype']); - } elseif (\array_key_exists('skype', $data) && null === $data['skype']) { - $object->setSkype(null); - } - if (\array_key_exists('status_default_emoji', $data) && null !== $data['status_default_emoji']) { - $object->setStatusDefaultEmoji($data['status_default_emoji']); - } elseif (\array_key_exists('status_default_emoji', $data) && null === $data['status_default_emoji']) { - $object->setStatusDefaultEmoji(null); - } - if (\array_key_exists('status_default_text', $data) && null !== $data['status_default_text']) { - $object->setStatusDefaultText($data['status_default_text']); - } elseif (\array_key_exists('status_default_text', $data) && null === $data['status_default_text']) { - $object->setStatusDefaultText(null); - } - if (\array_key_exists('status_default_text_canonical', $data) && null !== $data['status_default_text_canonical']) { - $value_18 = $data['status_default_text_canonical']; - if (\is_string($data['status_default_text_canonical'])) { + if (\array_key_exists('phone', $data) && null !== $data['phone']) { + $object->setPhone($data['phone']); + } elseif (\array_key_exists('phone', $data) && null === $data['phone']) { + $object->setPhone(null); + } + if (\array_key_exists('pronouns', $data) && null !== $data['pronouns']) { + $object->setPronouns($data['pronouns']); + } elseif (\array_key_exists('pronouns', $data) && null === $data['pronouns']) { + $object->setPronouns(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { + $object->setRealNameNormalized($data['real_name_normalized']); + } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { + $object->setRealNameNormalized(null); + } + if (\array_key_exists('skype', $data) && null !== $data['skype']) { + $object->setSkype($data['skype']); + } elseif (\array_key_exists('skype', $data) && null === $data['skype']) { + $object->setSkype(null); + } + if (\array_key_exists('status_default_emoji', $data) && null !== $data['status_default_emoji']) { + $object->setStatusDefaultEmoji($data['status_default_emoji']); + } elseif (\array_key_exists('status_default_emoji', $data) && null === $data['status_default_emoji']) { + $object->setStatusDefaultEmoji(null); + } + if (\array_key_exists('status_default_text', $data) && null !== $data['status_default_text']) { + $object->setStatusDefaultText($data['status_default_text']); + } elseif (\array_key_exists('status_default_text', $data) && null === $data['status_default_text']) { + $object->setStatusDefaultText(null); + } + if (\array_key_exists('status_default_text_canonical', $data) && null !== $data['status_default_text_canonical']) { $value_18 = $data['status_default_text_canonical']; + if (\is_string($data['status_default_text_canonical'])) { + $value_18 = $data['status_default_text_canonical']; + } + $object->setStatusDefaultTextCanonical($value_18); + } elseif (\array_key_exists('status_default_text_canonical', $data) && null === $data['status_default_text_canonical']) { + $object->setStatusDefaultTextCanonical(null); } - $object->setStatusDefaultTextCanonical($value_18); - } elseif (\array_key_exists('status_default_text_canonical', $data) && null === $data['status_default_text_canonical']) { - $object->setStatusDefaultTextCanonical(null); - } - if (\array_key_exists('status_emoji', $data) && null !== $data['status_emoji']) { - $object->setStatusEmoji($data['status_emoji']); - } elseif (\array_key_exists('status_emoji', $data) && null === $data['status_emoji']) { - $object->setStatusEmoji(null); - } - if (\array_key_exists('status_expiration', $data) && null !== $data['status_expiration']) { - $object->setStatusExpiration($data['status_expiration']); - } elseif (\array_key_exists('status_expiration', $data) && null === $data['status_expiration']) { - $object->setStatusExpiration(null); - } - if (\array_key_exists('status_text', $data) && null !== $data['status_text']) { - $object->setStatusText($data['status_text']); - } elseif (\array_key_exists('status_text', $data) && null === $data['status_text']) { - $object->setStatusText(null); - } - if (\array_key_exists('status_text_canonical', $data) && null !== $data['status_text_canonical']) { - $value_19 = $data['status_text_canonical']; - if (\is_string($data['status_text_canonical'])) { + if (\array_key_exists('status_emoji', $data) && null !== $data['status_emoji']) { + $object->setStatusEmoji($data['status_emoji']); + } elseif (\array_key_exists('status_emoji', $data) && null === $data['status_emoji']) { + $object->setStatusEmoji(null); + } + if (\array_key_exists('status_expiration', $data) && null !== $data['status_expiration']) { + $object->setStatusExpiration($data['status_expiration']); + } elseif (\array_key_exists('status_expiration', $data) && null === $data['status_expiration']) { + $object->setStatusExpiration(null); + } + if (\array_key_exists('status_text', $data) && null !== $data['status_text']) { + $object->setStatusText($data['status_text']); + } elseif (\array_key_exists('status_text', $data) && null === $data['status_text']) { + $object->setStatusText(null); + } + if (\array_key_exists('status_text_canonical', $data) && null !== $data['status_text_canonical']) { $value_19 = $data['status_text_canonical']; + if (\is_string($data['status_text_canonical'])) { + $value_19 = $data['status_text_canonical']; + } + $object->setStatusTextCanonical($value_19); + } elseif (\array_key_exists('status_text_canonical', $data) && null === $data['status_text_canonical']) { + $object->setStatusTextCanonical(null); } - $object->setStatusTextCanonical($value_19); - } elseif (\array_key_exists('status_text_canonical', $data) && null === $data['status_text_canonical']) { - $object->setStatusTextCanonical(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); - } - if (\array_key_exists('title', $data) && null !== $data['title']) { - $object->setTitle($data['title']); - } elseif (\array_key_exists('title', $data) && null === $data['title']) { - $object->setTitle(null); - } - if (\array_key_exists('updated', $data) && null !== $data['updated']) { - $object->setUpdated($data['updated']); - } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { - $object->setUpdated(null); - } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); - } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $value_20 = $data['username']; - if (\is_string($data['username'])) { + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('title', $data) && null !== $data['title']) { + $object->setTitle($data['title']); + } elseif (\array_key_exists('title', $data) && null === $data['title']) { + $object->setTitle(null); + } + if (\array_key_exists('updated', $data) && null !== $data['updated']) { + $object->setUpdated($data['updated']); + } elseif (\array_key_exists('updated', $data) && null === $data['updated']) { + $object->setUpdated(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { $value_20 = $data['username']; + if (\is_string($data['username'])) { + $value_20 = $data['username']; + } + $object->setUsername($value_20); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); } - $object->setUsername($value_20); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); - } - return $object; - } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('alwaysActive') && null !== $object->getAlwaysActive()) { - $data['always_active'] = $object->getAlwaysActive(); - } - if ($object->isInitialized('apiAppId') && null !== $object->getApiAppId()) { - $data['api_app_id'] = $object->getApiAppId(); - } - $data['avatar_hash'] = $object->getAvatarHash(); - if ($object->isInitialized('botId') && null !== $object->getBotId()) { - $data['bot_id'] = $object->getBotId(); + return $object; } - $data['display_name'] = $object->getDisplayName(); - $data['display_name_normalized'] = $object->getDisplayNameNormalized(); - if ($object->isInitialized('email') && null !== $object->getEmail()) { - $value = $object->getEmail(); - if (\is_string($object->getEmail())) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('alwaysActive') && null !== $object->getAlwaysActive()) { + $data['always_active'] = $object->getAlwaysActive(); + } + if ($object->isInitialized('apiAppId') && null !== $object->getApiAppId()) { + $data['api_app_id'] = $object->getApiAppId(); + } + $data['avatar_hash'] = $object->getAvatarHash(); + if ($object->isInitialized('botId') && null !== $object->getBotId()) { + $data['bot_id'] = $object->getBotId(); + } + $data['display_name'] = $object->getDisplayName(); + $data['display_name_normalized'] = $object->getDisplayNameNormalized(); + if ($object->isInitialized('email') && null !== $object->getEmail()) { $value = $object->getEmail(); + if (\is_string($object->getEmail())) { + $value = $object->getEmail(); + } + $data['email'] = $value; } - $data['email'] = $value; - } - $value_1 = $object->getFields(); - if (\is_array($object->getFields())) { - $values = []; - foreach ($object->getFields() as $value_2) { - $values[] = $value_2; - } - $value_1 = $values; - } elseif (null !== $object->getFields()) { $value_1 = $object->getFields(); - } - $data['fields'] = $value_1; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $value_3 = $object->getFirstName(); - if (\is_string($object->getFirstName())) { + if (\is_array($object->getFields())) { + $values = []; + foreach ($object->getFields() as $value_2) { + $values[] = $value_2; + } + $value_1 = $values; + } elseif (null !== $object->getFields()) { + $value_1 = $object->getFields(); + } + $data['fields'] = $value_1; + if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { $value_3 = $object->getFirstName(); + if (\is_string($object->getFirstName())) { + $value_3 = $object->getFirstName(); + } + $data['first_name'] = $value_3; } - $data['first_name'] = $value_3; - } - if ($object->isInitialized('guestExpirationTs') && null !== $object->getGuestExpirationTs()) { - $value_4 = $object->getGuestExpirationTs(); - if (\is_int($object->getGuestExpirationTs())) { + if ($object->isInitialized('guestExpirationTs') && null !== $object->getGuestExpirationTs()) { $value_4 = $object->getGuestExpirationTs(); + if (\is_int($object->getGuestExpirationTs())) { + $value_4 = $object->getGuestExpirationTs(); + } + $data['guest_expiration_ts'] = $value_4; } - $data['guest_expiration_ts'] = $value_4; - } - if ($object->isInitialized('guestInvitedBy') && null !== $object->getGuestInvitedBy()) { - $value_5 = $object->getGuestInvitedBy(); - if (\is_string($object->getGuestInvitedBy())) { + if ($object->isInitialized('guestInvitedBy') && null !== $object->getGuestInvitedBy()) { $value_5 = $object->getGuestInvitedBy(); + if (\is_string($object->getGuestInvitedBy())) { + $value_5 = $object->getGuestInvitedBy(); + } + $data['guest_invited_by'] = $value_5; } - $data['guest_invited_by'] = $value_5; - } - if ($object->isInitialized('image1024') && null !== $object->getImage1024()) { - $value_6 = $object->getImage1024(); - if (\is_string($object->getImage1024())) { + if ($object->isInitialized('image1024') && null !== $object->getImage1024()) { $value_6 = $object->getImage1024(); + if (\is_string($object->getImage1024())) { + $value_6 = $object->getImage1024(); + } + $data['image_1024'] = $value_6; } - $data['image_1024'] = $value_6; - } - if ($object->isInitialized('image192') && null !== $object->getImage192()) { - $value_7 = $object->getImage192(); - if (\is_string($object->getImage192())) { + if ($object->isInitialized('image192') && null !== $object->getImage192()) { $value_7 = $object->getImage192(); + if (\is_string($object->getImage192())) { + $value_7 = $object->getImage192(); + } + $data['image_192'] = $value_7; } - $data['image_192'] = $value_7; - } - if ($object->isInitialized('image24') && null !== $object->getImage24()) { - $value_8 = $object->getImage24(); - if (\is_string($object->getImage24())) { + if ($object->isInitialized('image24') && null !== $object->getImage24()) { $value_8 = $object->getImage24(); + if (\is_string($object->getImage24())) { + $value_8 = $object->getImage24(); + } + $data['image_24'] = $value_8; } - $data['image_24'] = $value_8; - } - if ($object->isInitialized('image32') && null !== $object->getImage32()) { - $value_9 = $object->getImage32(); - if (\is_string($object->getImage32())) { + if ($object->isInitialized('image32') && null !== $object->getImage32()) { $value_9 = $object->getImage32(); + if (\is_string($object->getImage32())) { + $value_9 = $object->getImage32(); + } + $data['image_32'] = $value_9; } - $data['image_32'] = $value_9; - } - if ($object->isInitialized('image48') && null !== $object->getImage48()) { - $value_10 = $object->getImage48(); - if (\is_string($object->getImage48())) { + if ($object->isInitialized('image48') && null !== $object->getImage48()) { $value_10 = $object->getImage48(); + if (\is_string($object->getImage48())) { + $value_10 = $object->getImage48(); + } + $data['image_48'] = $value_10; } - $data['image_48'] = $value_10; - } - if ($object->isInitialized('image512') && null !== $object->getImage512()) { - $value_11 = $object->getImage512(); - if (\is_string($object->getImage512())) { + if ($object->isInitialized('image512') && null !== $object->getImage512()) { $value_11 = $object->getImage512(); + if (\is_string($object->getImage512())) { + $value_11 = $object->getImage512(); + } + $data['image_512'] = $value_11; } - $data['image_512'] = $value_11; - } - if ($object->isInitialized('image72') && null !== $object->getImage72()) { - $value_12 = $object->getImage72(); - if (\is_string($object->getImage72())) { + if ($object->isInitialized('image72') && null !== $object->getImage72()) { $value_12 = $object->getImage72(); + if (\is_string($object->getImage72())) { + $value_12 = $object->getImage72(); + } + $data['image_72'] = $value_12; } - $data['image_72'] = $value_12; - } - if ($object->isInitialized('imageOriginal') && null !== $object->getImageOriginal()) { - $value_13 = $object->getImageOriginal(); - if (\is_string($object->getImageOriginal())) { + if ($object->isInitialized('imageOriginal') && null !== $object->getImageOriginal()) { $value_13 = $object->getImageOriginal(); + if (\is_string($object->getImageOriginal())) { + $value_13 = $object->getImageOriginal(); + } + $data['image_original'] = $value_13; } - $data['image_original'] = $value_13; - } - if ($object->isInitialized('isAppUser') && null !== $object->getIsAppUser()) { - $data['is_app_user'] = $object->getIsAppUser(); - } - if ($object->isInitialized('isCustomImage') && null !== $object->getIsCustomImage()) { - $data['is_custom_image'] = $object->getIsCustomImage(); - } - if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { - $value_14 = $object->getIsRestricted(); - if (\is_bool($object->getIsRestricted())) { + if ($object->isInitialized('isAppUser') && null !== $object->getIsAppUser()) { + $data['is_app_user'] = $object->getIsAppUser(); + } + if ($object->isInitialized('isCustomImage') && null !== $object->getIsCustomImage()) { + $data['is_custom_image'] = $object->getIsCustomImage(); + } + if ($object->isInitialized('isRestricted') && null !== $object->getIsRestricted()) { $value_14 = $object->getIsRestricted(); + if (\is_bool($object->getIsRestricted())) { + $value_14 = $object->getIsRestricted(); + } + $data['is_restricted'] = $value_14; } - $data['is_restricted'] = $value_14; - } - if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { - $value_15 = $object->getIsUltraRestricted(); - if (\is_bool($object->getIsUltraRestricted())) { + if ($object->isInitialized('isUltraRestricted') && null !== $object->getIsUltraRestricted()) { $value_15 = $object->getIsUltraRestricted(); + if (\is_bool($object->getIsUltraRestricted())) { + $value_15 = $object->getIsUltraRestricted(); + } + $data['is_ultra_restricted'] = $value_15; } - $data['is_ultra_restricted'] = $value_15; - } - if ($object->isInitialized('lastAvatarImageHash') && null !== $object->getLastAvatarImageHash()) { - $data['last_avatar_image_hash'] = $object->getLastAvatarImageHash(); - } - if ($object->isInitialized('lastName') && null !== $object->getLastName()) { - $value_16 = $object->getLastName(); - if (\is_string($object->getLastName())) { + if ($object->isInitialized('lastAvatarImageHash') && null !== $object->getLastAvatarImageHash()) { + $data['last_avatar_image_hash'] = $object->getLastAvatarImageHash(); + } + if ($object->isInitialized('lastName') && null !== $object->getLastName()) { $value_16 = $object->getLastName(); + if (\is_string($object->getLastName())) { + $value_16 = $object->getLastName(); + } + $data['last_name'] = $value_16; } - $data['last_name'] = $value_16; - } - if ($object->isInitialized('membershipsCount') && null !== $object->getMembershipsCount()) { - $data['memberships_count'] = $object->getMembershipsCount(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $value_17 = $object->getName(); - if (\is_string($object->getName())) { + if ($object->isInitialized('membershipsCount') && null !== $object->getMembershipsCount()) { + $data['memberships_count'] = $object->getMembershipsCount(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { $value_17 = $object->getName(); + if (\is_string($object->getName())) { + $value_17 = $object->getName(); + } + $data['name'] = $value_17; } - $data['name'] = $value_17; - } - $data['phone'] = $object->getPhone(); - if ($object->isInitialized('pronouns') && null !== $object->getPronouns()) { - $data['pronouns'] = $object->getPronouns(); - } - $data['real_name'] = $object->getRealName(); - $data['real_name_normalized'] = $object->getRealNameNormalized(); - $data['skype'] = $object->getSkype(); - if ($object->isInitialized('statusDefaultEmoji') && null !== $object->getStatusDefaultEmoji()) { - $data['status_default_emoji'] = $object->getStatusDefaultEmoji(); - } - if ($object->isInitialized('statusDefaultText') && null !== $object->getStatusDefaultText()) { - $data['status_default_text'] = $object->getStatusDefaultText(); - } - if ($object->isInitialized('statusDefaultTextCanonical') && null !== $object->getStatusDefaultTextCanonical()) { - $value_18 = $object->getStatusDefaultTextCanonical(); - if (\is_string($object->getStatusDefaultTextCanonical())) { + $data['phone'] = $object->getPhone(); + if ($object->isInitialized('pronouns') && null !== $object->getPronouns()) { + $data['pronouns'] = $object->getPronouns(); + } + $data['real_name'] = $object->getRealName(); + $data['real_name_normalized'] = $object->getRealNameNormalized(); + $data['skype'] = $object->getSkype(); + if ($object->isInitialized('statusDefaultEmoji') && null !== $object->getStatusDefaultEmoji()) { + $data['status_default_emoji'] = $object->getStatusDefaultEmoji(); + } + if ($object->isInitialized('statusDefaultText') && null !== $object->getStatusDefaultText()) { + $data['status_default_text'] = $object->getStatusDefaultText(); + } + if ($object->isInitialized('statusDefaultTextCanonical') && null !== $object->getStatusDefaultTextCanonical()) { $value_18 = $object->getStatusDefaultTextCanonical(); + if (\is_string($object->getStatusDefaultTextCanonical())) { + $value_18 = $object->getStatusDefaultTextCanonical(); + } + $data['status_default_text_canonical'] = $value_18; } - $data['status_default_text_canonical'] = $value_18; - } - $data['status_emoji'] = $object->getStatusEmoji(); - if ($object->isInitialized('statusExpiration') && null !== $object->getStatusExpiration()) { - $data['status_expiration'] = $object->getStatusExpiration(); - } - $data['status_text'] = $object->getStatusText(); - if ($object->isInitialized('statusTextCanonical') && null !== $object->getStatusTextCanonical()) { - $value_19 = $object->getStatusTextCanonical(); - if (\is_string($object->getStatusTextCanonical())) { + $data['status_emoji'] = $object->getStatusEmoji(); + if ($object->isInitialized('statusExpiration') && null !== $object->getStatusExpiration()) { + $data['status_expiration'] = $object->getStatusExpiration(); + } + $data['status_text'] = $object->getStatusText(); + if ($object->isInitialized('statusTextCanonical') && null !== $object->getStatusTextCanonical()) { $value_19 = $object->getStatusTextCanonical(); + if (\is_string($object->getStatusTextCanonical())) { + $value_19 = $object->getStatusTextCanonical(); + } + $data['status_text_canonical'] = $value_19; } - $data['status_text_canonical'] = $value_19; - } - if ($object->isInitialized('team') && null !== $object->getTeam()) { - $data['team'] = $object->getTeam(); - } - $data['title'] = $object->getTitle(); - if ($object->isInitialized('updated') && null !== $object->getUpdated()) { - $data['updated'] = $object->getUpdated(); - } - if ($object->isInitialized('userId') && null !== $object->getUserId()) { - $data['user_id'] = $object->getUserId(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $value_20 = $object->getUsername(); - if (\is_string($object->getUsername())) { + if ($object->isInitialized('team') && null !== $object->getTeam()) { + $data['team'] = $object->getTeam(); + } + $data['title'] = $object->getTitle(); + if ($object->isInitialized('updated') && null !== $object->getUpdated()) { + $data['updated'] = $object->getUpdated(); + } + if ($object->isInitialized('userId') && null !== $object->getUserId()) { + $data['user_id'] = $object->getUserId(); + } + if ($object->isInitialized('username') && null !== $object->getUsername()) { $value_20 = $object->getUsername(); + if (\is_string($object->getUsername())) { + $value_20 = $object->getUsername(); + } + $data['username'] = $value_20; } - $data['username'] = $value_20; - } - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfile' => false]; + } } } diff --git a/generated/Normalizer/ObjsUserProfileShortNormalizer.php b/generated/Normalizer/ObjsUserProfileShortNormalizer.php index 797b8497..5f29abc0 100644 --- a/generated/Normalizer/ObjsUserProfileShortNormalizer.php +++ b/generated/Normalizer/ObjsUserProfileShortNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,129 +24,255 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsUserProfileShortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsUserProfileShortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \JoliCode\Slack\Api\Model\ObjsUserProfileShort(); - if (null === $data || false === \is_array($data)) { - return $object; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === $type; } - if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { - $object->setAvatarHash($data['avatar_hash']); - } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { - $object->setAvatarHash(null); - } - if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { - $object->setDisplayName($data['display_name']); - } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { - $object->setDisplayName(null); - } - if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { - $object->setDisplayNameNormalized($data['display_name_normalized']); - } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { - $object->setDisplayNameNormalized(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === \get_class($data); } - if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { - $value = $data['first_name']; - if (\is_string($data['first_name'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserProfileShort(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { + $object->setDisplayName($data['display_name']); + } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { + $object->setDisplayName(null); + } + if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { + $object->setDisplayNameNormalized($data['display_name_normalized']); + } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { + $object->setDisplayNameNormalized(null); + } + if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { $value = $data['first_name']; + if (\is_string($data['first_name'])) { + $value = $data['first_name']; + } + $object->setFirstName($value); + } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { + $object->setFirstName(null); } - $object->setFirstName($value); - } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { - $object->setFirstName(null); - } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $object->setImage72($data['image_72']); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); - } - if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { - $object->setIsRestricted($data['is_restricted']); - } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { - $object->setIsRestricted(null); - } - if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { - $object->setIsUltraRestricted($data['is_ultra_restricted']); - } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { - $object->setIsUltraRestricted(null); + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { + $object->setIsRestricted($data['is_restricted']); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); + } + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { + $object->setIsUltraRestricted($data['is_ultra_restricted']); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { + $object->setRealNameNormalized($data['real_name_normalized']); + } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { + $object->setRealNameNormalized(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + + return $object; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['avatar_hash'] = $object->getAvatarHash(); + $data['display_name'] = $object->getDisplayName(); + if ($object->isInitialized('displayNameNormalized') && null !== $object->getDisplayNameNormalized()) { + $data['display_name_normalized'] = $object->getDisplayNameNormalized(); + } + $value = $object->getFirstName(); + if (\is_string($object->getFirstName())) { + $value = $object->getFirstName(); + } + $data['first_name'] = $value; + $data['image_72'] = $object->getImage72(); + $data['is_restricted'] = $object->getIsRestricted(); + $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); + $data['name'] = $object->getName(); + $data['real_name'] = $object->getRealName(); + if ($object->isInitialized('realNameNormalized') && null !== $object->getRealNameNormalized()) { + $data['real_name_normalized'] = $object->getRealNameNormalized(); + } + $data['team'] = $object->getTeam(); + + return $data; } - if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { - $object->setRealName($data['real_name']); - } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { - $object->setRealName(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false]; } - if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { - $object->setRealNameNormalized($data['real_name_normalized']); - } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { - $object->setRealNameNormalized(null); + } +} else { + class ObjsUserProfileShortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === $type; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($data['team']); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserProfileShort(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('display_name', $data) && null !== $data['display_name']) { + $object->setDisplayName($data['display_name']); + } elseif (\array_key_exists('display_name', $data) && null === $data['display_name']) { + $object->setDisplayName(null); + } + if (\array_key_exists('display_name_normalized', $data) && null !== $data['display_name_normalized']) { + $object->setDisplayNameNormalized($data['display_name_normalized']); + } elseif (\array_key_exists('display_name_normalized', $data) && null === $data['display_name_normalized']) { + $object->setDisplayNameNormalized(null); + } + if (\array_key_exists('first_name', $data) && null !== $data['first_name']) { + $value = $data['first_name']; + if (\is_string($data['first_name'])) { + $value = $data['first_name']; + } + $object->setFirstName($value); + } elseif (\array_key_exists('first_name', $data) && null === $data['first_name']) { + $object->setFirstName(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('is_restricted', $data) && null !== $data['is_restricted']) { + $object->setIsRestricted($data['is_restricted']); + } elseif (\array_key_exists('is_restricted', $data) && null === $data['is_restricted']) { + $object->setIsRestricted(null); + } + if (\array_key_exists('is_ultra_restricted', $data) && null !== $data['is_ultra_restricted']) { + $object->setIsUltraRestricted($data['is_ultra_restricted']); + } elseif (\array_key_exists('is_ultra_restricted', $data) && null === $data['is_ultra_restricted']) { + $object->setIsUltraRestricted(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('real_name', $data) && null !== $data['real_name']) { + $object->setRealName($data['real_name']); + } elseif (\array_key_exists('real_name', $data) && null === $data['real_name']) { + $object->setRealName(null); + } + if (\array_key_exists('real_name_normalized', $data) && null !== $data['real_name_normalized']) { + $object->setRealNameNormalized($data['real_name_normalized']); + } elseif (\array_key_exists('real_name_normalized', $data) && null === $data['real_name_normalized']) { + $object->setRealNameNormalized(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($data['team']); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['avatar_hash'] = $object->getAvatarHash(); - $data['display_name'] = $object->getDisplayName(); - if ($object->isInitialized('displayNameNormalized') && null !== $object->getDisplayNameNormalized()) { - $data['display_name_normalized'] = $object->getDisplayNameNormalized(); + return $object; } - $value = $object->getFirstName(); - if (\is_string($object->getFirstName())) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['avatar_hash'] = $object->getAvatarHash(); + $data['display_name'] = $object->getDisplayName(); + if ($object->isInitialized('displayNameNormalized') && null !== $object->getDisplayNameNormalized()) { + $data['display_name_normalized'] = $object->getDisplayNameNormalized(); + } $value = $object->getFirstName(); - } - $data['first_name'] = $value; - $data['image_72'] = $object->getImage72(); - $data['is_restricted'] = $object->getIsRestricted(); - $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); - $data['name'] = $object->getName(); - $data['real_name'] = $object->getRealName(); - if ($object->isInitialized('realNameNormalized') && null !== $object->getRealNameNormalized()) { - $data['real_name_normalized'] = $object->getRealNameNormalized(); - } - $data['team'] = $object->getTeam(); + if (\is_string($object->getFirstName())) { + $value = $object->getFirstName(); + } + $data['first_name'] = $value; + $data['image_72'] = $object->getImage72(); + $data['is_restricted'] = $object->getIsRestricted(); + $data['is_ultra_restricted'] = $object->getIsUltraRestricted(); + $data['name'] = $object->getName(); + $data['real_name'] = $object->getRealName(); + if ($object->isInitialized('realNameNormalized') && null !== $object->getRealNameNormalized()) { + $data['real_name_normalized'] = $object->getRealNameNormalized(); + } + $data['team'] = $object->getTeam(); - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserProfileShort' => false]; + } } } diff --git a/generated/Normalizer/ObjsUserTeamProfileNormalizer.php b/generated/Normalizer/ObjsUserTeamProfileNormalizer.php index 7880b978..d87b5d07 100644 --- a/generated/Normalizer/ObjsUserTeamProfileNormalizer.php +++ b/generated/Normalizer/ObjsUserTeamProfileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,65 +24,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ObjsUserTeamProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ObjsUserTeamProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ObjsUserTeamProfile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserTeamProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + } + $object->setFields($values); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + return $object; } - if (\array_key_exists('fields', $data) && null !== $data['fields']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + foreach ($object->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setFields($values); - } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { - $object->setFields(null); + $data['fields'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ObjsUserTeamProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === $type; } - $data['fields'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ObjsUserTeamProfile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + } + $object->setFields($values); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['fields'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ObjsUserTeamProfile' => false]; + } } } diff --git a/generated/Normalizer/PinsAddPostResponse200Normalizer.php b/generated/Normalizer/PinsAddPostResponse200Normalizer.php index ca7e187b..bd820a81 100644 --- a/generated/Normalizer/PinsAddPostResponse200Normalizer.php +++ b/generated/Normalizer/PinsAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class PinsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/PinsAddPostResponsedefaultNormalizer.php b/generated/Normalizer/PinsAddPostResponsedefaultNormalizer.php index 5aa51c64..b2e01e73 100644 --- a/generated/Normalizer/PinsAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/PinsAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class PinsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/PinsListGetResponse200Item0ItemsItem0Normalizer.php b/generated/Normalizer/PinsListGetResponse200Item0ItemsItem0Normalizer.php index 01ac15c6..378a8894 100644 --- a/generated/Normalizer/PinsListGetResponse200Item0ItemsItem0Normalizer.php +++ b/generated/Normalizer/PinsListGetResponse200Item0ItemsItem0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,83 +24,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsListGetResponse200Item0ItemsItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsListGetResponse200Item0ItemsItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { - $object->setCreatedBy($data['created_by']); - } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { - $object->setCreatedBy(null); - } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['created_by'] = $object->getCreatedBy(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class PinsListGetResponse200Item0ItemsItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['created'] = $object->getCreated(); - } - if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { - $data['created_by'] = $object->getCreatedBy(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === $type; } - if ($object->isInitialized('file') && null !== $object->getFile()) { - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' === \get_class($data); } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['created_by'] = $object->getCreatedBy(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0' => false]; + } } } diff --git a/generated/Normalizer/PinsListGetResponse200Item0ItemsItem1Normalizer.php b/generated/Normalizer/PinsListGetResponse200Item0ItemsItem1Normalizer.php index e68095bb..272581ad 100644 --- a/generated/Normalizer/PinsListGetResponse200Item0ItemsItem1Normalizer.php +++ b/generated/Normalizer/PinsListGetResponse200Item0ItemsItem1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,91 +24,179 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsListGetResponse200Item0ItemsItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsListGetResponse200Item0ItemsItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('created', $data) && null !== $data['created']) { - $object->setCreated($data['created']); - } elseif (\array_key_exists('created', $data) && null === $data['created']) { - $object->setCreated(null); - } - if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { - $object->setCreatedBy($data['created_by']); - } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { - $object->setCreatedBy(null); - } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - return $object; - } + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['created_by'] = $object->getCreatedBy(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('channel') && null !== $object->getChannel()) { - $data['channel'] = $object->getChannel(); + return $data; } - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['created'] = $object->getCreated(); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false]; } - if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { - $data['created_by'] = $object->getCreatedBy(); + } +} else { + class PinsListGetResponse200Item0ItemsItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === $type; } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' === \get_class($data); } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0ItemsItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('created', $data) && null !== $data['created']) { + $object->setCreated($data['created']); + } elseif (\array_key_exists('created', $data) && null === $data['created']) { + $object->setCreated(null); + } + if (\array_key_exists('created_by', $data) && null !== $data['created_by']) { + $object->setCreatedBy($data['created_by']); + } elseif (\array_key_exists('created_by', $data) && null === $data['created_by']) { + $object->setCreatedBy(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['created_by'] = $object->getCreatedBy(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1' => false]; + } } } diff --git a/generated/Normalizer/PinsListGetResponse200Item0Normalizer.php b/generated/Normalizer/PinsListGetResponse200Item0Normalizer.php index b73fe509..f09c5439 100644 --- a/generated/Normalizer/PinsListGetResponse200Item0Normalizer.php +++ b/generated/Normalizer/PinsListGetResponse200Item0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,91 +24,179 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsListGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsListGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $value = $data['items']; + if (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + $values = []; + foreach ($data['items'] as $value_1) { + $values[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0', 'json', $context); + } + $value = $values; + } elseif (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + $values_1 = []; + foreach ($data['items'] as $value_2) { + $values_1[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1', 'json', $context); + } + $value = $values_1; + } + $object->setItems($value); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('items', $data) && null !== $data['items']) { - $value = $data['items']; - if (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $value = $object->getItems(); + if (\is_array($object->getItems())) { $values = []; - foreach ($data['items'] as $value_1) { - $values[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0', 'json', $context); + foreach ($object->getItems() as $value_1) { + $values[] = $this->normalizer->normalize($value_1, 'json', $context); } $value = $values; - } elseif (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + } elseif (\is_array($object->getItems())) { $values_1 = []; - foreach ($data['items'] as $value_2) { - $values_1[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1', 'json', $context); + foreach ($object->getItems() as $value_2) { + $values_1[] = $this->normalizer->normalize($value_2, 'json', $context); } $value = $values_1; } - $object->setItems($value); - } elseif (\array_key_exists('items', $data) && null === $data['items']) { - $object->setItems(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + $data['items'] = $value; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class PinsListGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $value = $object->getItems(); - if (\is_array($object->getItems())) { - $values = []; - foreach ($object->getItems() as $value_1) { - $values[] = $this->normalizer->normalize($value_1, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $value = $values; - } elseif (\is_array($object->getItems())) { - $values_1 = []; - foreach ($object->getItems() as $value_2) { - $values_1[] = $this->normalizer->normalize($value_2, 'json', $context); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $value = $data['items']; + if (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + $values = []; + foreach ($data['items'] as $value_1) { + $values[] = $this->denormalizer->denormalize($value_1, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem0', 'json', $context); + } + $value = $values; + } elseif (\is_array($data['items']) && $this->isOnlyNumericKeys($data['items'])) { + $values_1 = []; + foreach ($data['items'] as $value_2) { + $values_1[] = $this->denormalizer->denormalize($value_2, 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0ItemsItem1', 'json', $context); + } + $value = $values_1; + } + $object->setItems($value); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); } - $value = $values_1; + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['items'] = $value; - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $value = $object->getItems(); + if (\is_array($object->getItems())) { + $values = []; + foreach ($object->getItems() as $value_1) { + $values[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $value = $values; + } elseif (\is_array($object->getItems())) { + $values_1 = []; + foreach ($object->getItems() as $value_2) { + $values_1[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $value = $values_1; + } + $data['items'] = $value; + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item0' => false]; + } } } diff --git a/generated/Normalizer/PinsListGetResponse200Item1Normalizer.php b/generated/Normalizer/PinsListGetResponse200Item1Normalizer.php index 08a2bb83..593290a7 100644 --- a/generated/Normalizer/PinsListGetResponse200Item1Normalizer.php +++ b/generated/Normalizer/PinsListGetResponse200Item1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsListGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsListGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('count', $data) && null !== $data['count']) { - $object->setCount($data['count']); - } elseif (\array_key_exists('count', $data) && null === $data['count']) { - $object->setCount(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['count'] = $object->getCount(); + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class PinsListGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['count'] = $object->getCount(); - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponse200Item1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['count'] = $object->getCount(); + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponse200Item1' => false]; + } } } diff --git a/generated/Normalizer/PinsListGetResponsedefaultNormalizer.php b/generated/Normalizer/PinsListGetResponsedefaultNormalizer.php index ff466dd7..724180f2 100644 --- a/generated/Normalizer/PinsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/PinsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class PinsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/PinsRemovePostResponse200Normalizer.php b/generated/Normalizer/PinsRemovePostResponse200Normalizer.php index c9630692..3d157dfa 100644 --- a/generated/Normalizer/PinsRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/PinsRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class PinsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/PinsRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/PinsRemovePostResponsedefaultNormalizer.php index 5e9b3875..204d9e77 100644 --- a/generated/Normalizer/PinsRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/PinsRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PinsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class PinsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class PinsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\PinsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\PinsRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ReactionsAddPostResponse200Normalizer.php b/generated/Normalizer/ReactionsAddPostResponse200Normalizer.php index 8b17b80d..6fd469d4 100644 --- a/generated/Normalizer/ReactionsAddPostResponse200Normalizer.php +++ b/generated/Normalizer/ReactionsAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ReactionsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ReactionsAddPostResponsedefaultNormalizer.php b/generated/Normalizer/ReactionsAddPostResponsedefaultNormalizer.php index 11e8cdfc..da18fa99 100644 --- a/generated/Normalizer/ReactionsAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ReactionsAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ReactionsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ReactionsGetGetResponsedefaultNormalizer.php b/generated/Normalizer/ReactionsGetGetResponsedefaultNormalizer.php index 75694d99..3261e07a 100644 --- a/generated/Normalizer/ReactionsGetGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ReactionsGetGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsGetGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ReactionsGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsGetGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem0Normalizer.php b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem0Normalizer.php index c80d6204..f79d3979 100644 --- a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem0Normalizer.php +++ b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false]; } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); + } +} else { + class ReactionsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem0' => false]; + } } } diff --git a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem1Normalizer.php b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem1Normalizer.php index 5d93bd9f..0d402593 100644 --- a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem1Normalizer.php +++ b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ReactionsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['type'] = $object->getType(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem1' => false]; + } } } diff --git a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem2Normalizer.php b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem2Normalizer.php index 73dd46a8..f1cbc37d 100644 --- a/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem2Normalizer.php +++ b/generated/Normalizer/ReactionsListGetResponse200ItemsItemItem2Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem2(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('comment', $data) && null !== $data['comment']) { - $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); - } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { - $object->setComment(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false]; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); + } +} else { + class ReactionsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200ItemsItemItem2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200ItemsItemItem2' => false]; + } } } diff --git a/generated/Normalizer/ReactionsListGetResponse200Normalizer.php b/generated/Normalizer/ReactionsListGetResponse200Normalizer.php index 4b9fe4c0..b1a986a9 100644 --- a/generated/Normalizer/ReactionsListGetResponse200Normalizer.php +++ b/generated/Normalizer/ReactionsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,87 +24,171 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $values = []; + foreach ($data['items'] as $value) { + $values[] = $value; + } + $object->setItems($values); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('items', $data) && null !== $data['items']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['items'] as $value) { + foreach ($object->getItems() as $value) { $values[] = $value; } - $object->setItems($values); - } elseif (\array_key_exists('items', $data) && null === $data['items']) { - $object->setItems(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + $data['items'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ReactionsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === $type; } - $data['items'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('paging') && null !== $object->getPaging()) { - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' === \get_class($data); } - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $values = []; + foreach ($data['items'] as $value) { + $values[] = $value; + } + $object->setItems($values); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getItems() as $value) { + $values[] = $value; + } + $data['items'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/ReactionsListGetResponsedefaultNormalizer.php b/generated/Normalizer/ReactionsListGetResponsedefaultNormalizer.php index e7b9f682..1a3488fd 100644 --- a/generated/Normalizer/ReactionsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/ReactionsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ReactionsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ReactionsRemovePostResponse200Normalizer.php b/generated/Normalizer/ReactionsRemovePostResponse200Normalizer.php index 209a4c7c..08eaf88e 100644 --- a/generated/Normalizer/ReactionsRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/ReactionsRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ReactionsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ReactionsRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/ReactionsRemovePostResponsedefaultNormalizer.php index afac776a..31053749 100644 --- a/generated/Normalizer/ReactionsRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ReactionsRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReactionsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ReactionsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class ReactionsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ReactionsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ReactionsRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RemindersAddPostResponse200Normalizer.php b/generated/Normalizer/RemindersAddPostResponse200Normalizer.php index a3ba1fba..8df4a2e3 100644 --- a/generated/Normalizer/RemindersAddPostResponse200Normalizer.php +++ b/generated/Normalizer/RemindersAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { + $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); + } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { + $object->setReminder(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { - $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); - } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { - $object->setReminder(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RemindersAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { + $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); + } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { + $object->setReminder(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/RemindersAddPostResponsedefaultNormalizer.php b/generated/Normalizer/RemindersAddPostResponsedefaultNormalizer.php index 311debee..279ce2e6 100644 --- a/generated/Normalizer/RemindersAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/RemindersAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RemindersAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RemindersCompletePostResponse200Normalizer.php b/generated/Normalizer/RemindersCompletePostResponse200Normalizer.php index 6e03c400..c16df858 100644 --- a/generated/Normalizer/RemindersCompletePostResponse200Normalizer.php +++ b/generated/Normalizer/RemindersCompletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersCompletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersCompletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RemindersCompletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/RemindersCompletePostResponsedefaultNormalizer.php b/generated/Normalizer/RemindersCompletePostResponsedefaultNormalizer.php index a95983cb..85f22e01 100644 --- a/generated/Normalizer/RemindersCompletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/RemindersCompletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersCompletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersCompletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RemindersCompletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersCompletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersCompletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RemindersDeletePostResponse200Normalizer.php b/generated/Normalizer/RemindersDeletePostResponse200Normalizer.php index 97c3da36..0ba90bd0 100644 --- a/generated/Normalizer/RemindersDeletePostResponse200Normalizer.php +++ b/generated/Normalizer/RemindersDeletePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RemindersDeletePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/RemindersDeletePostResponsedefaultNormalizer.php b/generated/Normalizer/RemindersDeletePostResponsedefaultNormalizer.php index 4212b74f..badb0c60 100644 --- a/generated/Normalizer/RemindersDeletePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/RemindersDeletePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RemindersDeletePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersDeletePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersDeletePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RemindersInfoGetResponse200Normalizer.php b/generated/Normalizer/RemindersInfoGetResponse200Normalizer.php index a71de727..0e96ec5a 100644 --- a/generated/Normalizer/RemindersInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/RemindersInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { + $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); + } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { + $object->setReminder(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { - $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); - } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { - $object->setReminder(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RemindersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminder', $data) && null !== $data['reminder']) { + $object->setReminder($this->denormalizer->denormalize($data['reminder'], 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context)); + } elseif (\array_key_exists('reminder', $data) && null === $data['reminder']) { + $object->setReminder(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['reminder'] = $this->normalizer->normalize($object->getReminder(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/RemindersInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/RemindersInfoGetResponsedefaultNormalizer.php index 4c63f5b2..99214e0c 100644 --- a/generated/Normalizer/RemindersInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/RemindersInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RemindersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RemindersListGetResponse200Normalizer.php b/generated/Normalizer/RemindersListGetResponse200Normalizer.php index 82c7318e..25c77547 100644 --- a/generated/Normalizer/RemindersListGetResponse200Normalizer.php +++ b/generated/Normalizer/RemindersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminders', $data) && null !== $data['reminders']) { + $values = []; + foreach ($data['reminders'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context); + } + $object->setReminders($values); + } elseif (\array_key_exists('reminders', $data) && null === $data['reminders']) { + $object->setReminders(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('reminders', $data) && null !== $data['reminders']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); $values = []; - foreach ($data['reminders'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context); + foreach ($object->getReminders() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setReminders($values); - } elseif (\array_key_exists('reminders', $data) && null === $data['reminders']) { - $object->setReminders(null); + $data['reminders'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RemindersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $values = []; - foreach ($object->getReminders() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === $type; } - $data['reminders'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('reminders', $data) && null !== $data['reminders']) { + $values = []; + foreach ($data['reminders'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsReminder', 'json', $context); + } + $object->setReminders($values); + } elseif (\array_key_exists('reminders', $data) && null === $data['reminders']) { + $object->setReminders(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $values = []; + foreach ($object->getReminders() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['reminders'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/RemindersListGetResponsedefaultNormalizer.php b/generated/Normalizer/RemindersListGetResponsedefaultNormalizer.php index 01de847d..7bd18ff7 100644 --- a/generated/Normalizer/RemindersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/RemindersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RemindersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RemindersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RemindersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RemindersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RemindersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/RtmConnectGetResponse200Normalizer.php b/generated/Normalizer/RtmConnectGetResponse200Normalizer.php index 8b259890..cb8c2d46 100644 --- a/generated/Normalizer/RtmConnectGetResponse200Normalizer.php +++ b/generated/Normalizer/RtmConnectGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RtmConnectGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RtmConnectGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('self', $data) && null !== $data['self']) { + $object->setSelf($this->denormalizer->denormalize($data['self'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self', 'json', $context)); + } elseif (\array_key_exists('self', $data) && null === $data['self']) { + $object->setSelf(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['self'] = $this->normalizer->normalize($object->getSelf(), 'json', $context); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['url'] = $object->getUrl(); + + return $data; } - if (\array_key_exists('self', $data) && null !== $data['self']) { - $object->setSelf($this->denormalizer->denormalize($data['self'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self', 'json', $context)); - } elseif (\array_key_exists('self', $data) && null === $data['self']) { - $object->setSelf(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class RtmConnectGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === $type; } - if (\array_key_exists('url', $data) && null !== $data['url']) { - $object->setUrl($data['url']); - } elseif (\array_key_exists('url', $data) && null === $data['url']) { - $object->setUrl(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('self', $data) && null !== $data['self']) { + $object->setSelf($this->denormalizer->denormalize($data['self'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self', 'json', $context)); + } elseif (\array_key_exists('self', $data) && null === $data['self']) { + $object->setSelf(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('url', $data) && null !== $data['url']) { + $object->setUrl($data['url']); + } elseif (\array_key_exists('url', $data) && null === $data['url']) { + $object->setUrl(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['self'] = $this->normalizer->normalize($object->getSelf(), 'json', $context); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - $data['url'] = $object->getUrl(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['self'] = $this->normalizer->normalize($object->getSelf(), 'json', $context); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['url'] = $object->getUrl(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/RtmConnectGetResponse200SelfNormalizer.php b/generated/Normalizer/RtmConnectGetResponse200SelfNormalizer.php index 7d0c5ed4..c481e8fa 100644 --- a/generated/Normalizer/RtmConnectGetResponse200SelfNormalizer.php +++ b/generated/Normalizer/RtmConnectGetResponse200SelfNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RtmConnectGetResponse200SelfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RtmConnectGetResponse200SelfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Self(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Self(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class RtmConnectGetResponse200SelfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Self(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Self' => false]; + } } } diff --git a/generated/Normalizer/RtmConnectGetResponse200TeamNormalizer.php b/generated/Normalizer/RtmConnectGetResponse200TeamNormalizer.php index 0689e1ae..05f35d51 100644 --- a/generated/Normalizer/RtmConnectGetResponse200TeamNormalizer.php +++ b/generated/Normalizer/RtmConnectGetResponse200TeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RtmConnectGetResponse200TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RtmConnectGetResponse200TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Team(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['domain'] = $object->getDomain(); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false]; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + } +} else { + class RtmConnectGetResponse200TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === $type; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponse200Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['domain'] = $object->getDomain(); - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['domain'] = $object->getDomain(); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponse200Team' => false]; + } } } diff --git a/generated/Normalizer/RtmConnectGetResponsedefaultNormalizer.php b/generated/Normalizer/RtmConnectGetResponsedefaultNormalizer.php index afbd0db1..257f40a2 100644 --- a/generated/Normalizer/RtmConnectGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/RtmConnectGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class RtmConnectGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class RtmConnectGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class RtmConnectGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\RtmConnectGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\RtmConnectGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/SearchMessagesGetResponse200Normalizer.php b/generated/Normalizer/SearchMessagesGetResponse200Normalizer.php index fd891008..a6408e7f 100644 --- a/generated/Normalizer/SearchMessagesGetResponse200Normalizer.php +++ b/generated/Normalizer/SearchMessagesGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class SearchMessagesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class SearchMessagesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class SearchMessagesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/SearchMessagesGetResponsedefaultNormalizer.php b/generated/Normalizer/SearchMessagesGetResponsedefaultNormalizer.php index 491ab659..b80bd40e 100644 --- a/generated/Normalizer/SearchMessagesGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/SearchMessagesGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class SearchMessagesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class SearchMessagesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class SearchMessagesGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\SearchMessagesGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\SearchMessagesGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/StarsAddPostResponse200Normalizer.php b/generated/Normalizer/StarsAddPostResponse200Normalizer.php index a579b4ac..c16f3520 100644 --- a/generated/Normalizer/StarsAddPostResponse200Normalizer.php +++ b/generated/Normalizer/StarsAddPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class StarsAddPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/StarsAddPostResponsedefaultNormalizer.php b/generated/Normalizer/StarsAddPostResponsedefaultNormalizer.php index e8d5e7a3..cf921fd0 100644 --- a/generated/Normalizer/StarsAddPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/StarsAddPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class StarsAddPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsAddPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsAddPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem0Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem0Normalizer.php index 52d52fe2..099f5bbe 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem0Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false]; } - if (\array_key_exists('message', $data) && null !== $data['message']) { - $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); - } elseif (\array_key_exists('message', $data) && null === $data['message']) { - $object->setMessage(null); + } +} else { + class StarsListGetResponse200ItemsItemItem0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('message', $data) && null !== $data['message']) { + $object->setMessage($this->denormalizer->denormalize($data['message'], 'JoliCode\\Slack\\Api\\Model\\ObjsMessage', 'json', $context)); + } elseif (\array_key_exists('message', $data) && null === $data['message']) { + $object->setMessage(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['date_create'] = $object->getDateCreate(); - $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['message'] = $this->normalizer->normalize($object->getMessage(), 'json', $context); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem0' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem1Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem1Normalizer.php index 7e272edc..2debe7ec 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem1Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['date_create'] = $object->getDateCreate(); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false]; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); + } +} else { + class StarsListGetResponse200ItemsItemItem1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['date_create'] = $object->getDateCreate(); - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['date_create'] = $object->getDateCreate(); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem1' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem2Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem2Normalizer.php index fc8fb3e2..096daa24 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem2Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem2Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem2(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('comment', $data) && null !== $data['comment']) { - $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); - } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { - $object->setComment(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); + $data['date_create'] = $object->getDateCreate(); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); + + return $data; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false]; } - if (\array_key_exists('file', $data) && null !== $data['file']) { - $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); - } elseif (\array_key_exists('file', $data) && null === $data['file']) { - $object->setFile(null); + } +} else { + class StarsListGetResponse200ItemsItemItem2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('comment', $data) && null !== $data['comment']) { + $object->setComment($this->denormalizer->denormalize($data['comment'], 'JoliCode\\Slack\\Api\\Model\\ObjsComment', 'json', $context)); + } elseif (\array_key_exists('comment', $data) && null === $data['comment']) { + $object->setComment(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('file', $data) && null !== $data['file']) { + $object->setFile($this->denormalizer->denormalize($data['file'], 'JoliCode\\Slack\\Api\\Model\\ObjsFile', 'json', $context)); + } elseif (\array_key_exists('file', $data) && null === $data['file']) { + $object->setFile(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); - $data['date_create'] = $object->getDateCreate(); - $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['comment'] = $this->normalizer->normalize($object->getComment(), 'json', $context); + $data['date_create'] = $object->getDateCreate(); + $data['file'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem2' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem3Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem3Normalizer.php index 7ad246bc..67281b77 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem3Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem3Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem3(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem3(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false]; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + } +} else { + class StarsListGetResponse200ItemsItemItem3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem3(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['date_create'] = $object->getDateCreate(); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem3' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem4Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem4Normalizer.php index 81ae11f6..99a2aea8 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem4Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem4Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem4Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem4Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem4(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem4(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false]; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + } +} else { + class StarsListGetResponse200ItemsItemItem4Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem4(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['date_create'] = $object->getDateCreate(); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem4' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200ItemsItemItem5Normalizer.php b/generated/Normalizer/StarsListGetResponse200ItemsItemItem5Normalizer.php index dfec0eb8..4bbca421 100644 --- a/generated/Normalizer/StarsListGetResponse200ItemsItemItem5Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200ItemsItemItem5Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200ItemsItemItem5Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200ItemsItemItem5Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem5(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem5(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + return $object; } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false]; } - if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { - $object->setDateCreate($data['date_create']); - } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { - $object->setDateCreate(null); + } +} else { + class StarsListGetResponse200ItemsItemItem5Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === $type; } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200ItemsItemItem5(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date_create', $data) && null !== $data['date_create']) { + $object->setDateCreate($data['date_create']); + } elseif (\array_key_exists('date_create', $data) && null === $data['date_create']) { + $object->setDateCreate(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['channel'] = $object->getChannel(); - $data['date_create'] = $object->getDateCreate(); - $data['type'] = $object->getType(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['channel'] = $object->getChannel(); + $data['date_create'] = $object->getDateCreate(); + $data['type'] = $object->getType(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200ItemsItemItem5' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponse200Normalizer.php b/generated/Normalizer/StarsListGetResponse200Normalizer.php index ea1ab214..0e31529b 100644 --- a/generated/Normalizer/StarsListGetResponse200Normalizer.php +++ b/generated/Normalizer/StarsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,79 +24,155 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $values = []; + foreach ($data['items'] as $value) { + $values[] = $value; + } + $object->setItems($values); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + return $object; } - if (\array_key_exists('items', $data) && null !== $data['items']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['items'] as $value) { + foreach ($object->getItems() as $value) { $values[] = $value; } - $object->setItems($values); - } elseif (\array_key_exists('items', $data) && null === $data['items']) { - $object->setItems(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); + $data['items'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class StarsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === $type; } - $data['items'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('paging') && null !== $object->getPaging()) { - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('items', $data) && null !== $data['items']) { + $values = []; + foreach ($data['items'] as $value) { + $values[] = $value; + } + $object->setItems($values); + } elseif (\array_key_exists('items', $data) && null === $data['items']) { + $object->setItems(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getItems() as $value) { + $values[] = $value; + } + $data['items'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('paging') && null !== $object->getPaging()) { + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/StarsListGetResponsedefaultNormalizer.php b/generated/Normalizer/StarsListGetResponsedefaultNormalizer.php index c6aa519f..c3bb7b85 100644 --- a/generated/Normalizer/StarsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/StarsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class StarsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/StarsRemovePostResponse200Normalizer.php b/generated/Normalizer/StarsRemovePostResponse200Normalizer.php index 165a4588..bf722367 100644 --- a/generated/Normalizer/StarsRemovePostResponse200Normalizer.php +++ b/generated/Normalizer/StarsRemovePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class StarsRemovePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/StarsRemovePostResponsedefaultNormalizer.php b/generated/Normalizer/StarsRemovePostResponsedefaultNormalizer.php index f175acad..b114f2aa 100644 --- a/generated/Normalizer/StarsRemovePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/StarsRemovePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class StarsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class StarsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class StarsRemovePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\StarsRemovePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\StarsRemovePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/TeamAccessLogsGetResponse200LoginsItemNormalizer.php b/generated/Normalizer/TeamAccessLogsGetResponse200LoginsItemNormalizer.php index bebf1ecf..09ba813f 100644 --- a/generated/Normalizer/TeamAccessLogsGetResponse200LoginsItemNormalizer.php +++ b/generated/Normalizer/TeamAccessLogsGetResponse200LoginsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,143 +24,283 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamAccessLogsGetResponse200LoginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamAccessLogsGetResponse200LoginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === $type; } - $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200LoginsItem(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data) && null !== $data['count']) { - $object->setCount($data['count']); - } elseif (\array_key_exists('count', $data) && null === $data['count']) { - $object->setCount(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === \get_class($data); } - if (\array_key_exists('country', $data) && null !== $data['country']) { - $value = $data['country']; - if (\is_string($data['country'])) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200LoginsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('country', $data) && null !== $data['country']) { $value = $data['country']; + if (\is_string($data['country'])) { + $value = $data['country']; + } + $object->setCountry($value); + } elseif (\array_key_exists('country', $data) && null === $data['country']) { + $object->setCountry(null); } - $object->setCountry($value); - } elseif (\array_key_exists('country', $data) && null === $data['country']) { - $object->setCountry(null); - } - if (\array_key_exists('date_first', $data) && null !== $data['date_first']) { - $object->setDateFirst($data['date_first']); - } elseif (\array_key_exists('date_first', $data) && null === $data['date_first']) { - $object->setDateFirst(null); - } - if (\array_key_exists('date_last', $data) && null !== $data['date_last']) { - $object->setDateLast($data['date_last']); - } elseif (\array_key_exists('date_last', $data) && null === $data['date_last']) { - $object->setDateLast(null); - } - if (\array_key_exists('ip', $data) && null !== $data['ip']) { - $value_1 = $data['ip']; - if (\is_string($data['ip'])) { + if (\array_key_exists('date_first', $data) && null !== $data['date_first']) { + $object->setDateFirst($data['date_first']); + } elseif (\array_key_exists('date_first', $data) && null === $data['date_first']) { + $object->setDateFirst(null); + } + if (\array_key_exists('date_last', $data) && null !== $data['date_last']) { + $object->setDateLast($data['date_last']); + } elseif (\array_key_exists('date_last', $data) && null === $data['date_last']) { + $object->setDateLast(null); + } + if (\array_key_exists('ip', $data) && null !== $data['ip']) { $value_1 = $data['ip']; + if (\is_string($data['ip'])) { + $value_1 = $data['ip']; + } + $object->setIp($value_1); + } elseif (\array_key_exists('ip', $data) && null === $data['ip']) { + $object->setIp(null); } - $object->setIp($value_1); - } elseif (\array_key_exists('ip', $data) && null === $data['ip']) { - $object->setIp(null); - } - if (\array_key_exists('isp', $data) && null !== $data['isp']) { - $value_2 = $data['isp']; - if (\is_string($data['isp'])) { + if (\array_key_exists('isp', $data) && null !== $data['isp']) { $value_2 = $data['isp']; + if (\is_string($data['isp'])) { + $value_2 = $data['isp']; + } + $object->setIsp($value_2); + } elseif (\array_key_exists('isp', $data) && null === $data['isp']) { + $object->setIsp(null); } - $object->setIsp($value_2); - } elseif (\array_key_exists('isp', $data) && null === $data['isp']) { - $object->setIsp(null); - } - if (\array_key_exists('region', $data) && null !== $data['region']) { - $value_3 = $data['region']; - if (\is_string($data['region'])) { + if (\array_key_exists('region', $data) && null !== $data['region']) { $value_3 = $data['region']; + if (\is_string($data['region'])) { + $value_3 = $data['region']; + } + $object->setRegion($value_3); + } elseif (\array_key_exists('region', $data) && null === $data['region']) { + $object->setRegion(null); + } + if (\array_key_exists('user_agent', $data) && null !== $data['user_agent']) { + $object->setUserAgent($data['user_agent']); + } elseif (\array_key_exists('user_agent', $data) && null === $data['user_agent']) { + $object->setUserAgent(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); } - $object->setRegion($value_3); - } elseif (\array_key_exists('region', $data) && null === $data['region']) { - $object->setRegion(null); + + return $object; } - if (\array_key_exists('user_agent', $data) && null !== $data['user_agent']) { - $object->setUserAgent($data['user_agent']); - } elseif (\array_key_exists('user_agent', $data) && null === $data['user_agent']) { - $object->setUserAgent(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['count'] = $object->getCount(); + $value = $object->getCountry(); + if (\is_string($object->getCountry())) { + $value = $object->getCountry(); + } + $data['country'] = $value; + $data['date_first'] = $object->getDateFirst(); + $data['date_last'] = $object->getDateLast(); + $value_1 = $object->getIp(); + if (\is_string($object->getIp())) { + $value_1 = $object->getIp(); + } + $data['ip'] = $value_1; + $value_2 = $object->getIsp(); + if (\is_string($object->getIsp())) { + $value_2 = $object->getIsp(); + } + $data['isp'] = $value_2; + $value_3 = $object->getRegion(); + if (\is_string($object->getRegion())) { + $value_3 = $object->getRegion(); + } + $data['region'] = $value_3; + $data['user_agent'] = $object->getUserAgent(); + $data['user_id'] = $object->getUserId(); + $data['username'] = $object->getUsername(); + + return $data; } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false]; } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $object->setUsername($data['username']); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); + } +} else { + class TeamAccessLogsGetResponse200LoginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $value = $object->getCountry(); - if (\is_string($object->getCountry())) { - $value = $object->getCountry(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200LoginsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('count', $data) && null !== $data['count']) { + $object->setCount($data['count']); + } elseif (\array_key_exists('count', $data) && null === $data['count']) { + $object->setCount(null); + } + if (\array_key_exists('country', $data) && null !== $data['country']) { + $value = $data['country']; + if (\is_string($data['country'])) { + $value = $data['country']; + } + $object->setCountry($value); + } elseif (\array_key_exists('country', $data) && null === $data['country']) { + $object->setCountry(null); + } + if (\array_key_exists('date_first', $data) && null !== $data['date_first']) { + $object->setDateFirst($data['date_first']); + } elseif (\array_key_exists('date_first', $data) && null === $data['date_first']) { + $object->setDateFirst(null); + } + if (\array_key_exists('date_last', $data) && null !== $data['date_last']) { + $object->setDateLast($data['date_last']); + } elseif (\array_key_exists('date_last', $data) && null === $data['date_last']) { + $object->setDateLast(null); + } + if (\array_key_exists('ip', $data) && null !== $data['ip']) { + $value_1 = $data['ip']; + if (\is_string($data['ip'])) { + $value_1 = $data['ip']; + } + $object->setIp($value_1); + } elseif (\array_key_exists('ip', $data) && null === $data['ip']) { + $object->setIp(null); + } + if (\array_key_exists('isp', $data) && null !== $data['isp']) { + $value_2 = $data['isp']; + if (\is_string($data['isp'])) { + $value_2 = $data['isp']; + } + $object->setIsp($value_2); + } elseif (\array_key_exists('isp', $data) && null === $data['isp']) { + $object->setIsp(null); + } + if (\array_key_exists('region', $data) && null !== $data['region']) { + $value_3 = $data['region']; + if (\is_string($data['region'])) { + $value_3 = $data['region']; + } + $object->setRegion($value_3); + } elseif (\array_key_exists('region', $data) && null === $data['region']) { + $object->setRegion(null); + } + if (\array_key_exists('user_agent', $data) && null !== $data['user_agent']) { + $object->setUserAgent($data['user_agent']); + } elseif (\array_key_exists('user_agent', $data) && null === $data['user_agent']) { + $object->setUserAgent(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + + return $object; } - $data['country'] = $value; - $data['date_first'] = $object->getDateFirst(); - $data['date_last'] = $object->getDateLast(); - $value_1 = $object->getIp(); - if (\is_string($object->getIp())) { + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['count'] = $object->getCount(); + $value = $object->getCountry(); + if (\is_string($object->getCountry())) { + $value = $object->getCountry(); + } + $data['country'] = $value; + $data['date_first'] = $object->getDateFirst(); + $data['date_last'] = $object->getDateLast(); $value_1 = $object->getIp(); - } - $data['ip'] = $value_1; - $value_2 = $object->getIsp(); - if (\is_string($object->getIsp())) { + if (\is_string($object->getIp())) { + $value_1 = $object->getIp(); + } + $data['ip'] = $value_1; $value_2 = $object->getIsp(); - } - $data['isp'] = $value_2; - $value_3 = $object->getRegion(); - if (\is_string($object->getRegion())) { + if (\is_string($object->getIsp())) { + $value_2 = $object->getIsp(); + } + $data['isp'] = $value_2; $value_3 = $object->getRegion(); - } - $data['region'] = $value_3; - $data['user_agent'] = $object->getUserAgent(); - $data['user_id'] = $object->getUserId(); - $data['username'] = $object->getUsername(); + if (\is_string($object->getRegion())) { + $value_3 = $object->getRegion(); + } + $data['region'] = $value_3; + $data['user_agent'] = $object->getUserAgent(); + $data['user_id'] = $object->getUserId(); + $data['username'] = $object->getUsername(); - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem' => false]; + } } } diff --git a/generated/Normalizer/TeamAccessLogsGetResponse200Normalizer.php b/generated/Normalizer/TeamAccessLogsGetResponse200Normalizer.php index 47f9e273..7ec893a1 100644 --- a/generated/Normalizer/TeamAccessLogsGetResponse200Normalizer.php +++ b/generated/Normalizer/TeamAccessLogsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamAccessLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamAccessLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('logins', $data) && null !== $data['logins']) { + $values = []; + foreach ($data['logins'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem', 'json', $context); + } + $object->setLogins($values); + } elseif (\array_key_exists('logins', $data) && null === $data['logins']) { + $object->setLogins(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + return $object; } - if (\array_key_exists('logins', $data) && null !== $data['logins']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['logins'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem', 'json', $context); + foreach ($object->getLogins() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setLogins($values); - } elseif (\array_key_exists('logins', $data) && null === $data['logins']) { - $object->setLogins(null); + $data['logins'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false]; } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); + } +} else { + class TeamAccessLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getLogins() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('logins', $data) && null !== $data['logins']) { + $values = []; + foreach ($data['logins'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200LoginsItem', 'json', $context); + } + $object->setLogins($values); + } elseif (\array_key_exists('logins', $data) && null === $data['logins']) { + $object->setLogins(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + + return $object; } - $data['logins'] = $values; - $data['ok'] = $object->getOk(); - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getLogins() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['logins'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/TeamAccessLogsGetResponsedefaultNormalizer.php b/generated/Normalizer/TeamAccessLogsGetResponsedefaultNormalizer.php index b1d3a9d6..aaafbdbb 100644 --- a/generated/Normalizer/TeamAccessLogsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/TeamAccessLogsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamAccessLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamAccessLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class TeamAccessLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamAccessLogsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamAccessLogsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/TeamBillableInfoGetResponse200Normalizer.php b/generated/Normalizer/TeamBillableInfoGetResponse200Normalizer.php index 5503c6fb..62d42adc 100644 --- a/generated/Normalizer/TeamBillableInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/TeamBillableInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamBillableInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamBillableInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamBillableInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/TeamBillableInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/TeamBillableInfoGetResponsedefaultNormalizer.php index 82f7970a..92a1abae 100644 --- a/generated/Normalizer/TeamBillableInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/TeamBillableInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamBillableInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamBillableInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamBillableInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamBillableInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamBillableInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/TeamInfoGetResponse200Normalizer.php b/generated/Normalizer/TeamInfoGetResponse200Normalizer.php index 38a76941..0c1a2367 100644 --- a/generated/Normalizer/TeamInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/TeamInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\ObjsTeam', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/TeamInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/TeamInfoGetResponsedefaultNormalizer.php index ac6c916c..3eee632e 100644 --- a/generated/Normalizer/TeamInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/TeamInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class TeamInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/TeamIntegrationLogsGetResponse200LogsItemNormalizer.php b/generated/Normalizer/TeamIntegrationLogsGetResponse200LogsItemNormalizer.php index 294cea69..75438396 100644 --- a/generated/Normalizer/TeamIntegrationLogsGetResponse200LogsItemNormalizer.php +++ b/generated/Normalizer/TeamIntegrationLogsGetResponse200LogsItemNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,125 +24,247 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamIntegrationLogsGetResponse200LogsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamIntegrationLogsGetResponse200LogsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200LogsItem(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200LogsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('admin_app_id', $data) && null !== $data['admin_app_id']) { + $object->setAdminAppId($data['admin_app_id']); + } elseif (\array_key_exists('admin_app_id', $data) && null === $data['admin_app_id']) { + $object->setAdminAppId(null); + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('app_type', $data) && null !== $data['app_type']) { + $object->setAppType($data['app_type']); + } elseif (\array_key_exists('app_type', $data) && null === $data['app_type']) { + $object->setAppType(null); + } + if (\array_key_exists('change_type', $data) && null !== $data['change_type']) { + $object->setChangeType($data['change_type']); + } elseif (\array_key_exists('change_type', $data) && null === $data['change_type']) { + $object->setChangeType(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date', $data) && null !== $data['date']) { + $object->setDate($data['date']); + } elseif (\array_key_exists('date', $data) && null === $data['date']) { + $object->setDate(null); + } + if (\array_key_exists('scope', $data) && null !== $data['scope']) { + $object->setScope($data['scope']); + } elseif (\array_key_exists('scope', $data) && null === $data['scope']) { + $object->setScope(null); + } + if (\array_key_exists('service_id', $data) && null !== $data['service_id']) { + $object->setServiceId($data['service_id']); + } elseif (\array_key_exists('service_id', $data) && null === $data['service_id']) { + $object->setServiceId(null); + } + if (\array_key_exists('service_type', $data) && null !== $data['service_type']) { + $object->setServiceType($data['service_type']); + } elseif (\array_key_exists('service_type', $data) && null === $data['service_type']) { + $object->setServiceType(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('user_name', $data) && null !== $data['user_name']) { + $object->setUserName($data['user_name']); + } elseif (\array_key_exists('user_name', $data) && null === $data['user_name']) { + $object->setUserName(null); + } + return $object; } - if (\array_key_exists('admin_app_id', $data) && null !== $data['admin_app_id']) { - $object->setAdminAppId($data['admin_app_id']); - } elseif (\array_key_exists('admin_app_id', $data) && null === $data['admin_app_id']) { - $object->setAdminAppId(null); - } - if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { - $object->setAppId($data['app_id']); - } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { - $object->setAppId(null); - } - if (\array_key_exists('app_type', $data) && null !== $data['app_type']) { - $object->setAppType($data['app_type']); - } elseif (\array_key_exists('app_type', $data) && null === $data['app_type']) { - $object->setAppType(null); - } - if (\array_key_exists('change_type', $data) && null !== $data['change_type']) { - $object->setChangeType($data['change_type']); - } elseif (\array_key_exists('change_type', $data) && null === $data['change_type']) { - $object->setChangeType(null); - } - if (\array_key_exists('channel', $data) && null !== $data['channel']) { - $object->setChannel($data['channel']); - } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { - $object->setChannel(null); - } - if (\array_key_exists('date', $data) && null !== $data['date']) { - $object->setDate($data['date']); - } elseif (\array_key_exists('date', $data) && null === $data['date']) { - $object->setDate(null); - } - if (\array_key_exists('scope', $data) && null !== $data['scope']) { - $object->setScope($data['scope']); - } elseif (\array_key_exists('scope', $data) && null === $data['scope']) { - $object->setScope(null); - } - if (\array_key_exists('service_id', $data) && null !== $data['service_id']) { - $object->setServiceId($data['service_id']); - } elseif (\array_key_exists('service_id', $data) && null === $data['service_id']) { - $object->setServiceId(null); - } - if (\array_key_exists('service_type', $data) && null !== $data['service_type']) { - $object->setServiceType($data['service_type']); - } elseif (\array_key_exists('service_type', $data) && null === $data['service_type']) { - $object->setServiceType(null); - } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); - } - if (\array_key_exists('user_name', $data) && null !== $data['user_name']) { - $object->setUserName($data['user_name']); - } elseif (\array_key_exists('user_name', $data) && null === $data['user_name']) { - $object->setUserName(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('adminAppId') && null !== $object->getAdminAppId()) { + $data['admin_app_id'] = $object->getAdminAppId(); + } + $data['app_id'] = $object->getAppId(); + $data['app_type'] = $object->getAppType(); + $data['change_type'] = $object->getChangeType(); + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + $data['date'] = $object->getDate(); + $data['scope'] = $object->getScope(); + if ($object->isInitialized('serviceId') && null !== $object->getServiceId()) { + $data['service_id'] = $object->getServiceId(); + } + if ($object->isInitialized('serviceType') && null !== $object->getServiceType()) { + $data['service_type'] = $object->getServiceType(); + } + $data['user_id'] = $object->getUserId(); + $data['user_name'] = $object->getUserName(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamIntegrationLogsGetResponse200LogsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('adminAppId') && null !== $object->getAdminAppId()) { - $data['admin_app_id'] = $object->getAdminAppId(); - } - $data['app_id'] = $object->getAppId(); - $data['app_type'] = $object->getAppType(); - $data['change_type'] = $object->getChangeType(); - if ($object->isInitialized('channel') && null !== $object->getChannel()) { - $data['channel'] = $object->getChannel(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === $type; } - $data['date'] = $object->getDate(); - $data['scope'] = $object->getScope(); - if ($object->isInitialized('serviceId') && null !== $object->getServiceId()) { - $data['service_id'] = $object->getServiceId(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' === \get_class($data); } - if ($object->isInitialized('serviceType') && null !== $object->getServiceType()) { - $data['service_type'] = $object->getServiceType(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200LogsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('admin_app_id', $data) && null !== $data['admin_app_id']) { + $object->setAdminAppId($data['admin_app_id']); + } elseif (\array_key_exists('admin_app_id', $data) && null === $data['admin_app_id']) { + $object->setAdminAppId(null); + } + if (\array_key_exists('app_id', $data) && null !== $data['app_id']) { + $object->setAppId($data['app_id']); + } elseif (\array_key_exists('app_id', $data) && null === $data['app_id']) { + $object->setAppId(null); + } + if (\array_key_exists('app_type', $data) && null !== $data['app_type']) { + $object->setAppType($data['app_type']); + } elseif (\array_key_exists('app_type', $data) && null === $data['app_type']) { + $object->setAppType(null); + } + if (\array_key_exists('change_type', $data) && null !== $data['change_type']) { + $object->setChangeType($data['change_type']); + } elseif (\array_key_exists('change_type', $data) && null === $data['change_type']) { + $object->setChangeType(null); + } + if (\array_key_exists('channel', $data) && null !== $data['channel']) { + $object->setChannel($data['channel']); + } elseif (\array_key_exists('channel', $data) && null === $data['channel']) { + $object->setChannel(null); + } + if (\array_key_exists('date', $data) && null !== $data['date']) { + $object->setDate($data['date']); + } elseif (\array_key_exists('date', $data) && null === $data['date']) { + $object->setDate(null); + } + if (\array_key_exists('scope', $data) && null !== $data['scope']) { + $object->setScope($data['scope']); + } elseif (\array_key_exists('scope', $data) && null === $data['scope']) { + $object->setScope(null); + } + if (\array_key_exists('service_id', $data) && null !== $data['service_id']) { + $object->setServiceId($data['service_id']); + } elseif (\array_key_exists('service_id', $data) && null === $data['service_id']) { + $object->setServiceId(null); + } + if (\array_key_exists('service_type', $data) && null !== $data['service_type']) { + $object->setServiceType($data['service_type']); + } elseif (\array_key_exists('service_type', $data) && null === $data['service_type']) { + $object->setServiceType(null); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('user_name', $data) && null !== $data['user_name']) { + $object->setUserName($data['user_name']); + } elseif (\array_key_exists('user_name', $data) && null === $data['user_name']) { + $object->setUserName(null); + } + + return $object; } - $data['user_id'] = $object->getUserId(); - $data['user_name'] = $object->getUserName(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('adminAppId') && null !== $object->getAdminAppId()) { + $data['admin_app_id'] = $object->getAdminAppId(); + } + $data['app_id'] = $object->getAppId(); + $data['app_type'] = $object->getAppType(); + $data['change_type'] = $object->getChangeType(); + if ($object->isInitialized('channel') && null !== $object->getChannel()) { + $data['channel'] = $object->getChannel(); + } + $data['date'] = $object->getDate(); + $data['scope'] = $object->getScope(); + if ($object->isInitialized('serviceId') && null !== $object->getServiceId()) { + $data['service_id'] = $object->getServiceId(); + } + if ($object->isInitialized('serviceType') && null !== $object->getServiceType()) { + $data['service_type'] = $object->getServiceType(); + } + $data['user_id'] = $object->getUserId(); + $data['user_name'] = $object->getUserName(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem' => false]; + } } } diff --git a/generated/Normalizer/TeamIntegrationLogsGetResponse200Normalizer.php b/generated/Normalizer/TeamIntegrationLogsGetResponse200Normalizer.php index 5841de70..27fb88b5 100644 --- a/generated/Normalizer/TeamIntegrationLogsGetResponse200Normalizer.php +++ b/generated/Normalizer/TeamIntegrationLogsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamIntegrationLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamIntegrationLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('logs', $data) && null !== $data['logs']) { + $values = []; + foreach ($data['logs'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem', 'json', $context); + } + $object->setLogs($values); + } elseif (\array_key_exists('logs', $data) && null === $data['logs']) { + $object->setLogs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + return $object; } - if (\array_key_exists('logs', $data) && null !== $data['logs']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['logs'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem', 'json', $context); + foreach ($object->getLogs() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setLogs($values); - } elseif (\array_key_exists('logs', $data) && null === $data['logs']) { - $object->setLogs(null); + $data['logs'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false]; } - if (\array_key_exists('paging', $data) && null !== $data['paging']) { - $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); - } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { - $object->setPaging(null); + } +} else { + class TeamIntegrationLogsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getLogs() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('logs', $data) && null !== $data['logs']) { + $values = []; + foreach ($data['logs'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200LogsItem', 'json', $context); + } + $object->setLogs($values); + } elseif (\array_key_exists('logs', $data) && null === $data['logs']) { + $object->setLogs(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('paging', $data) && null !== $data['paging']) { + $object->setPaging($this->denormalizer->denormalize($data['paging'], 'JoliCode\\Slack\\Api\\Model\\ObjsPaging', 'json', $context)); + } elseif (\array_key_exists('paging', $data) && null === $data['paging']) { + $object->setPaging(null); + } + + return $object; } - $data['logs'] = $values; - $data['ok'] = $object->getOk(); - $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getLogs() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['logs'] = $values; + $data['ok'] = $object->getOk(); + $data['paging'] = $this->normalizer->normalize($object->getPaging(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/TeamIntegrationLogsGetResponsedefaultNormalizer.php b/generated/Normalizer/TeamIntegrationLogsGetResponsedefaultNormalizer.php index e4cb6cfc..34aefaa6 100644 --- a/generated/Normalizer/TeamIntegrationLogsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/TeamIntegrationLogsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamIntegrationLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamIntegrationLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class TeamIntegrationLogsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamIntegrationLogsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamIntegrationLogsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/TeamProfileGetGetResponse200Normalizer.php b/generated/Normalizer/TeamProfileGetGetResponse200Normalizer.php index 17da5e9b..d8dd5156 100644 --- a/generated/Normalizer/TeamProfileGetGetResponse200Normalizer.php +++ b/generated/Normalizer/TeamProfileGetGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('profile', $data) && null !== $data['profile']) { - $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile', 'json', $context)); - } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { - $object->setProfile(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/TeamProfileGetGetResponse200ProfileNormalizer.php b/generated/Normalizer/TeamProfileGetGetResponse200ProfileNormalizer.php index 2d3c6536..2d8258a2 100644 --- a/generated/Normalizer/TeamProfileGetGetResponse200ProfileNormalizer.php +++ b/generated/Normalizer/TeamProfileGetGetResponse200ProfileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,65 +24,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamProfileGetGetResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamProfileGetGetResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200Profile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200Profile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + } + $object->setFields($values); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + return $object; } - if (\array_key_exists('fields', $data) && null !== $data['fields']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + foreach ($object->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setFields($values); - } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { - $object->setFields(null); + $data['fields'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class TeamProfileGetGetResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === $type; } - $data['fields'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponse200Profile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('fields', $data) && null !== $data['fields']) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsTeamProfileField', 'json', $context); + } + $object->setFields($values); + } elseif (\array_key_exists('fields', $data) && null === $data['fields']) { + $object->setFields(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['fields'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponse200Profile' => false]; + } } } diff --git a/generated/Normalizer/TeamProfileGetGetResponsedefaultNormalizer.php b/generated/Normalizer/TeamProfileGetGetResponsedefaultNormalizer.php index 6878ef80..b75804b4 100644 --- a/generated/Normalizer/TeamProfileGetGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/TeamProfileGetGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class TeamProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class TeamProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class TeamProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\TeamProfileGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\TeamProfileGetGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsCreatePostResponse200Normalizer.php b/generated/Normalizer/UsergroupsCreatePostResponse200Normalizer.php index d4027b4a..6f9ed429 100644 --- a/generated/Normalizer/UsergroupsCreatePostResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsCreatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { - $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); - } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { - $object->setUsergroup(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsCreatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsCreatePostResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsCreatePostResponsedefaultNormalizer.php index bdbd7de7..54ed3845 100644 --- a/generated/Normalizer/UsergroupsCreatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsCreatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsCreatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsCreatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsCreatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsDisablePostResponse200Normalizer.php b/generated/Normalizer/UsergroupsDisablePostResponse200Normalizer.php index 6427859c..c8e843c5 100644 --- a/generated/Normalizer/UsergroupsDisablePostResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsDisablePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsDisablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsDisablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { - $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); - } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { - $object->setUsergroup(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsDisablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsDisablePostResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsDisablePostResponsedefaultNormalizer.php index 5670a027..12c38bd4 100644 --- a/generated/Normalizer/UsergroupsDisablePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsDisablePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsDisablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsDisablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsDisablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsDisablePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsDisablePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsEnablePostResponse200Normalizer.php b/generated/Normalizer/UsergroupsEnablePostResponse200Normalizer.php index 93c6595b..115e1b51 100644 --- a/generated/Normalizer/UsergroupsEnablePostResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsEnablePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsEnablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsEnablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { - $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); - } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { - $object->setUsergroup(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsEnablePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsEnablePostResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsEnablePostResponsedefaultNormalizer.php index 63ea1cc3..c2d7a7b1 100644 --- a/generated/Normalizer/UsergroupsEnablePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsEnablePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsEnablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsEnablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsEnablePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsEnablePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsEnablePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsListGetResponse200Normalizer.php b/generated/Normalizer/UsergroupsListGetResponse200Normalizer.php index a1213aed..0c5a5b39 100644 --- a/generated/Normalizer/UsergroupsListGetResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroups', $data) && null !== $data['usergroups']) { + $values = []; + foreach ($data['usergroups'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context); + } + $object->setUsergroups($values); + } elseif (\array_key_exists('usergroups', $data) && null === $data['usergroups']) { + $object->setUsergroups(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroups', $data) && null !== $data['usergroups']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); $values = []; - foreach ($data['usergroups'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context); + foreach ($object->getUsergroups() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setUsergroups($values); - } elseif (\array_key_exists('usergroups', $data) && null === $data['usergroups']) { - $object->setUsergroups(null); + $data['usergroups'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $values = []; - foreach ($object->getUsergroups() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === $type; } - $data['usergroups'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroups', $data) && null !== $data['usergroups']) { + $values = []; + foreach ($data['usergroups'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context); + } + $object->setUsergroups($values); + } elseif (\array_key_exists('usergroups', $data) && null === $data['usergroups']) { + $object->setUsergroups(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $values = []; + foreach ($object->getUsergroups() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['usergroups'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsListGetResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsListGetResponsedefaultNormalizer.php index 53f7f768..2937c9db 100644 --- a/generated/Normalizer/UsergroupsListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUpdatePostResponse200Normalizer.php b/generated/Normalizer/UsergroupsUpdatePostResponse200Normalizer.php index 79d9a519..d9e1a793 100644 --- a/generated/Normalizer/UsergroupsUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { - $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); - } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { - $object->setUsergroup(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsUpdatePostResponsedefaultNormalizer.php index 1b589e6e..1dca550c 100644 --- a/generated/Normalizer/UsergroupsUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUsersListGetResponse200Normalizer.php b/generated/Normalizer/UsergroupsUsersListGetResponse200Normalizer.php index d613560e..885855e1 100644 --- a/generated/Normalizer/UsergroupsUsersListGetResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsUsersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('users', $data) && null !== $data['users']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); $values = []; - foreach ($data['users'] as $value) { + foreach ($object->getUsers() as $value) { $values[] = $value; } - $object->setUsers($values); - } elseif (\array_key_exists('users', $data) && null === $data['users']) { - $object->setUsers(null); + $data['users'] = $values; + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsUsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $values = []; - foreach ($object->getUsers() as $value) { - $values[] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === $type; } - $data['users'] = $values; - return $data; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' === \get_class($data); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false]; + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('users', $data) && null !== $data['users']) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $value; + } + $object->setUsers($values); + } elseif (\array_key_exists('users', $data) && null === $data['users']) { + $object->setUsers(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $values = []; + foreach ($object->getUsers() as $value) { + $values[] = $value; + } + $data['users'] = $values; + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUsersListGetResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsUsersListGetResponsedefaultNormalizer.php index 722691d8..986fc41a 100644 --- a/generated/Normalizer/UsergroupsUsersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsUsersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsUsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUsersUpdatePostResponse200Normalizer.php b/generated/Normalizer/UsergroupsUsersUpdatePostResponse200Normalizer.php index 1ed60850..0a6137f5 100644 --- a/generated/Normalizer/UsergroupsUsersUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/UsergroupsUsersUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUsersUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUsersUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { - $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); - } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { - $object->setUsergroup(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsergroupsUsersUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('usergroup', $data) && null !== $data['usergroup']) { + $object->setUsergroup($this->denormalizer->denormalize($data['usergroup'], 'JoliCode\\Slack\\Api\\Model\\ObjsSubteam', 'json', $context)); + } elseif (\array_key_exists('usergroup', $data) && null === $data['usergroup']) { + $object->setUsergroup(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['usergroup'] = $this->normalizer->normalize($object->getUsergroup(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsergroupsUsersUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/UsergroupsUsersUpdatePostResponsedefaultNormalizer.php index 90f13da7..3be6f61a 100644 --- a/generated/Normalizer/UsergroupsUsersUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsergroupsUsersUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsergroupsUsersUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsergroupsUsersUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsergroupsUsersUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsergroupsUsersUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsergroupsUsersUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersConversationsGetResponse200Normalizer.php b/generated/Normalizer/UsersConversationsGetResponse200Normalizer.php index 077ccfa0..5dae2c9a 100644 --- a/generated/Normalizer/UsersConversationsGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersConversationsGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,92 +24,181 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersConversationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersConversationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + } + $object->setChannels($values); + unset($data['channels']); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata', 'json', $context)); + unset($data['response_metadata']); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } + } + return $object; } - if (\array_key_exists('channels', $data) && null !== $data['channels']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; $values = []; - foreach ($data['channels'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setChannels($values); - unset($data['channels']); - } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { - $object->setChannels(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata', 'json', $context)); - unset($data['response_metadata']); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; + $data['channels'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersConversationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $values = []; - foreach ($object->getChannels() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === $type; } - $data['channels'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' === \get_class($data); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('channels', $data) && null !== $data['channels']) { + $values = []; + foreach ($data['channels'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsConversation', 'json', $context); + } + $object->setChannels($values); + unset($data['channels']); + } elseif (\array_key_exists('channels', $data) && null === $data['channels']) { + $object->setChannels(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata', 'json', $context)); + unset($data['response_metadata']); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getChannels() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['channels'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersConversationsGetResponse200ResponseMetadataNormalizer.php b/generated/Normalizer/UsersConversationsGetResponse200ResponseMetadataNormalizer.php index eb2c4cb1..5d12fd65 100644 --- a/generated/Normalizer/UsersConversationsGetResponse200ResponseMetadataNormalizer.php +++ b/generated/Normalizer/UsersConversationsGetResponse200ResponseMetadataNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersConversationsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersConversationsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200ResponseMetadata(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + return $object; } - if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { - $object->setNextCursor($data['next_cursor']); - } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { - $object->setNextCursor(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersConversationsGetResponse200ResponseMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['next_cursor'] = $object->getNextCursor(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponse200ResponseMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('next_cursor', $data) && null !== $data['next_cursor']) { + $object->setNextCursor($data['next_cursor']); + } elseif (\array_key_exists('next_cursor', $data) && null === $data['next_cursor']) { + $object->setNextCursor(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['next_cursor'] = $object->getNextCursor(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponse200ResponseMetadata' => false]; + } } } diff --git a/generated/Normalizer/UsersConversationsGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersConversationsGetResponsedefaultNormalizer.php index 922498b7..efe14518 100644 --- a/generated/Normalizer/UsersConversationsGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersConversationsGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersConversationsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersConversationsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersConversationsGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersConversationsGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersConversationsGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersDeletePhotoPostResponse200Normalizer.php b/generated/Normalizer/UsersDeletePhotoPostResponse200Normalizer.php index 2688551b..381b657e 100644 --- a/generated/Normalizer/UsersDeletePhotoPostResponse200Normalizer.php +++ b/generated/Normalizer/UsersDeletePhotoPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersDeletePhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersDeletePhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersDeletePhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersDeletePhotoPostResponsedefaultNormalizer.php b/generated/Normalizer/UsersDeletePhotoPostResponsedefaultNormalizer.php index 80b06b4d..95a75379 100644 --- a/generated/Normalizer/UsersDeletePhotoPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersDeletePhotoPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersDeletePhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersDeletePhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersDeletePhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersDeletePhotoPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersDeletePhotoPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersGetPresenceGetResponse200Normalizer.php b/generated/Normalizer/UsersGetPresenceGetResponse200Normalizer.php index 54120041..5a82160b 100644 --- a/generated/Normalizer/UsersGetPresenceGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersGetPresenceGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,120 +24,237 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersGetPresenceGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersGetPresenceGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('auto_away', $data) && null !== $data['auto_away']) { + $object->setAutoAway($data['auto_away']); + unset($data['auto_away']); + } elseif (\array_key_exists('auto_away', $data) && null === $data['auto_away']) { + $object->setAutoAway(null); + } + if (\array_key_exists('connection_count', $data) && null !== $data['connection_count']) { + $object->setConnectionCount($data['connection_count']); + unset($data['connection_count']); + } elseif (\array_key_exists('connection_count', $data) && null === $data['connection_count']) { + $object->setConnectionCount(null); + } + if (\array_key_exists('last_activity', $data) && null !== $data['last_activity']) { + $object->setLastActivity($data['last_activity']); + unset($data['last_activity']); + } elseif (\array_key_exists('last_activity', $data) && null === $data['last_activity']) { + $object->setLastActivity(null); + } + if (\array_key_exists('manual_away', $data) && null !== $data['manual_away']) { + $object->setManualAway($data['manual_away']); + unset($data['manual_away']); + } elseif (\array_key_exists('manual_away', $data) && null === $data['manual_away']) { + $object->setManualAway(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('online', $data) && null !== $data['online']) { + $object->setOnline($data['online']); + unset($data['online']); + } elseif (\array_key_exists('online', $data) && null === $data['online']) { + $object->setOnline(null); + } + if (\array_key_exists('presence', $data) && null !== $data['presence']) { + $object->setPresence($data['presence']); + unset($data['presence']); + } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { + $object->setPresence(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('auto_away', $data) && null !== $data['auto_away']) { - $object->setAutoAway($data['auto_away']); - unset($data['auto_away']); - } elseif (\array_key_exists('auto_away', $data) && null === $data['auto_away']) { - $object->setAutoAway(null); - } - if (\array_key_exists('connection_count', $data) && null !== $data['connection_count']) { - $object->setConnectionCount($data['connection_count']); - unset($data['connection_count']); - } elseif (\array_key_exists('connection_count', $data) && null === $data['connection_count']) { - $object->setConnectionCount(null); - } - if (\array_key_exists('last_activity', $data) && null !== $data['last_activity']) { - $object->setLastActivity($data['last_activity']); - unset($data['last_activity']); - } elseif (\array_key_exists('last_activity', $data) && null === $data['last_activity']) { - $object->setLastActivity(null); - } - if (\array_key_exists('manual_away', $data) && null !== $data['manual_away']) { - $object->setManualAway($data['manual_away']); - unset($data['manual_away']); - } elseif (\array_key_exists('manual_away', $data) && null === $data['manual_away']) { - $object->setManualAway(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('online', $data) && null !== $data['online']) { - $object->setOnline($data['online']); - unset($data['online']); - } elseif (\array_key_exists('online', $data) && null === $data['online']) { - $object->setOnline(null); - } - if (\array_key_exists('presence', $data) && null !== $data['presence']) { - $object->setPresence($data['presence']); - unset($data['presence']); - } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { - $object->setPresence(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('autoAway') && null !== $object->getAutoAway()) { + $data['auto_away'] = $object->getAutoAway(); + } + if ($object->isInitialized('connectionCount') && null !== $object->getConnectionCount()) { + $data['connection_count'] = $object->getConnectionCount(); + } + if ($object->isInitialized('lastActivity') && null !== $object->getLastActivity()) { + $data['last_activity'] = $object->getLastActivity(); + } + if ($object->isInitialized('manualAway') && null !== $object->getManualAway()) { + $data['manual_away'] = $object->getManualAway(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('online') && null !== $object->getOnline()) { + $data['online'] = $object->getOnline(); + } + $data['presence'] = $object->getPresence(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersGetPresenceGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('autoAway') && null !== $object->getAutoAway()) { - $data['auto_away'] = $object->getAutoAway(); - } - if ($object->isInitialized('connectionCount') && null !== $object->getConnectionCount()) { - $data['connection_count'] = $object->getConnectionCount(); - } - if ($object->isInitialized('lastActivity') && null !== $object->getLastActivity()) { - $data['last_activity'] = $object->getLastActivity(); - } - if ($object->isInitialized('manualAway') && null !== $object->getManualAway()) { - $data['manual_away'] = $object->getManualAway(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === $type; } - $data['ok'] = $object->getOk(); - if ($object->isInitialized('online') && null !== $object->getOnline()) { - $data['online'] = $object->getOnline(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' === \get_class($data); } - $data['presence'] = $object->getPresence(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('auto_away', $data) && null !== $data['auto_away']) { + $object->setAutoAway($data['auto_away']); + unset($data['auto_away']); + } elseif (\array_key_exists('auto_away', $data) && null === $data['auto_away']) { + $object->setAutoAway(null); + } + if (\array_key_exists('connection_count', $data) && null !== $data['connection_count']) { + $object->setConnectionCount($data['connection_count']); + unset($data['connection_count']); + } elseif (\array_key_exists('connection_count', $data) && null === $data['connection_count']) { + $object->setConnectionCount(null); + } + if (\array_key_exists('last_activity', $data) && null !== $data['last_activity']) { + $object->setLastActivity($data['last_activity']); + unset($data['last_activity']); + } elseif (\array_key_exists('last_activity', $data) && null === $data['last_activity']) { + $object->setLastActivity(null); + } + if (\array_key_exists('manual_away', $data) && null !== $data['manual_away']) { + $object->setManualAway($data['manual_away']); + unset($data['manual_away']); + } elseif (\array_key_exists('manual_away', $data) && null === $data['manual_away']) { + $object->setManualAway(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + if (\array_key_exists('online', $data) && null !== $data['online']) { + $object->setOnline($data['online']); + unset($data['online']); + } elseif (\array_key_exists('online', $data) && null === $data['online']) { + $object->setOnline(null); + } + if (\array_key_exists('presence', $data) && null !== $data['presence']) { + $object->setPresence($data['presence']); + unset($data['presence']); + } elseif (\array_key_exists('presence', $data) && null === $data['presence']) { + $object->setPresence(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('autoAway') && null !== $object->getAutoAway()) { + $data['auto_away'] = $object->getAutoAway(); + } + if ($object->isInitialized('connectionCount') && null !== $object->getConnectionCount()) { + $data['connection_count'] = $object->getConnectionCount(); + } + if ($object->isInitialized('lastActivity') && null !== $object->getLastActivity()) { + $data['last_activity'] = $object->getLastActivity(); + } + if ($object->isInitialized('manualAway') && null !== $object->getManualAway()) { + $data['manual_away'] = $object->getManualAway(); + } + $data['ok'] = $object->getOk(); + if ($object->isInitialized('online') && null !== $object->getOnline()) { + $data['online'] = $object->getOnline(); + } + $data['presence'] = $object->getPresence(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersGetPresenceGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersGetPresenceGetResponsedefaultNormalizer.php index fdc426d9..1f818140 100644 --- a/generated/Normalizer/UsersGetPresenceGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersGetPresenceGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersGetPresenceGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersGetPresenceGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersGetPresenceGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersGetPresenceGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersGetPresenceGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item0Normalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item0Normalizer.php index db110862..713685e2 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item0Normalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item0Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class UsersIdentityGetResponse200Item0Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User', 'json', $context)); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item0TeamNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item0TeamNormalizer.php index f2c4f668..28864c3d 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item0TeamNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item0TeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item0TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item0TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0Team(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersIdentityGetResponse200Item0TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0Team' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item0UserNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item0UserNormalizer.php index 79c2de99..c6a70af2 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item0UserNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item0UserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item0UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item0UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0User(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersIdentityGetResponse200Item0UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item0User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item0User' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item1Normalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item1Normalizer.php index a736cd7e..c9804662 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item1Normalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item1Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class UsersIdentityGetResponse200Item1Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User', 'json', $context)); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item1TeamNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item1TeamNormalizer.php index 75100e90..eb28f5d6 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item1TeamNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item1TeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item1TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item1TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1Team(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersIdentityGetResponse200Item1TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1Team' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item1UserNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item1UserNormalizer.php index b43fd081..fb24d661 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item1UserNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item1UserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item1UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item1UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1User(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $object->setEmail($data['email']); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('email', $data) && null !== $data['email']) { - $object->setEmail($data['email']); - } elseif (\array_key_exists('email', $data) && null === $data['email']) { - $object->setEmail(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['email'] = $object->getEmail(); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false]; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + } +} else { + class UsersIdentityGetResponse200Item1UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === $type; } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item1User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email', $data) && null !== $data['email']) { + $object->setEmail($data['email']); + } elseif (\array_key_exists('email', $data) && null === $data['email']) { + $object->setEmail(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['email'] = $object->getEmail(); - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['email'] = $object->getEmail(); + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item1User' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item2Normalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item2Normalizer.php index 1c4fac66..744e83ec 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item2Normalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item2Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class UsersIdentityGetResponse200Item2Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User', 'json', $context)); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item2TeamNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item2TeamNormalizer.php index baef686c..41c2b304 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item2TeamNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item2TeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item2TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item2TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2Team(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersIdentityGetResponse200Item2TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2Team' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item2UserNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item2UserNormalizer.php index ad6f61c3..dbe0cd79 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item2UserNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item2UserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,99 +24,195 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item2UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item2UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2User(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { + $object->setImage192($data['image_192']); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); + } + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { + $object->setImage24($data['image_24']); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); + } + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { + $object->setImage32($data['image_32']); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { + $object->setImage512($data['image_512']); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { - $object->setImage192($data['image_192']); - } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { - $object->setImage192(null); - } - if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { - $object->setImage24($data['image_24']); - } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { - $object->setImage24(null); - } - if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { - $object->setImage32($data['image_32']); - } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { - $object->setImage32(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + $data['image_192'] = $object->getImage192(); + $data['image_24'] = $object->getImage24(); + $data['image_32'] = $object->getImage32(); + $data['image_48'] = $object->getImage48(); + $data['image_512'] = $object->getImage512(); + $data['image_72'] = $object->getImage72(); + $data['name'] = $object->getName(); + + return $data; } - if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { - $object->setImage48($data['image_48']); - } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { - $object->setImage48(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false]; } - if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { - $object->setImage512($data['image_512']); - } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { - $object->setImage512(null); + } +} else { + class UsersIdentityGetResponse200Item2UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === $type; } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $object->setImage72($data['image_72']); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' === \get_class($data); } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item2User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { + $object->setImage192($data['image_192']); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); + } + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { + $object->setImage24($data['image_24']); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); + } + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { + $object->setImage32($data['image_32']); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { + $object->setImage512($data['image_512']); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + $data['image_192'] = $object->getImage192(); + $data['image_24'] = $object->getImage24(); + $data['image_32'] = $object->getImage32(); + $data['image_48'] = $object->getImage48(); + $data['image_512'] = $object->getImage512(); + $data['image_72'] = $object->getImage72(); + $data['name'] = $object->getName(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['image_192'] = $object->getImage192(); - $data['image_24'] = $object->getImage24(); - $data['image_32'] = $object->getImage32(); - $data['image_48'] = $object->getImage48(); - $data['image_512'] = $object->getImage512(); - $data['image_72'] = $object->getImage72(); - $data['name'] = $object->getName(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item2User' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item3Normalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item3Normalizer.php index 45bdc91f..145b35da 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item3Normalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item3Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,69 +24,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false]; } - if (\array_key_exists('team', $data) && null !== $data['team']) { - $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team', 'json', $context)); - } elseif (\array_key_exists('team', $data) && null === $data['team']) { - $object->setTeam(null); + } +} else { + class UsersIdentityGetResponse200Item3Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === $type; } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User', 'json', $context)); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('team', $data) && null !== $data['team']) { + $object->setTeam($this->denormalizer->denormalize($data['team'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team', 'json', $context)); + } elseif (\array_key_exists('team', $data) && null === $data['team']) { + $object->setTeam(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User', 'json', $context)); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ok'] = $object->getOk(); - $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + return $object; + } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['team'] = $this->normalizer->normalize($object->getTeam(), 'json', $context); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item3TeamNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item3TeamNormalizer.php index 057c85af..2c967af7 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item3TeamNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item3TeamNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,117 +24,231 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item3TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item3TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3Team(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { + $object->setImage102($data['image_102']); + } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { + $object->setImage102(null); + } + if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { + $object->setImage132($data['image_132']); + } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { + $object->setImage132(null); + } + if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { + $object->setImage230($data['image_230']); + } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { + $object->setImage230(null); + } + if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { + $object->setImage34($data['image_34']); + } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { + $object->setImage34(null); + } + if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { + $object->setImage44($data['image_44']); + } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { + $object->setImage44(null); + } + if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { + $object->setImage68($data['image_68']); + } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { + $object->setImage68(null); + } + if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { + $object->setImage88($data['image_88']); + } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { + $object->setImage88(null); + } + if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { + $object->setImageDefault($data['image_default']); + } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { + $object->setImageDefault(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { - $object->setImage102($data['image_102']); - } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { - $object->setImage102(null); - } - if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { - $object->setImage132($data['image_132']); - } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { - $object->setImage132(null); - } - if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { - $object->setImage230($data['image_230']); - } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { - $object->setImage230(null); - } - if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { - $object->setImage34($data['image_34']); - } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { - $object->setImage34(null); - } - if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { - $object->setImage44($data['image_44']); - } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { - $object->setImage44(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['domain'] = $object->getDomain(); + $data['id'] = $object->getId(); + $data['image_102'] = $object->getImage102(); + $data['image_132'] = $object->getImage132(); + $data['image_230'] = $object->getImage230(); + $data['image_34'] = $object->getImage34(); + $data['image_44'] = $object->getImage44(); + $data['image_68'] = $object->getImage68(); + $data['image_88'] = $object->getImage88(); + $data['image_default'] = $object->getImageDefault(); + $data['name'] = $object->getName(); + + return $data; } - if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { - $object->setImage68($data['image_68']); - } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { - $object->setImage68(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false]; } - if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { - $object->setImage88($data['image_88']); - } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { - $object->setImage88(null); + } +} else { + class UsersIdentityGetResponse200Item3TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === $type; } - if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { - $object->setImageDefault($data['image_default']); - } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { - $object->setImageDefault(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' === \get_class($data); } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3Team(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('image_102', $data) && null !== $data['image_102']) { + $object->setImage102($data['image_102']); + } elseif (\array_key_exists('image_102', $data) && null === $data['image_102']) { + $object->setImage102(null); + } + if (\array_key_exists('image_132', $data) && null !== $data['image_132']) { + $object->setImage132($data['image_132']); + } elseif (\array_key_exists('image_132', $data) && null === $data['image_132']) { + $object->setImage132(null); + } + if (\array_key_exists('image_230', $data) && null !== $data['image_230']) { + $object->setImage230($data['image_230']); + } elseif (\array_key_exists('image_230', $data) && null === $data['image_230']) { + $object->setImage230(null); + } + if (\array_key_exists('image_34', $data) && null !== $data['image_34']) { + $object->setImage34($data['image_34']); + } elseif (\array_key_exists('image_34', $data) && null === $data['image_34']) { + $object->setImage34(null); + } + if (\array_key_exists('image_44', $data) && null !== $data['image_44']) { + $object->setImage44($data['image_44']); + } elseif (\array_key_exists('image_44', $data) && null === $data['image_44']) { + $object->setImage44(null); + } + if (\array_key_exists('image_68', $data) && null !== $data['image_68']) { + $object->setImage68($data['image_68']); + } elseif (\array_key_exists('image_68', $data) && null === $data['image_68']) { + $object->setImage68(null); + } + if (\array_key_exists('image_88', $data) && null !== $data['image_88']) { + $object->setImage88($data['image_88']); + } elseif (\array_key_exists('image_88', $data) && null === $data['image_88']) { + $object->setImage88(null); + } + if (\array_key_exists('image_default', $data) && null !== $data['image_default']) { + $object->setImageDefault($data['image_default']); + } elseif (\array_key_exists('image_default', $data) && null === $data['image_default']) { + $object->setImageDefault(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['domain'] = $object->getDomain(); + $data['id'] = $object->getId(); + $data['image_102'] = $object->getImage102(); + $data['image_132'] = $object->getImage132(); + $data['image_230'] = $object->getImage230(); + $data['image_34'] = $object->getImage34(); + $data['image_44'] = $object->getImage44(); + $data['image_68'] = $object->getImage68(); + $data['image_88'] = $object->getImage88(); + $data['image_default'] = $object->getImageDefault(); + $data['name'] = $object->getName(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['domain'] = $object->getDomain(); - $data['id'] = $object->getId(); - $data['image_102'] = $object->getImage102(); - $data['image_132'] = $object->getImage132(); - $data['image_230'] = $object->getImage230(); - $data['image_34'] = $object->getImage34(); - $data['image_44'] = $object->getImage44(); - $data['image_68'] = $object->getImage68(); - $data['image_88'] = $object->getImage88(); - $data['image_default'] = $object->getImageDefault(); - $data['name'] = $object->getName(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3Team' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponse200Item3UserNormalizer.php b/generated/Normalizer/UsersIdentityGetResponse200Item3UserNormalizer.php index e6f1d7ed..cb96f34e 100644 --- a/generated/Normalizer/UsersIdentityGetResponse200Item3UserNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponse200Item3UserNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponse200Item3UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponse200Item3UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3User(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + return $object; } - if (\array_key_exists('id', $data) && null !== $data['id']) { - $object->setId($data['id']); - } elseif (\array_key_exists('id', $data) && null === $data['id']) { - $object->setId(null); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersIdentityGetResponse200Item3UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponse200Item3User(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && null !== $data['id']) { + $object->setId($data['id']); + } elseif (\array_key_exists('id', $data) && null === $data['id']) { + $object->setId(null); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['id'] = $object->getId(); + $data['name'] = $object->getName(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponse200Item3User' => false]; + } } } diff --git a/generated/Normalizer/UsersIdentityGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersIdentityGetResponsedefaultNormalizer.php index 02c7372c..920b18b4 100644 --- a/generated/Normalizer/UsersIdentityGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersIdentityGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersIdentityGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersIdentityGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersIdentityGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersIdentityGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersIdentityGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersInfoGetResponse200Normalizer.php b/generated/Normalizer/UsersInfoGetResponse200Normalizer.php index c9f47315..4d0dc2ee 100644 --- a/generated/Normalizer/UsersInfoGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersInfoGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); - unset($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersInfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersInfoGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersInfoGetResponsedefaultNormalizer.php index 2c5cb67f..c7657ff1 100644 --- a/generated/Normalizer/UsersInfoGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersInfoGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersInfoGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersInfoGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersInfoGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersListGetResponse200Normalizer.php b/generated/Normalizer/UsersListGetResponse200Normalizer.php index 27b38225..84279f0c 100644 --- a/generated/Normalizer/UsersListGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersListGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,85 +24,167 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersListGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('cache_ts', $data) && null !== $data['cache_ts']) { + $object->setCacheTs($data['cache_ts']); + } elseif (\array_key_exists('cache_ts', $data) && null === $data['cache_ts']) { + $object->setCacheTs(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context); + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } + return $object; } - if (\array_key_exists('cache_ts', $data) && null !== $data['cache_ts']) { - $object->setCacheTs($data['cache_ts']); - } elseif (\array_key_exists('cache_ts', $data) && null === $data['cache_ts']) { - $object->setCacheTs(null); - } - if (\array_key_exists('members', $data) && null !== $data['members']) { + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['cache_ts'] = $object->getCacheTs(); $values = []; - foreach ($data['members'] as $value) { - $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context); + foreach ($object->getMembers() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $object->setMembers($values); - } elseif (\array_key_exists('members', $data) && null === $data['members']) { - $object->setMembers(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { - $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); - } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { - $object->setResponseMetadata(null); + $data['members'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersListGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['cache_ts'] = $object->getCacheTs(); - $values = []; - foreach ($object->getMembers() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === $type; } - $data['members'] = $values; - $data['ok'] = $object->getOk(); - if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { - $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' === \get_class($data); } - return $data; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersListGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('cache_ts', $data) && null !== $data['cache_ts']) { + $object->setCacheTs($data['cache_ts']); + } elseif (\array_key_exists('cache_ts', $data) && null === $data['cache_ts']) { + $object->setCacheTs(null); + } + if (\array_key_exists('members', $data) && null !== $data['members']) { + $values = []; + foreach ($data['members'] as $value) { + $values[] = $this->denormalizer->denormalize($value, 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context); + } + $object->setMembers($values); + } elseif (\array_key_exists('members', $data) && null === $data['members']) { + $object->setMembers(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('response_metadata', $data) && null !== $data['response_metadata']) { + $object->setResponseMetadata($this->denormalizer->denormalize($data['response_metadata'], 'JoliCode\\Slack\\Api\\Model\\ObjsResponseMetadata', 'json', $context)); + } elseif (\array_key_exists('response_metadata', $data) && null === $data['response_metadata']) { + $object->setResponseMetadata(null); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false]; + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['cache_ts'] = $object->getCacheTs(); + $values = []; + foreach ($object->getMembers() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['members'] = $values; + $data['ok'] = $object->getOk(); + if ($object->isInitialized('responseMetadata') && null !== $object->getResponseMetadata()) { + $data['response_metadata'] = $this->normalizer->normalize($object->getResponseMetadata(), 'json', $context); + } + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersListGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersListGetResponsedefaultNormalizer.php index 2b158e22..4a0439f0 100644 --- a/generated/Normalizer/UsersListGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersListGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersListGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersListGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersListGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersLookupByEmailGetResponse200Normalizer.php b/generated/Normalizer/UsersLookupByEmailGetResponse200Normalizer.php index 55b9e5ea..7045627b 100644 --- a/generated/Normalizer/UsersLookupByEmailGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersLookupByEmailGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,75 +24,147 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersLookupByEmailGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersLookupByEmailGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('user', $data) && null !== $data['user']) { - $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); - unset($data['user']); - } elseif (\array_key_exists('user', $data) && null === $data['user']) { - $object->setUser(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersLookupByEmailGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('user', $data) && null !== $data['user']) { + $object->setUser($this->denormalizer->denormalize($data['user'], 'JoliCode\\Slack\\Api\\Model\\ObjsUser', 'json', $context)); + unset($data['user']); + } elseif (\array_key_exists('user', $data) && null === $data['user']) { + $object->setUser(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersLookupByEmailGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersLookupByEmailGetResponsedefaultNormalizer.php index c4f48879..398120c9 100644 --- a/generated/Normalizer/UsersLookupByEmailGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersLookupByEmailGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersLookupByEmailGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersLookupByEmailGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersLookupByEmailGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersLookupByEmailGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersLookupByEmailGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersProfileGetGetResponse200Normalizer.php b/generated/Normalizer/UsersProfileGetGetResponse200Normalizer.php index 3244c629..5a490b1e 100644 --- a/generated/Normalizer/UsersProfileGetGetResponse200Normalizer.php +++ b/generated/Normalizer/UsersProfileGetGetResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('profile', $data) && null !== $data['profile']) { - $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); - } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { - $object->setProfile(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersProfileGetGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersProfileGetGetResponsedefaultNormalizer.php b/generated/Normalizer/UsersProfileGetGetResponsedefaultNormalizer.php index 27024f59..4a05c17a 100644 --- a/generated/Normalizer/UsersProfileGetGetResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersProfileGetGetResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersProfileGetGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileGetGetResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileGetGetResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersProfileSetPostResponse200Normalizer.php b/generated/Normalizer/UsersProfileSetPostResponse200Normalizer.php index 029a5a6e..b7fe19b9 100644 --- a/generated/Normalizer/UsersProfileSetPostResponse200Normalizer.php +++ b/generated/Normalizer/UsersProfileSetPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,77 +24,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersProfileSetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersProfileSetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email_pending', $data) && null !== $data['email_pending']) { + $object->setEmailPending($data['email_pending']); + } elseif (\array_key_exists('email_pending', $data) && null === $data['email_pending']) { + $object->setEmailPending(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } + return $object; } - if (\array_key_exists('email_pending', $data) && null !== $data['email_pending']) { - $object->setEmailPending($data['email_pending']); - } elseif (\array_key_exists('email_pending', $data) && null === $data['email_pending']) { - $object->setEmailPending(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('emailPending') && null !== $object->getEmailPending()) { + $data['email_pending'] = $object->getEmailPending(); + } + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + $data['username'] = $object->getUsername(); + + return $data; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false]; } - if (\array_key_exists('profile', $data) && null !== $data['profile']) { - $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); - } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { - $object->setProfile(null); + } +} else { + class UsersProfileSetPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === $type; } - if (\array_key_exists('username', $data) && null !== $data['username']) { - $object->setUsername($data['username']); - } elseif (\array_key_exists('username', $data) && null === $data['username']) { - $object->setUsername(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' === \get_class($data); } - return $object; - } + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('email_pending', $data) && null !== $data['email_pending']) { + $object->setEmailPending($data['email_pending']); + } elseif (\array_key_exists('email_pending', $data) && null === $data['email_pending']) { + $object->setEmailPending(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\ObjsUserProfile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + if (\array_key_exists('username', $data) && null !== $data['username']) { + $object->setUsername($data['username']); + } elseif (\array_key_exists('username', $data) && null === $data['username']) { + $object->setUsername(null); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('emailPending') && null !== $object->getEmailPending()) { - $data['email_pending'] = $object->getEmailPending(); + return $object; } - $data['ok'] = $object->getOk(); - $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); - $data['username'] = $object->getUsername(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('emailPending') && null !== $object->getEmailPending()) { + $data['email_pending'] = $object->getEmailPending(); + } + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + $data['username'] = $object->getUsername(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersProfileSetPostResponsedefaultNormalizer.php b/generated/Normalizer/UsersProfileSetPostResponsedefaultNormalizer.php index 4056e543..64e885cf 100644 --- a/generated/Normalizer/UsersProfileSetPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersProfileSetPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersProfileSetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersProfileSetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersProfileSetPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersProfileSetPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersProfileSetPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersSetActivePostResponse200Normalizer.php b/generated/Normalizer/UsersSetActivePostResponse200Normalizer.php index 2bf01678..85938492 100644 --- a/generated/Normalizer/UsersSetActivePostResponse200Normalizer.php +++ b/generated/Normalizer/UsersSetActivePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetActivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetActivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersSetActivePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersSetActivePostResponsedefaultNormalizer.php b/generated/Normalizer/UsersSetActivePostResponsedefaultNormalizer.php index b0346a22..bab58aa0 100644 --- a/generated/Normalizer/UsersSetActivePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersSetActivePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetActivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetActivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersSetActivePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetActivePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetActivePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersSetPhotoPostResponse200Normalizer.php b/generated/Normalizer/UsersSetPhotoPostResponse200Normalizer.php index c716829c..e25e51c0 100644 --- a/generated/Normalizer/UsersSetPhotoPostResponse200Normalizer.php +++ b/generated/Normalizer/UsersSetPhotoPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,63 +24,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetPhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetPhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('profile', $data) && null !== $data['profile']) { - $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile', 'json', $context)); - } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { - $object->setProfile(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersSetPhotoPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('profile', $data) && null !== $data['profile']) { + $object->setProfile($this->denormalizer->denormalize($data['profile'], 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile', 'json', $context)); + } elseif (\array_key_exists('profile', $data) && null === $data['profile']) { + $object->setProfile(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + $data['profile'] = $this->normalizer->normalize($object->getProfile(), 'json', $context); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersSetPhotoPostResponse200ProfileNormalizer.php b/generated/Normalizer/UsersSetPhotoPostResponse200ProfileNormalizer.php index 55d7cdd8..f6af393e 100644 --- a/generated/Normalizer/UsersSetPhotoPostResponse200ProfileNormalizer.php +++ b/generated/Normalizer/UsersSetPhotoPostResponse200ProfileNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,105 +24,207 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetPhotoPostResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetPhotoPostResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200Profile(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200Profile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { + $object->setImage1024($data['image_1024']); + } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { + $object->setImage1024(null); + } + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { + $object->setImage192($data['image_192']); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); + } + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { + $object->setImage24($data['image_24']); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); + } + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { + $object->setImage32($data['image_32']); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { + $object->setImage512($data['image_512']); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { + $object->setImageOriginal($data['image_original']); + } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { + $object->setImageOriginal(null); + } + return $object; } - if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { - $object->setAvatarHash($data['avatar_hash']); - } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { - $object->setAvatarHash(null); - } - if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { - $object->setImage1024($data['image_1024']); - } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { - $object->setImage1024(null); - } - if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { - $object->setImage192($data['image_192']); - } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { - $object->setImage192(null); - } - if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { - $object->setImage24($data['image_24']); - } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { - $object->setImage24(null); - } - if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { - $object->setImage32($data['image_32']); - } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { - $object->setImage32(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['avatar_hash'] = $object->getAvatarHash(); + $data['image_1024'] = $object->getImage1024(); + $data['image_192'] = $object->getImage192(); + $data['image_24'] = $object->getImage24(); + $data['image_32'] = $object->getImage32(); + $data['image_48'] = $object->getImage48(); + $data['image_512'] = $object->getImage512(); + $data['image_72'] = $object->getImage72(); + $data['image_original'] = $object->getImageOriginal(); + + return $data; } - if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { - $object->setImage48($data['image_48']); - } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { - $object->setImage48(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false]; } - if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { - $object->setImage512($data['image_512']); - } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { - $object->setImage512(null); + } +} else { + class UsersSetPhotoPostResponse200ProfileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === $type; } - if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { - $object->setImage72($data['image_72']); - } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { - $object->setImage72(null); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' === \get_class($data); } - if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { - $object->setImageOriginal($data['image_original']); - } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { - $object->setImageOriginal(null); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponse200Profile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('avatar_hash', $data) && null !== $data['avatar_hash']) { + $object->setAvatarHash($data['avatar_hash']); + } elseif (\array_key_exists('avatar_hash', $data) && null === $data['avatar_hash']) { + $object->setAvatarHash(null); + } + if (\array_key_exists('image_1024', $data) && null !== $data['image_1024']) { + $object->setImage1024($data['image_1024']); + } elseif (\array_key_exists('image_1024', $data) && null === $data['image_1024']) { + $object->setImage1024(null); + } + if (\array_key_exists('image_192', $data) && null !== $data['image_192']) { + $object->setImage192($data['image_192']); + } elseif (\array_key_exists('image_192', $data) && null === $data['image_192']) { + $object->setImage192(null); + } + if (\array_key_exists('image_24', $data) && null !== $data['image_24']) { + $object->setImage24($data['image_24']); + } elseif (\array_key_exists('image_24', $data) && null === $data['image_24']) { + $object->setImage24(null); + } + if (\array_key_exists('image_32', $data) && null !== $data['image_32']) { + $object->setImage32($data['image_32']); + } elseif (\array_key_exists('image_32', $data) && null === $data['image_32']) { + $object->setImage32(null); + } + if (\array_key_exists('image_48', $data) && null !== $data['image_48']) { + $object->setImage48($data['image_48']); + } elseif (\array_key_exists('image_48', $data) && null === $data['image_48']) { + $object->setImage48(null); + } + if (\array_key_exists('image_512', $data) && null !== $data['image_512']) { + $object->setImage512($data['image_512']); + } elseif (\array_key_exists('image_512', $data) && null === $data['image_512']) { + $object->setImage512(null); + } + if (\array_key_exists('image_72', $data) && null !== $data['image_72']) { + $object->setImage72($data['image_72']); + } elseif (\array_key_exists('image_72', $data) && null === $data['image_72']) { + $object->setImage72(null); + } + if (\array_key_exists('image_original', $data) && null !== $data['image_original']) { + $object->setImageOriginal($data['image_original']); + } elseif (\array_key_exists('image_original', $data) && null === $data['image_original']) { + $object->setImageOriginal(null); + } + + return $object; } - return $object; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['avatar_hash'] = $object->getAvatarHash(); + $data['image_1024'] = $object->getImage1024(); + $data['image_192'] = $object->getImage192(); + $data['image_24'] = $object->getImage24(); + $data['image_32'] = $object->getImage32(); + $data['image_48'] = $object->getImage48(); + $data['image_512'] = $object->getImage512(); + $data['image_72'] = $object->getImage72(); + $data['image_original'] = $object->getImageOriginal(); - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['avatar_hash'] = $object->getAvatarHash(); - $data['image_1024'] = $object->getImage1024(); - $data['image_192'] = $object->getImage192(); - $data['image_24'] = $object->getImage24(); - $data['image_32'] = $object->getImage32(); - $data['image_48'] = $object->getImage48(); - $data['image_512'] = $object->getImage512(); - $data['image_72'] = $object->getImage72(); - $data['image_original'] = $object->getImageOriginal(); - - return $data; - } + return $data; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false]; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponse200Profile' => false]; + } } } diff --git a/generated/Normalizer/UsersSetPhotoPostResponsedefaultNormalizer.php b/generated/Normalizer/UsersSetPhotoPostResponsedefaultNormalizer.php index 65ea1834..dbb43a54 100644 --- a/generated/Normalizer/UsersSetPhotoPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersSetPhotoPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,95 +24,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetPhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetPhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('debug_step', $data) && null !== $data['debug_step']) { + $object->setDebugStep($data['debug_step']); + } elseif (\array_key_exists('debug_step', $data) && null === $data['debug_step']) { + $object->setDebugStep(null); + } + if (\array_key_exists('dims', $data) && null !== $data['dims']) { + $object->setDims($data['dims']); + } elseif (\array_key_exists('dims', $data) && null === $data['dims']) { + $object->setDims(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('time_ident', $data) && null !== $data['time_ident']) { + $object->setTimeIdent($data['time_ident']); + } elseif (\array_key_exists('time_ident', $data) && null === $data['time_ident']) { + $object->setTimeIdent(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); - } - if (\array_key_exists('debug_step', $data) && null !== $data['debug_step']) { - $object->setDebugStep($data['debug_step']); - } elseif (\array_key_exists('debug_step', $data) && null === $data['debug_step']) { - $object->setDebugStep(null); - } - if (\array_key_exists('dims', $data) && null !== $data['dims']) { - $object->setDims($data['dims']); - } elseif (\array_key_exists('dims', $data) && null === $data['dims']) { - $object->setDims(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - if (\array_key_exists('time_ident', $data) && null !== $data['time_ident']) { - $object->setTimeIdent($data['time_ident']); - } elseif (\array_key_exists('time_ident', $data) && null === $data['time_ident']) { - $object->setTimeIdent(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('debugStep') && null !== $object->getDebugStep()) { + $data['debug_step'] = $object->getDebugStep(); + } + if ($object->isInitialized('dims') && null !== $object->getDims()) { + $data['dims'] = $object->getDims(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('timeIdent') && null !== $object->getTimeIdent()) { + $data['time_ident'] = $object->getTimeIdent(); + } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersSetPhotoPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); - } - if ($object->isInitialized('debugStep') && null !== $object->getDebugStep()) { - $data['debug_step'] = $object->getDebugStep(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === $type; } - if ($object->isInitialized('dims') && null !== $object->getDims()) { - $data['dims'] = $object->getDims(); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' === \get_class($data); } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - if ($object->isInitialized('timeIdent') && null !== $object->getTimeIdent()) { - $data['time_ident'] = $object->getTimeIdent(); + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPhotoPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('debug_step', $data) && null !== $data['debug_step']) { + $object->setDebugStep($data['debug_step']); + } elseif (\array_key_exists('debug_step', $data) && null === $data['debug_step']) { + $object->setDebugStep(null); + } + if (\array_key_exists('dims', $data) && null !== $data['dims']) { + $object->setDims($data['dims']); + } elseif (\array_key_exists('dims', $data) && null === $data['dims']) { + $object->setDims(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + if (\array_key_exists('time_ident', $data) && null !== $data['time_ident']) { + $object->setTimeIdent($data['time_ident']); + } elseif (\array_key_exists('time_ident', $data) && null === $data['time_ident']) { + $object->setTimeIdent(null); + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + if ($object->isInitialized('debugStep') && null !== $object->getDebugStep()) { + $data['debug_step'] = $object->getDebugStep(); + } + if ($object->isInitialized('dims') && null !== $object->getDims()) { + $data['dims'] = $object->getDims(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + if ($object->isInitialized('timeIdent') && null !== $object->getTimeIdent()) { + $data['time_ident'] = $object->getTimeIdent(); + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPhotoPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/UsersSetPresencePostResponse200Normalizer.php b/generated/Normalizer/UsersSetPresencePostResponse200Normalizer.php index 55d686f1..4d4ba185 100644 --- a/generated/Normalizer/UsersSetPresencePostResponse200Normalizer.php +++ b/generated/Normalizer/UsersSetPresencePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,57 +24,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetPresencePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetPresencePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class UsersSetPresencePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - return $data; - } + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === $type; + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false]; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; + } + + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/UsersSetPresencePostResponsedefaultNormalizer.php b/generated/Normalizer/UsersSetPresencePostResponsedefaultNormalizer.php index 3ab788aa..ff979d47 100644 --- a/generated/Normalizer/UsersSetPresencePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/UsersSetPresencePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,71 +24,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class UsersSetPresencePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class UsersSetPresencePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === $type; - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === \get_class($data); - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + return $object; } - if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { - $object->setCallstack($data['callstack']); - } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { - $object->setCallstack(null); + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); + + return $data; } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false]; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); + } +} else { + class UsersSetPresencePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === $type; } - return $object; - } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' === \get_class($data); + } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { - $data['callstack'] = $object->getCallstack(); + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\UsersSetPresencePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('callstack', $data) && null !== $data['callstack']) { + $object->setCallstack($data['callstack']); + } elseif (\array_key_exists('callstack', $data) && null === $data['callstack']) { + $object->setCallstack(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + + return $object; } - $data['error'] = $object->getError(); - $data['ok'] = $object->getOk(); - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('callstack') && null !== $object->getCallstack()) { + $data['callstack'] = $object->getCallstack(); + } + $data['error'] = $object->getError(); + $data['ok'] = $object->getOk(); - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\UsersSetPresencePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ViewsOpenPostResponse200Normalizer.php b/generated/Normalizer/ViewsOpenPostResponse200Normalizer.php index 9f5da217..601dc6a4 100644 --- a/generated/Normalizer/ViewsOpenPostResponse200Normalizer.php +++ b/generated/Normalizer/ViewsOpenPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsOpenPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ViewsOpenPostResponsedefaultNormalizer.php b/generated/Normalizer/ViewsOpenPostResponsedefaultNormalizer.php index 19516932..34721097 100644 --- a/generated/Normalizer/ViewsOpenPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ViewsOpenPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsOpenPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsOpenPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsOpenPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ViewsPublishPostResponse200Normalizer.php b/generated/Normalizer/ViewsPublishPostResponse200Normalizer.php index bc4bc4b4..58e90960 100644 --- a/generated/Normalizer/ViewsPublishPostResponse200Normalizer.php +++ b/generated/Normalizer/ViewsPublishPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsPublishPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsPublishPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsPublishPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ViewsPublishPostResponsedefaultNormalizer.php b/generated/Normalizer/ViewsPublishPostResponsedefaultNormalizer.php index 66686882..9b601153 100644 --- a/generated/Normalizer/ViewsPublishPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ViewsPublishPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsPublishPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsPublishPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsPublishPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPublishPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPublishPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ViewsPushPostResponse200Normalizer.php b/generated/Normalizer/ViewsPushPostResponse200Normalizer.php index fc67ac4f..7b1b5242 100644 --- a/generated/Normalizer/ViewsPushPostResponse200Normalizer.php +++ b/generated/Normalizer/ViewsPushPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsPushPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsPushPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsPushPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ViewsPushPostResponsedefaultNormalizer.php b/generated/Normalizer/ViewsPushPostResponsedefaultNormalizer.php index 6aa561a4..369c90b1 100644 --- a/generated/Normalizer/ViewsPushPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ViewsPushPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsPushPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsPushPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsPushPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsPushPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsPushPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/ViewsUpdatePostResponse200Normalizer.php b/generated/Normalizer/ViewsUpdatePostResponse200Normalizer.php index 59a538a4..cfc44638 100644 --- a/generated/Normalizer/ViewsUpdatePostResponse200Normalizer.php +++ b/generated/Normalizer/ViewsUpdatePostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponse200' => false]; + } } } diff --git a/generated/Normalizer/ViewsUpdatePostResponsedefaultNormalizer.php b/generated/Normalizer/ViewsUpdatePostResponsedefaultNormalizer.php index ca44e627..be85d5bb 100644 --- a/generated/Normalizer/ViewsUpdatePostResponsedefaultNormalizer.php +++ b/generated/Normalizer/ViewsUpdatePostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ViewsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class ViewsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class ViewsUpdatePostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\ViewsUpdatePostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\ViewsUpdatePostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsStepCompletedPostResponse200Normalizer.php b/generated/Normalizer/WorkflowsStepCompletedPostResponse200Normalizer.php index 8bb1d277..0094e3de 100644 --- a/generated/Normalizer/WorkflowsStepCompletedPostResponse200Normalizer.php +++ b/generated/Normalizer/WorkflowsStepCompletedPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsStepCompletedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsStepCompletedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsStepCompletedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsStepCompletedPostResponsedefaultNormalizer.php b/generated/Normalizer/WorkflowsStepCompletedPostResponsedefaultNormalizer.php index 0c755803..bccc59ca 100644 --- a/generated/Normalizer/WorkflowsStepCompletedPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/WorkflowsStepCompletedPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsStepCompletedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsStepCompletedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsStepCompletedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepCompletedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepCompletedPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsStepFailedPostResponse200Normalizer.php b/generated/Normalizer/WorkflowsStepFailedPostResponse200Normalizer.php index 2672dbbe..76bf702a 100644 --- a/generated/Normalizer/WorkflowsStepFailedPostResponse200Normalizer.php +++ b/generated/Normalizer/WorkflowsStepFailedPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsStepFailedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsStepFailedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsStepFailedPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsStepFailedPostResponsedefaultNormalizer.php b/generated/Normalizer/WorkflowsStepFailedPostResponsedefaultNormalizer.php index fcf0eae2..37907363 100644 --- a/generated/Normalizer/WorkflowsStepFailedPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/WorkflowsStepFailedPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsStepFailedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsStepFailedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsStepFailedPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsStepFailedPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsStepFailedPostResponsedefault' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsUpdateStepPostResponse200Normalizer.php b/generated/Normalizer/WorkflowsUpdateStepPostResponse200Normalizer.php index c08e60e3..d0b21262 100644 --- a/generated/Normalizer/WorkflowsUpdateStepPostResponse200Normalizer.php +++ b/generated/Normalizer/WorkflowsUpdateStepPostResponse200Normalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsUpdateStepPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsUpdateStepPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponse200(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsUpdateStepPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponse200' => false]; + } } } diff --git a/generated/Normalizer/WorkflowsUpdateStepPostResponsedefaultNormalizer.php b/generated/Normalizer/WorkflowsUpdateStepPostResponsedefaultNormalizer.php index 56c4a1b2..d2defc28 100644 --- a/generated/Normalizer/WorkflowsUpdateStepPostResponsedefaultNormalizer.php +++ b/generated/Normalizer/WorkflowsUpdateStepPostResponsedefaultNormalizer.php @@ -16,6 +16,7 @@ use Jane\Component\JsonSchemaRuntime\Reference; use JoliCode\Slack\Api\Runtime\Normalizer\CheckArray; use JoliCode\Slack\Api\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -23,68 +24,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class WorkflowsUpdateStepPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface -{ - use CheckArray; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool +if (!class_exists(Kernel::class) || (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4)) { + class WorkflowsUpdateStepPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === $type; - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === \get_class($data); - } + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; - public function denormalize($data, $class, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === $type; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === \get_class($data); } - $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponsedefault(); - if (null === $data || false === \is_array($data)) { + + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + return $object; } - if (\array_key_exists('ok', $data) && null !== $data['ok']) { - $object->setOk($data['ok']); - unset($data['ok']); - } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { - $object->setOk(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } + + return $data; } - return $object; + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false]; + } } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) +} else { + class WorkflowsUpdateStepPostResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = []; - $data['ok'] = $object->getOk(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; + use CheckArray; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use ValidatorTrait; + + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === $type; + } + + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' === \get_class($data); + } + + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \JoliCode\Slack\Api\Model\WorkflowsUpdateStepPostResponsedefault(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ok', $data) && null !== $data['ok']) { + $object->setOk($data['ok']); + unset($data['ok']); + } elseif (\array_key_exists('ok', $data) && null === $data['ok']) { + $object->setOk(null); } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } + } + + return $object; } - return $data; - } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ok'] = $object->getOk(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } - public function getSupportedTypes(string $format = null): array - { - return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false]; + return $data; + } + + public function getSupportedTypes(string $format = null): array + { + return ['JoliCode\\Slack\\Api\\Model\\WorkflowsUpdateStepPostResponsedefault' => false]; + } } } diff --git a/generated/Runtime/Client/BaseEndpoint.php b/generated/Runtime/Client/BaseEndpoint.php index b4e9ae15..a966bf90 100644 --- a/generated/Runtime/Client/BaseEndpoint.php +++ b/generated/Runtime/Client/BaseEndpoint.php @@ -20,6 +20,7 @@ abstract class BaseEndpoint implements Endpoint { + protected $formParameters = []; protected $queryParameters = []; protected $headerParameters = []; protected $body; diff --git a/generated/Runtime/Client/Client.php b/generated/Runtime/Client/Client.php index eb67bb8e..86347e2b 100644 --- a/generated/Runtime/Client/Client.php +++ b/generated/Runtime/Client/Client.php @@ -86,7 +86,7 @@ private function processEndpoint(Endpoint $endpoint): ResponseInterface } } foreach ($endpoint->getHeaders($bodyHeaders) as $name => $value) { - $request = $request->withHeader($name, $value); + $request = $request->withHeader($name, !\is_bool($value) ? $value : ($value ? 'true' : 'false')); } if (\count($endpoint->getAuthenticationScopes()) > 0) { $scopes = []; diff --git a/generated/Runtime/Normalizer/ReferenceNormalizer.php b/generated/Runtime/Normalizer/ReferenceNormalizer.php index 27348285..494ee19d 100644 --- a/generated/Runtime/Normalizer/ReferenceNormalizer.php +++ b/generated/Runtime/Normalizer/ReferenceNormalizer.php @@ -14,20 +14,39 @@ namespace JoliCode\Slack\Api\Runtime\Normalizer; use Jane\Component\JsonSchemaRuntime\Reference; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ReferenceNormalizer implements NormalizerInterface -{ - public function normalize($object, $format = null, array $context = []) +if (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4) { + class ReferenceNormalizer implements NormalizerInterface { - $ref = []; - $ref['$ref'] = (string) $object->getReferenceUri(); + public function normalize(mixed $object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + { + $ref = []; + $ref['$ref'] = (string) $object->getReferenceUri(); - return $ref; - } + return $ref; + } - public function supportsNormalization($data, $format = null): bool + public function supportsNormalization($data, $format = null): bool + { + return $data instanceof Reference; + } + } +} else { + class ReferenceNormalizer implements NormalizerInterface { - return $data instanceof Reference; + public function normalize($object, $format = null, array $context = []) + { + $ref = []; + $ref['$ref'] = (string) $object->getReferenceUri(); + + return $ref; + } + + public function supportsNormalization($data, $format = null): bool + { + return $data instanceof Reference; + } } } diff --git a/generated/Runtime/Normalizer/ValidatorTrait.php b/generated/Runtime/Normalizer/ValidatorTrait.php index 12f106f9..a079894a 100644 --- a/generated/Runtime/Normalizer/ValidatorTrait.php +++ b/generated/Runtime/Normalizer/ValidatorTrait.php @@ -14,12 +14,13 @@ namespace JoliCode\Slack\Api\Runtime\Normalizer; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Validation; trait ValidatorTrait { protected function validate(array $data, Constraint $constraint): void { - $validator = \Symfony\Component\Validator\Validation::createValidator(); + $validator = Validation::createValidator(); $violations = $validator->validate($data, $constraint); if ($violations->count() > 0) { throw new ValidationException($violations);