From 8a6f60c7e457a2a38d5f0e3653fcab594f84fe78 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:24:45 +0000 Subject: [PATCH 1/5] Initial plan From c40d29da42eef600c555702dfcb562b20c40ff0f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:36:19 +0000 Subject: [PATCH 2/5] Update dependencies to Jackson 3.0.4 and fix package imports Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com> --- pom.xml | 24 ++++++++----------- src/main/java/com/twilio/base/Page.java | 4 ++-- .../com/twilio/base/TokenPaginationPage.java | 4 ++-- .../java/com/twilio/converter/Converter.java | 10 ++++---- .../converter/CurrencyDeserializer.java | 12 +++++----- .../twilio/converter/ISO8601Deserializer.java | 11 ++++----- .../converter/LocalDateDeserializer.java | 12 +++++----- .../twilio/converter/RFC2822Deserializer.java | 12 +++++----- .../java/com/twilio/converter/Serializer.java | 12 ++++------ .../ZonedDateTimeListDeserializer.java | 14 +++++------ .../com/twilio/exception/RestException.java | 8 +++---- .../exception/RestStandardException.java | 8 +++---- .../com/twilio/http/TwilioRestClient.java | 11 +++------ .../com/twilio/jwt/taskrouter/Policy.java | 2 +- .../rest/accounts/v1/AuthTokenPromotion.java | 21 +++++++--------- .../twilio/rest/accounts/v1/BulkConsents.java | 19 +++++++-------- .../twilio/rest/accounts/v1/BulkContacts.java | 19 +++++++-------- .../accounts/v1/MessagingGeopermissions.java | 19 +++++++-------- .../com/twilio/rest/accounts/v1/Safelist.java | 19 +++++++-------- .../rest/accounts/v1/SecondaryAuthToken.java | 21 +++++++--------- .../rest/accounts/v1/credential/Aws.java | 21 +++++++--------- .../accounts/v1/credential/PublicKey.java | 21 +++++++--------- .../com/twilio/rest/api/v2010/Account.java | 21 +++++++--------- .../rest/api/v2010/account/Address.java | 21 +++++++--------- .../rest/api/v2010/account/Application.java | 21 +++++++--------- .../v2010/account/AuthorizedConnectApp.java | 19 +++++++-------- .../account/AvailablePhoneNumberCountry.java | 19 +++++++-------- .../rest/api/v2010/account/Balance.java | 19 +++++++-------- .../twilio/rest/api/v2010/account/Call.java | 21 +++++++--------- .../rest/api/v2010/account/Conference.java | 21 +++++++--------- .../rest/api/v2010/account/ConnectApp.java | 19 +++++++-------- .../v2010/account/IncomingPhoneNumber.java | 21 +++++++--------- .../twilio/rest/api/v2010/account/Key.java | 21 +++++++--------- .../rest/api/v2010/account/Message.java | 21 +++++++--------- .../twilio/rest/api/v2010/account/NewKey.java | 21 +++++++--------- .../rest/api/v2010/account/NewSigningKey.java | 21 +++++++--------- .../rest/api/v2010/account/Notification.java | 21 +++++++--------- .../api/v2010/account/OutgoingCallerId.java | 21 +++++++--------- .../twilio/rest/api/v2010/account/Queue.java | 21 +++++++--------- .../rest/api/v2010/account/Recording.java | 21 +++++++--------- .../rest/api/v2010/account/ShortCode.java | 21 +++++++--------- .../rest/api/v2010/account/SigningKey.java | 21 +++++++--------- .../twilio/rest/api/v2010/account/Token.java | 21 +++++++--------- .../rest/api/v2010/account/Transcription.java | 21 +++++++--------- .../api/v2010/account/ValidationRequest.java | 19 +++++++-------- .../account/address/DependentPhoneNumber.java | 21 +++++++--------- .../availablephonenumbercountry/Local.java | 19 +++++++-------- .../MachineToMachine.java | 19 +++++++-------- .../availablephonenumbercountry/Mobile.java | 19 +++++++-------- .../availablephonenumbercountry/National.java | 19 +++++++-------- .../SharedCost.java | 19 +++++++-------- .../availablephonenumbercountry/TollFree.java | 19 +++++++-------- .../availablephonenumbercountry/Voip.java | 19 +++++++-------- .../rest/api/v2010/account/call/Event.java | 19 +++++++-------- .../api/v2010/account/call/Notification.java | 21 +++++++--------- .../rest/api/v2010/account/call/Payment.java | 21 +++++++--------- .../api/v2010/account/call/Recording.java | 21 +++++++--------- .../rest/api/v2010/account/call/Siprec.java | 21 +++++++--------- .../rest/api/v2010/account/call/Stream.java | 21 +++++++--------- .../api/v2010/account/call/Transcription.java | 21 +++++++--------- .../account/call/UserDefinedMessage.java | 21 +++++++--------- .../call/UserDefinedMessageSubscription.java | 21 +++++++--------- .../v2010/account/conference/Participant.java | 21 +++++++--------- .../v2010/account/conference/Recording.java | 21 +++++++--------- .../incomingphonenumber/AssignedAddOn.java | 21 +++++++--------- .../account/incomingphonenumber/Local.java | 21 +++++++--------- .../account/incomingphonenumber/Mobile.java | 21 +++++++--------- .../account/incomingphonenumber/TollFree.java | 21 +++++++--------- .../assignedaddon/AssignedAddOnExtension.java | 19 +++++++-------- .../api/v2010/account/message/Feedback.java | 21 +++++++--------- .../rest/api/v2010/account/message/Media.java | 21 +++++++--------- .../rest/api/v2010/account/queue/Member.java | 21 +++++++--------- .../v2010/account/recording/AddOnResult.java | 21 +++++++--------- .../account/recording/Transcription.java | 21 +++++++--------- .../recording/addonresult/Payload.java | 21 +++++++--------- .../recording/addonresult/payload/Data.java | 19 +++++++-------- .../api/v2010/account/sip/CredentialList.java | 21 +++++++--------- .../rest/api/v2010/account/sip/Domain.java | 21 +++++++--------- .../account/sip/IpAccessControlList.java | 21 +++++++--------- .../sip/credentiallist/Credential.java | 21 +++++++--------- .../sip/domain/CredentialListMapping.java | 21 +++++++--------- .../domain/IpAccessControlListMapping.java | 21 +++++++--------- .../AuthCallsCredentialListMapping.java | 21 +++++++--------- .../AuthCallsIpAccessControlListMapping.java | 21 +++++++--------- ...uthRegistrationsCredentialListMapping.java | 21 +++++++--------- .../sip/ipaccesscontrollist/IpAddress.java | 21 +++++++--------- .../rest/api/v2010/account/usage/Record.java | 21 +++++++--------- .../rest/api/v2010/account/usage/Trigger.java | 21 +++++++--------- .../v2010/account/usage/record/AllTime.java | 21 +++++++--------- .../api/v2010/account/usage/record/Daily.java | 21 +++++++--------- .../v2010/account/usage/record/LastMonth.java | 21 +++++++--------- .../v2010/account/usage/record/Monthly.java | 21 +++++++--------- .../v2010/account/usage/record/ThisMonth.java | 21 +++++++--------- .../api/v2010/account/usage/record/Today.java | 21 +++++++--------- .../v2010/account/usage/record/Yearly.java | 21 +++++++--------- .../v2010/account/usage/record/Yesterday.java | 21 +++++++--------- .../twilio/rest/assistants/v1/Assistant.java | 23 ++++++++---------- .../rest/assistants/v1/AssistantCreator.java | 2 +- .../rest/assistants/v1/AssistantUpdater.java | 2 +- .../twilio/rest/assistants/v1/Knowledge.java | 23 ++++++++---------- .../rest/assistants/v1/KnowledgeCreator.java | 2 +- .../rest/assistants/v1/KnowledgeUpdater.java | 2 +- .../com/twilio/rest/assistants/v1/Policy.java | 21 +++++++--------- .../twilio/rest/assistants/v1/Session.java | 21 +++++++--------- .../com/twilio/rest/assistants/v1/Tool.java | 23 ++++++++---------- .../rest/assistants/v1/ToolCreator.java | 2 +- .../rest/assistants/v1/ToolUpdater.java | 2 +- .../v1/assistant/AssistantsKnowledge.java | 21 +++++++--------- .../v1/assistant/AssistantsTool.java | 21 +++++++--------- .../assistants/v1/assistant/Feedback.java | 23 ++++++++---------- .../v1/assistant/FeedbackCreator.java | 2 +- .../rest/assistants/v1/assistant/Message.java | 23 ++++++++---------- .../v1/assistant/MessageCreator.java | 2 +- .../rest/assistants/v1/knowledge/Chunk.java | 21 +++++++--------- .../v1/knowledge/KnowledgeStatus.java | 21 +++++++--------- .../rest/assistants/v1/session/Message.java | 21 +++++++--------- .../twilio/rest/bulkexports/v1/Export.java | 19 +++++++-------- .../bulkexports/v1/ExportConfiguration.java | 19 +++++++-------- .../rest/bulkexports/v1/export/Day.java | 19 +++++++-------- .../v1/export/ExportCustomJob.java | 19 +++++++-------- .../rest/bulkexports/v1/export/Job.java | 19 +++++++-------- .../com/twilio/rest/chat/v1/Credential.java | 21 +++++++--------- .../java/com/twilio/rest/chat/v1/Service.java | 21 +++++++--------- .../twilio/rest/chat/v1/service/Channel.java | 21 +++++++--------- .../com/twilio/rest/chat/v1/service/Role.java | 21 +++++++--------- .../com/twilio/rest/chat/v1/service/User.java | 21 +++++++--------- .../rest/chat/v1/service/channel/Invite.java | 21 +++++++--------- .../rest/chat/v1/service/channel/Member.java | 21 +++++++--------- .../rest/chat/v1/service/channel/Message.java | 21 +++++++--------- .../chat/v1/service/user/UserChannel.java | 19 +++++++-------- .../com/twilio/rest/chat/v2/Credential.java | 21 +++++++--------- .../java/com/twilio/rest/chat/v2/Service.java | 21 +++++++--------- .../twilio/rest/chat/v2/service/Binding.java | 21 +++++++--------- .../twilio/rest/chat/v2/service/Channel.java | 21 +++++++--------- .../com/twilio/rest/chat/v2/service/Role.java | 21 +++++++--------- .../com/twilio/rest/chat/v2/service/User.java | 21 +++++++--------- .../rest/chat/v2/service/channel/Invite.java | 21 +++++++--------- .../rest/chat/v2/service/channel/Member.java | 21 +++++++--------- .../rest/chat/v2/service/channel/Message.java | 21 +++++++--------- .../rest/chat/v2/service/channel/Webhook.java | 21 +++++++--------- .../chat/v2/service/user/UserBinding.java | 21 +++++++--------- .../chat/v2/service/user/UserChannel.java | 19 +++++++-------- .../java/com/twilio/rest/chat/v3/Channel.java | 21 +++++++--------- .../com/twilio/rest/content/v1/Content.java | 23 ++++++++---------- .../rest/content/v1/ContentAndApprovals.java | 21 +++++++--------- .../rest/content/v1/ContentCreator.java | 2 +- .../rest/content/v1/ContentUpdater.java | 2 +- .../twilio/rest/content/v1/LegacyContent.java | 21 +++++++--------- .../content/v1/content/ApprovalCreate.java | 23 ++++++++---------- .../v1/content/ApprovalCreateCreator.java | 2 +- .../content/v1/content/ApprovalFetch.java | 19 +++++++-------- .../com/twilio/rest/content/v2/Content.java | 21 +++++++--------- .../rest/content/v2/ContentAndApprovals.java | 21 +++++++--------- .../v1/AddressConfiguration.java | 21 +++++++--------- .../rest/conversations/v1/Configuration.java | 19 +++++++-------- .../rest/conversations/v1/Conversation.java | 21 +++++++--------- .../v1/ConversationWithParticipants.java | 21 +++++++--------- .../rest/conversations/v1/Credential.java | 21 +++++++--------- .../v1/ParticipantConversation.java | 21 +++++++--------- .../twilio/rest/conversations/v1/Role.java | 21 +++++++--------- .../twilio/rest/conversations/v1/Service.java | 21 +++++++--------- .../twilio/rest/conversations/v1/User.java | 21 +++++++--------- .../v1/configuration/Webhook.java | 19 +++++++-------- .../v1/conversation/Message.java | 21 +++++++--------- .../v1/conversation/Participant.java | 21 +++++++--------- .../v1/conversation/Webhook.java | 21 +++++++--------- .../conversation/message/DeliveryReceipt.java | 21 +++++++--------- .../conversations/v1/service/Binding.java | 21 +++++++--------- .../v1/service/Configuration.java | 19 +++++++-------- .../v1/service/Conversation.java | 21 +++++++--------- .../service/ConversationWithParticipants.java | 21 +++++++--------- .../v1/service/ParticipantConversation.java | 21 +++++++--------- .../rest/conversations/v1/service/Role.java | 21 +++++++--------- .../rest/conversations/v1/service/User.java | 21 +++++++--------- .../service/configuration/Notification.java | 19 +++++++-------- .../v1/service/configuration/Webhook.java | 19 +++++++-------- .../v1/service/conversation/Message.java | 21 +++++++--------- .../v1/service/conversation/Participant.java | 21 +++++++--------- .../v1/service/conversation/Webhook.java | 21 +++++++--------- .../conversation/message/DeliveryReceipt.java | 21 +++++++--------- .../v1/service/user/UserConversation.java | 21 +++++++--------- .../v1/user/UserConversation.java | 21 +++++++--------- .../com/twilio/rest/events/v1/EventType.java | 21 +++++++--------- .../com/twilio/rest/events/v1/Schema.java | 21 +++++++--------- .../java/com/twilio/rest/events/v1/Sink.java | 21 +++++++--------- .../twilio/rest/events/v1/Subscription.java | 21 +++++++--------- .../rest/events/v1/schema/SchemaVersion.java | 21 +++++++--------- .../twilio/rest/events/v1/sink/SinkTest.java | 19 +++++++-------- .../rest/events/v1/sink/SinkValidate.java | 19 +++++++-------- .../v1/subscription/SubscribedEvent.java | 19 +++++++-------- .../twilio/rest/flexapi/v1/Assessments.java | 19 +++++++-------- .../com/twilio/rest/flexapi/v1/Channel.java | 21 +++++++--------- .../twilio/rest/flexapi/v1/Configuration.java | 21 +++++++--------- .../rest/flexapi/v1/ConfigurationUpdater.java | 2 +- .../rest/flexapi/v1/CreateFlexInstance.java | 23 ++++++++---------- .../flexapi/v1/CreateFlexInstanceCreator.java | 2 +- .../com/twilio/rest/flexapi/v1/FlexFlow.java | 21 +++++++--------- .../v1/InsightsAssessmentsComment.java | 19 +++++++-------- .../flexapi/v1/InsightsConversations.java | 19 +++++++-------- .../flexapi/v1/InsightsQuestionnaires.java | 19 +++++++-------- .../v1/InsightsQuestionnairesCategory.java | 19 +++++++-------- .../v1/InsightsQuestionnairesQuestion.java | 19 +++++++-------- .../rest/flexapi/v1/InsightsSegments.java | 19 +++++++-------- .../rest/flexapi/v1/InsightsSession.java | 19 +++++++-------- .../v1/InsightsSettingsAnswerSets.java | 19 +++++++-------- .../flexapi/v1/InsightsSettingsComment.java | 19 +++++++-------- .../rest/flexapi/v1/InsightsUserRoles.java | 19 +++++++-------- .../twilio/rest/flexapi/v1/Interaction.java | 19 +++++++-------- .../com/twilio/rest/flexapi/v1/Plugin.java | 21 +++++++--------- .../twilio/rest/flexapi/v1/PluginArchive.java | 21 +++++++--------- .../rest/flexapi/v1/PluginConfiguration.java | 21 +++++++--------- .../v1/PluginConfigurationArchive.java | 21 +++++++--------- .../twilio/rest/flexapi/v1/PluginRelease.java | 21 +++++++--------- .../rest/flexapi/v1/PluginVersionArchive.java | 21 +++++++--------- .../rest/flexapi/v1/ProvisioningStatus.java | 19 +++++++-------- .../twilio/rest/flexapi/v1/WebChannel.java | 21 +++++++--------- .../v1/interaction/InteractionChannel.java | 19 +++++++-------- .../InteractionChannelInvite.java | 19 +++++++-------- .../InteractionChannelParticipant.java | 19 +++++++-------- .../InteractionTransfer.java | 21 +++++++--------- .../InteractionTransferCreator.java | 2 +- .../InteractionTransferUpdater.java | 2 +- .../flexapi/v1/plugin/PluginVersions.java | 21 +++++++--------- .../pluginconfiguration/ConfiguredPlugin.java | 21 +++++++--------- .../com/twilio/rest/flexapi/v2/FlexUser.java | 21 +++++++--------- .../twilio/rest/flexapi/v2/WebChannels.java | 19 +++++++-------- .../com/twilio/rest/frontlineapi/v1/User.java | 19 +++++++-------- .../java/com/twilio/rest/iam/v1/ApiKey.java | 21 +++++++--------- .../com/twilio/rest/iam/v1/GetApiKeys.java | 21 +++++++--------- .../com/twilio/rest/iam/v1/NewApiKey.java | 21 +++++++--------- .../java/com/twilio/rest/iam/v1/OAuthApp.java | 23 ++++++++---------- .../twilio/rest/iam/v1/OAuthAppCreator.java | 2 +- .../twilio/rest/iam/v1/OAuthAppUpdater.java | 2 +- .../java/com/twilio/rest/iam/v1/Token.java | 19 +++++++-------- .../com/twilio/rest/insights/v1/Call.java | 19 +++++++-------- .../rest/insights/v1/CallSummaries.java | 21 +++++++--------- .../twilio/rest/insights/v1/Conference.java | 21 +++++++--------- .../com/twilio/rest/insights/v1/Room.java | 21 +++++++--------- .../com/twilio/rest/insights/v1/Setting.java | 19 +++++++-------- .../rest/insights/v1/call/Annotation.java | 19 +++++++-------- .../rest/insights/v1/call/CallSummary.java | 21 +++++++--------- .../twilio/rest/insights/v1/call/Event.java | 19 +++++++-------- .../twilio/rest/insights/v1/call/Metric.java | 19 +++++++-------- .../v1/conference/ConferenceParticipant.java | 21 +++++++--------- .../rest/insights/v1/room/Participant.java | 21 +++++++--------- .../rest/intelligence/v2/CustomOperator.java | 21 +++++++--------- .../twilio/rest/intelligence/v2/Operator.java | 21 +++++++--------- .../intelligence/v2/OperatorAttachment.java | 19 +++++++-------- .../intelligence/v2/OperatorAttachments.java | 19 +++++++-------- .../rest/intelligence/v2/OperatorType.java | 21 +++++++--------- .../intelligence/v2/PrebuiltOperator.java | 21 +++++++--------- .../twilio/rest/intelligence/v2/Service.java | 21 +++++++--------- .../rest/intelligence/v2/Transcript.java | 21 +++++++--------- .../transcript/EncryptedOperatorResults.java | 19 +++++++-------- .../v2/transcript/EncryptedSentences.java | 19 +++++++-------- .../intelligence/v2/transcript/Media.java | 19 +++++++-------- .../v2/transcript/OperatorResult.java | 19 +++++++-------- .../intelligence/v2/transcript/Sentence.java | 19 +++++++-------- .../rest/ipmessaging/v1/Credential.java | 21 +++++++--------- .../twilio/rest/ipmessaging/v1/Service.java | 21 +++++++--------- .../rest/ipmessaging/v1/service/Channel.java | 21 +++++++--------- .../rest/ipmessaging/v1/service/Role.java | 21 +++++++--------- .../rest/ipmessaging/v1/service/User.java | 21 +++++++--------- .../v1/service/channel/Invite.java | 21 +++++++--------- .../v1/service/channel/Member.java | 21 +++++++--------- .../v1/service/channel/Message.java | 21 +++++++--------- .../v1/service/user/UserChannel.java | 19 +++++++-------- .../rest/ipmessaging/v2/Credential.java | 21 +++++++--------- .../twilio/rest/ipmessaging/v2/Service.java | 21 +++++++--------- .../rest/ipmessaging/v2/service/Binding.java | 21 +++++++--------- .../rest/ipmessaging/v2/service/Channel.java | 21 +++++++--------- .../rest/ipmessaging/v2/service/Role.java | 21 +++++++--------- .../rest/ipmessaging/v2/service/User.java | 21 +++++++--------- .../v2/service/channel/Invite.java | 21 +++++++--------- .../v2/service/channel/Member.java | 21 +++++++--------- .../v2/service/channel/Message.java | 21 +++++++--------- .../v2/service/channel/Webhook.java | 21 +++++++--------- .../v2/service/user/UserBinding.java | 21 +++++++--------- .../v2/service/user/UserChannel.java | 19 +++++++-------- .../twilio/rest/knowledge/v1/Knowledge.java | 23 ++++++++---------- .../rest/knowledge/v1/KnowledgeCreator.java | 2 +- .../rest/knowledge/v1/KnowledgeUpdater.java | 2 +- .../rest/knowledge/v1/knowledge/Chunk.java | 21 +++++++--------- .../v1/knowledge/KnowledgeStatus.java | 21 +++++++--------- .../twilio/rest/lookups/v1/PhoneNumber.java | 19 +++++++-------- .../com/twilio/rest/lookups/v2/Bucket.java | 23 ++++++++---------- .../twilio/rest/lookups/v2/BucketUpdater.java | 2 +- .../rest/lookups/v2/LookupOverride.java | 23 ++++++++---------- .../lookups/v2/LookupOverrideCreator.java | 2 +- .../lookups/v2/LookupOverrideUpdater.java | 2 +- .../twilio/rest/lookups/v2/PhoneNumber.java | 23 ++++++++---------- .../com/twilio/rest/lookups/v2/Query.java | 23 ++++++++---------- .../twilio/rest/lookups/v2/QueryCreator.java | 2 +- .../com/twilio/rest/lookups/v2/RateLimit.java | 23 ++++++++---------- .../rest/marketplace/v1/AvailableAddOn.java | 19 +++++++-------- .../rest/marketplace/v1/InstalledAddOn.java | 21 +++++++--------- .../rest/marketplace/v1/ModuleData.java | 19 +++++++-------- .../marketplace/v1/ModuleDataManagement.java | 19 +++++++-------- .../marketplace/v1/ReferralConversion.java | 23 ++++++++---------- .../v1/ReferralConversionCreator.java | 2 +- .../AvailableAddOnExtension.java | 19 +++++++-------- .../InstalledAddOnExtension.java | 19 +++++++-------- .../installedaddon/InstalledAddOnUsage.java | 23 ++++++++---------- .../InstalledAddOnUsageCreator.java | 2 +- .../rest/messaging/v1/BrandRegistration.java | 21 +++++++--------- .../rest/messaging/v1/Deactivations.java | 19 +++++++-------- .../twilio/rest/messaging/v1/DomainCerts.java | 21 +++++++--------- .../rest/messaging/v1/DomainConfig.java | 21 +++++++--------- .../v1/DomainConfigMessagingService.java | 21 +++++++--------- .../rest/messaging/v1/DomainValidateDn.java | 19 +++++++-------- .../rest/messaging/v1/ExternalCampaign.java | 21 +++++++--------- .../v1/LinkshorteningMessagingService.java | 19 +++++++-------- ...ningMessagingServiceDomainAssociation.java | 19 +++++++-------- .../rest/messaging/v1/RequestManagedCert.java | 21 +++++++--------- .../com/twilio/rest/messaging/v1/Service.java | 21 +++++++--------- .../messaging/v1/TollfreeVerification.java | 21 +++++++--------- .../com/twilio/rest/messaging/v1/Usecase.java | 19 +++++++-------- .../BrandRegistrationOtp.java | 19 +++++++-------- .../v1/brandregistration/BrandVetting.java | 21 +++++++--------- .../messaging/v1/service/AlphaSender.java | 21 +++++++--------- .../messaging/v1/service/ChannelSender.java | 21 +++++++--------- .../v1/service/DestinationAlphaSender.java | 21 +++++++--------- .../messaging/v1/service/PhoneNumber.java | 21 +++++++--------- .../rest/messaging/v1/service/ShortCode.java | 21 +++++++--------- .../messaging/v1/service/UsAppToPerson.java | 21 +++++++--------- .../v1/service/UsAppToPersonUsecase.java | 19 +++++++-------- .../rest/messaging/v2/ChannelsSender.java | 23 ++++++++---------- .../messaging/v2/ChannelsSenderCreator.java | 2 +- .../messaging/v2/ChannelsSenderUpdater.java | 2 +- .../twilio/rest/messaging/v2/DomainCerts.java | 21 +++++++--------- .../rest/messaging/v2/TypingIndicator.java | 19 +++++++-------- .../com/twilio/rest/monitor/v1/Alert.java | 21 +++++++--------- .../com/twilio/rest/monitor/v1/Event.java | 21 +++++++--------- .../com/twilio/rest/notify/v1/Credential.java | 21 +++++++--------- .../com/twilio/rest/notify/v1/Service.java | 21 +++++++--------- .../rest/notify/v1/service/Binding.java | 21 +++++++--------- .../rest/notify/v1/service/Notification.java | 21 +++++++--------- .../rest/numbers/v1/BulkEligibility.java | 21 +++++++--------- .../numbers/v1/BulkEligibilityCreator.java | 2 +- .../twilio/rest/numbers/v1/Eligibility.java | 19 +++++++-------- .../rest/numbers/v1/EligibilityCreator.java | 2 +- .../rest/numbers/v1/PortingAllPortIn.java | 19 +++++++-------- .../twilio/rest/numbers/v1/PortingPortIn.java | 23 ++++++++---------- .../rest/numbers/v1/PortingPortInCreator.java | 2 +- .../numbers/v1/PortingPortInPhoneNumber.java | 21 +++++++--------- .../rest/numbers/v1/PortingPortability.java | 19 +++++++-------- .../v1/PortingWebhookConfiguration.java | 19 +++++++-------- .../PortingWebhookConfigurationCreator.java | 2 +- .../v1/PortingWebhookConfigurationDelete.java | 19 +++++++-------- .../v1/SigningRequestConfiguration.java | 19 +++++++-------- .../SigningRequestConfigurationCreator.java | 2 +- .../com/twilio/rest/numbers/v1/Webhook.java | 21 +++++++--------- .../twilio/rest/numbers/v2/Application.java | 23 ++++++++---------- .../rest/numbers/v2/ApplicationCreator.java | 2 +- .../numbers/v2/AuthorizationDocument.java | 21 +++++++--------- .../numbers/v2/BulkHostedNumberOrder.java | 21 +++++++--------- .../v2/BulkHostedNumberOrderCreator.java | 2 +- .../twilio/rest/numbers/v2/BundleClone.java | 21 +++++++--------- .../rest/numbers/v2/HostedNumberOrder.java | 21 +++++++--------- .../DependentHostedNumberOrder.java | 21 +++++++--------- .../v2/regulatorycompliance/Bundle.java | 21 +++++++--------- .../v2/regulatorycompliance/EndUser.java | 21 +++++++--------- .../v2/regulatorycompliance/EndUserType.java | 19 +++++++-------- .../v2/regulatorycompliance/Regulation.java | 19 +++++++-------- .../SupportingDocument.java | 21 +++++++--------- .../SupportingDocumentType.java | 19 +++++++-------- .../bundle/BundleCopy.java | 21 +++++++--------- .../bundle/Evaluation.java | 21 +++++++--------- .../bundle/ItemAssignment.java | 21 +++++++--------- .../bundle/ReplaceItems.java | 21 +++++++--------- .../rest/numbers/v3/HostedNumberOrder.java | 21 +++++++--------- .../com/twilio/rest/oauth/v1/Authorize.java | 19 +++++++-------- .../java/com/twilio/rest/oauth/v1/Token.java | 19 +++++++-------- .../com/twilio/rest/oauth/v2/Authorize.java | 19 +++++++-------- .../java/com/twilio/rest/oauth/v2/Token.java | 19 +++++++-------- .../hostedNumbers/AuthorizationDocument.java | 21 +++++++--------- .../hostedNumbers/HostedNumberOrder.java | 21 +++++++--------- .../DependentHostedNumberOrder.java | 21 +++++++--------- .../preview/marketplace/AvailableAddOn.java | 19 +++++++-------- .../preview/marketplace/InstalledAddOn.java | 21 +++++++--------- .../AvailableAddOnExtension.java | 19 +++++++-------- .../InstalledAddOnExtension.java | 19 +++++++-------- .../twilio/rest/preview/wireless/Command.java | 21 +++++++--------- .../rest/preview/wireless/RatePlan.java | 21 +++++++--------- .../com/twilio/rest/preview/wireless/Sim.java | 21 +++++++--------- .../rest/preview/wireless/sim/Usage.java | 19 +++++++-------- .../previewiam/organizations/Account.java | 21 +++++++--------- .../organizations/RoleAssignment.java | 23 ++++++++---------- .../organizations/RoleAssignmentCreator.java | 2 +- .../rest/previewiam/organizations/User.java | 23 ++++++++---------- .../previewiam/organizations/UserCreator.java | 2 +- .../previewiam/organizations/UserUpdater.java | 2 +- .../twilio/rest/previewiam/v1/Authorize.java | 19 +++++++-------- .../com/twilio/rest/previewiam/v1/Token.java | 19 +++++++-------- .../rest/pricing/v1/messaging/Country.java | 21 +++++++--------- .../rest/pricing/v1/phonenumber/Country.java | 21 +++++++--------- .../twilio/rest/pricing/v1/voice/Country.java | 21 +++++++--------- .../twilio/rest/pricing/v1/voice/Number.java | 21 +++++++--------- .../com/twilio/rest/pricing/v2/Country.java | 21 +++++++--------- .../com/twilio/rest/pricing/v2/Number.java | 21 +++++++--------- .../twilio/rest/pricing/v2/voice/Country.java | 21 +++++++--------- .../twilio/rest/pricing/v2/voice/Number.java | 21 +++++++--------- .../com/twilio/rest/proxy/v1/Service.java | 21 +++++++--------- .../rest/proxy/v1/service/PhoneNumber.java | 21 +++++++--------- .../twilio/rest/proxy/v1/service/Session.java | 21 +++++++--------- .../proxy/v1/service/session/Interaction.java | 21 +++++++--------- .../proxy/v1/service/session/Participant.java | 21 +++++++--------- .../participant/MessageInteraction.java | 21 +++++++--------- .../twilio/rest/routes/v2/PhoneNumber.java | 21 +++++++--------- .../com/twilio/rest/routes/v2/SipDomain.java | 21 +++++++--------- .../java/com/twilio/rest/routes/v2/Trunk.java | 21 +++++++--------- .../twilio/rest/serverless/v1/Service.java | 21 +++++++--------- .../rest/serverless/v1/service/Asset.java | 21 +++++++--------- .../rest/serverless/v1/service/Build.java | 21 +++++++--------- .../serverless/v1/service/Environment.java | 21 +++++++--------- .../rest/serverless/v1/service/Function.java | 21 +++++++--------- .../v1/service/asset/AssetVersion.java | 21 +++++++--------- .../v1/service/build/BuildStatus.java | 19 +++++++-------- .../v1/service/environment/Deployment.java | 21 +++++++--------- .../v1/service/environment/Log.java | 21 +++++++--------- .../v1/service/environment/Variable.java | 21 +++++++--------- .../v1/service/function/FunctionVersion.java | 21 +++++++--------- .../FunctionVersionContent.java | 19 +++++++-------- .../java/com/twilio/rest/studio/v1/Flow.java | 21 +++++++--------- .../rest/studio/v1/flow/Engagement.java | 21 +++++++--------- .../twilio/rest/studio/v1/flow/Execution.java | 21 +++++++--------- .../v1/flow/engagement/EngagementContext.java | 19 +++++++-------- .../rest/studio/v1/flow/engagement/Step.java | 21 +++++++--------- .../v1/flow/engagement/step/StepContext.java | 19 +++++++-------- .../v1/flow/execution/ExecutionContext.java | 19 +++++++-------- .../v1/flow/execution/ExecutionStep.java | 21 +++++++--------- .../executionstep/ExecutionStepContext.java | 19 +++++++-------- .../java/com/twilio/rest/studio/v2/Flow.java | 21 +++++++--------- .../twilio/rest/studio/v2/FlowValidate.java | 19 +++++++-------- .../twilio/rest/studio/v2/flow/Execution.java | 21 +++++++--------- .../rest/studio/v2/flow/FlowRevision.java | 21 +++++++--------- .../rest/studio/v2/flow/FlowTestUser.java | 19 +++++++-------- .../v2/flow/execution/ExecutionContext.java | 19 +++++++-------- .../v2/flow/execution/ExecutionStep.java | 21 +++++++--------- .../executionstep/ExecutionStepContext.java | 19 +++++++-------- .../twilio/rest/supersim/v1/EsimProfile.java | 21 +++++++--------- .../com/twilio/rest/supersim/v1/Fleet.java | 21 +++++++--------- .../twilio/rest/supersim/v1/IpCommand.java | 21 +++++++--------- .../com/twilio/rest/supersim/v1/Network.java | 19 +++++++-------- .../supersim/v1/NetworkAccessProfile.java | 21 +++++++--------- .../rest/supersim/v1/SettingsUpdate.java | 21 +++++++--------- .../java/com/twilio/rest/supersim/v1/Sim.java | 21 +++++++--------- .../twilio/rest/supersim/v1/SmsCommand.java | 21 +++++++--------- .../twilio/rest/supersim/v1/UsageRecord.java | 21 +++++++--------- .../NetworkAccessProfileNetwork.java | 19 +++++++-------- .../rest/supersim/v1/sim/BillingPeriod.java | 21 +++++++--------- .../rest/supersim/v1/sim/SimIpAddress.java | 19 +++++++-------- .../java/com/twilio/rest/sync/v1/Service.java | 21 +++++++--------- .../twilio/rest/sync/v1/service/Document.java | 21 +++++++--------- .../twilio/rest/sync/v1/service/SyncList.java | 21 +++++++--------- .../twilio/rest/sync/v1/service/SyncMap.java | 21 +++++++--------- .../rest/sync/v1/service/SyncStream.java | 21 +++++++--------- .../service/document/DocumentPermission.java | 19 +++++++-------- .../v1/service/synclist/SyncListItem.java | 21 +++++++--------- .../service/synclist/SyncListPermission.java | 19 +++++++-------- .../sync/v1/service/syncmap/SyncMapItem.java | 21 +++++++--------- .../v1/service/syncmap/SyncMapPermission.java | 19 +++++++-------- .../v1/service/syncstream/StreamMessage.java | 19 +++++++-------- .../twilio/rest/taskrouter/v1/Workspace.java | 21 +++++++--------- .../taskrouter/v1/workspace/Activity.java | 21 +++++++--------- .../rest/taskrouter/v1/workspace/Event.java | 21 +++++++--------- .../rest/taskrouter/v1/workspace/Task.java | 21 +++++++--------- .../taskrouter/v1/workspace/TaskChannel.java | 21 +++++++--------- .../taskrouter/v1/workspace/TaskQueue.java | 21 +++++++--------- .../rest/taskrouter/v1/workspace/Worker.java | 21 +++++++--------- .../taskrouter/v1/workspace/Workflow.java | 21 +++++++--------- .../WorkspaceCumulativeStatistics.java | 21 +++++++--------- .../WorkspaceRealTimeStatistics.java | 19 +++++++-------- .../v1/workspace/WorkspaceStatistics.java | 19 +++++++-------- .../v1/workspace/task/Reservation.java | 21 +++++++--------- .../TaskQueueBulkRealTimeStatistics.java | 19 +++++++-------- ...askQueueBulkRealTimeStatisticsCreator.java | 2 +- .../TaskQueueCumulativeStatistics.java | 21 +++++++--------- .../TaskQueueRealTimeStatistics.java | 19 +++++++-------- .../taskqueue/TaskQueueStatistics.java | 19 +++++++-------- .../taskqueue/TaskQueuesStatistics.java | 19 +++++++-------- .../v1/workspace/worker/Reservation.java | 21 +++++++--------- .../v1/workspace/worker/WorkerChannel.java | 21 +++++++--------- .../v1/workspace/worker/WorkerStatistics.java | 19 +++++++-------- .../worker/WorkersCumulativeStatistics.java | 21 +++++++--------- .../worker/WorkersRealTimeStatistics.java | 19 +++++++-------- .../workspace/worker/WorkersStatistics.java | 19 +++++++-------- .../WorkflowCumulativeStatistics.java | 21 +++++++--------- .../workflow/WorkflowRealTimeStatistics.java | 19 +++++++-------- .../workflow/WorkflowStatistics.java | 19 +++++++-------- .../com/twilio/rest/trunking/v1/Trunk.java | 21 +++++++--------- .../trunking/v1/trunk/CredentialList.java | 21 +++++++--------- .../v1/trunk/IpAccessControlList.java | 21 +++++++--------- .../trunking/v1/trunk/OriginationUrl.java | 21 +++++++--------- .../rest/trunking/v1/trunk/PhoneNumber.java | 21 +++++++--------- .../rest/trunking/v1/trunk/Recording.java | 19 +++++++-------- .../rest/trusthub/v1/ComplianceInquiries.java | 19 +++++++-------- .../v1/ComplianceRegistrationInquiries.java | 19 +++++++-------- .../v1/ComplianceTollfreeInquiries.java | 19 +++++++-------- .../rest/trusthub/v1/CustomerProfiles.java | 21 +++++++--------- .../com/twilio/rest/trusthub/v1/EndUser.java | 21 +++++++--------- .../twilio/rest/trusthub/v1/EndUserType.java | 19 +++++++-------- .../com/twilio/rest/trusthub/v1/Policies.java | 19 +++++++-------- .../rest/trusthub/v1/SupportingDocument.java | 21 +++++++--------- .../trusthub/v1/SupportingDocumentType.java | 19 +++++++-------- .../rest/trusthub/v1/TrustProducts.java | 21 +++++++--------- ...omerProfilesChannelEndpointAssignment.java | 21 +++++++--------- .../CustomerProfilesEntityAssignments.java | 21 +++++++--------- .../CustomerProfilesEvaluations.java | 21 +++++++--------- ...rustProductsChannelEndpointAssignment.java | 21 +++++++--------- .../TrustProductsEntityAssignments.java | 21 +++++++--------- .../TrustProductsEvaluations.java | 21 +++++++--------- .../java/com/twilio/rest/verify/v2/Form.java | 19 +++++++-------- .../com/twilio/rest/verify/v2/Safelist.java | 19 +++++++-------- .../com/twilio/rest/verify/v2/Service.java | 21 +++++++--------- .../com/twilio/rest/verify/v2/Template.java | 19 +++++++-------- .../rest/verify/v2/VerificationAttempt.java | 21 +++++++--------- .../v2/VerificationAttemptsSummary.java | 19 +++++++-------- .../rest/verify/v2/service/AccessToken.java | 21 +++++++--------- .../verify/v2/service/ApproveChallenge.java | 23 ++++++++---------- .../v2/service/ApproveChallengeUpdater.java | 2 +- .../twilio/rest/verify/v2/service/Entity.java | 21 +++++++--------- .../v2/service/MessagingConfiguration.java | 21 +++++++--------- .../rest/verify/v2/service/NewChallenge.java | 23 ++++++++---------- .../v2/service/NewChallengeCreator.java | 2 +- .../rest/verify/v2/service/NewFactor.java | 23 ++++++++---------- .../verify/v2/service/NewFactorCreator.java | 2 +- .../verify/v2/service/NewVerifyFactor.java | 23 ++++++++---------- .../v2/service/NewVerifyFactorUpdater.java | 2 +- .../rest/verify/v2/service/RateLimit.java | 21 +++++++--------- .../rest/verify/v2/service/Verification.java | 21 +++++++--------- .../verify/v2/service/VerificationCheck.java | 21 +++++++--------- .../rest/verify/v2/service/Webhook.java | 21 +++++++--------- .../verify/v2/service/entity/Challenge.java | 21 +++++++--------- .../rest/verify/v2/service/entity/Factor.java | 21 +++++++--------- .../verify/v2/service/entity/NewFactor.java | 21 +++++++--------- .../entity/challenge/Notification.java | 21 +++++++--------- .../verify/v2/service/ratelimit/Bucket.java | 21 +++++++--------- .../com/twilio/rest/video/v1/Composition.java | 21 +++++++--------- .../twilio/rest/video/v1/CompositionHook.java | 21 +++++++--------- .../rest/video/v1/CompositionSettings.java | 19 +++++++-------- .../com/twilio/rest/video/v1/Recording.java | 21 +++++++--------- .../rest/video/v1/RecordingSettings.java | 19 +++++++-------- .../java/com/twilio/rest/video/v1/Room.java | 21 +++++++--------- .../rest/video/v1/room/Participant.java | 21 +++++++--------- .../rest/video/v1/room/RecordingRules.java | 21 +++++++--------- .../rest/video/v1/room/RoomRecording.java | 21 +++++++--------- .../rest/video/v1/room/Transcriptions.java | 21 +++++++--------- .../video/v1/room/participant/Anonymize.java | 21 +++++++--------- .../v1/room/participant/PublishedTrack.java | 21 +++++++--------- .../v1/room/participant/SubscribeRules.java | 21 +++++++--------- .../v1/room/participant/SubscribedTrack.java | 21 +++++++--------- .../twilio/rest/voice/v1/ArchivedCall.java | 19 +++++++-------- .../com/twilio/rest/voice/v1/ByocTrunk.java | 21 +++++++--------- .../rest/voice/v1/ConnectionPolicy.java | 21 +++++++--------- .../com/twilio/rest/voice/v1/IpRecord.java | 21 +++++++--------- .../twilio/rest/voice/v1/SourceIpMapping.java | 21 +++++++--------- .../ConnectionPolicyTarget.java | 21 +++++++--------- .../dialingpermissions/BulkCountryUpdate.java | 19 +++++++-------- .../voice/v1/dialingpermissions/Country.java | 19 +++++++-------- .../voice/v1/dialingpermissions/Settings.java | 19 +++++++-------- .../country/HighriskSpecialPrefix.java | 19 +++++++-------- .../com/twilio/rest/wireless/v1/Command.java | 21 +++++++--------- .../com/twilio/rest/wireless/v1/RatePlan.java | 21 +++++++--------- .../java/com/twilio/rest/wireless/v1/Sim.java | 21 +++++++--------- .../twilio/rest/wireless/v1/UsageRecord.java | 19 +++++++-------- .../rest/wireless/v1/sim/DataSession.java | 21 +++++++--------- .../rest/wireless/v1/sim/UsageRecord.java | 19 +++++++-------- .../twilio/taskrouter/TaskRouterResource.java | 2 +- .../com/twilio/taskrouter/TaskRouting.java | 2 +- .../java/com/twilio/taskrouter/Workflow.java | 2 +- .../com/twilio/taskrouter/WorkflowRule.java | 2 +- .../twilio/taskrouter/WorkflowRuleTarget.java | 2 +- .../java/com/twilio/twiml/FaxResponse.java | 10 ++++---- .../com/twilio/twiml/MessagingResponse.java | 10 ++++---- src/main/java/com/twilio/twiml/TwiML.java | 10 ++++---- .../java/com/twilio/twiml/VoiceResponse.java | 10 ++++---- .../java/com/twilio/twiml/fax/Receive.java | 10 ++++---- .../java/com/twilio/twiml/messaging/Body.java | 8 +++---- .../com/twilio/twiml/messaging/Media.java | 8 +++---- .../com/twilio/twiml/messaging/Message.java | 10 ++++---- .../com/twilio/twiml/messaging/Redirect.java | 10 ++++---- .../com/twilio/twiml/voice/AiSession.java | 10 ++++---- .../com/twilio/twiml/voice/Application.java | 10 ++++---- .../twilio/twiml/voice/ApplicationSid.java | 8 +++---- .../com/twilio/twiml/voice/Assistant.java | 10 ++++---- .../com/twilio/twiml/voice/Autopilot.java | 8 +++---- .../java/com/twilio/twiml/voice/Client.java | 10 ++++---- .../com/twilio/twiml/voice/Conference.java | 10 ++++---- .../java/com/twilio/twiml/voice/Config.java | 10 ++++---- .../java/com/twilio/twiml/voice/Connect.java | 10 ++++---- .../com/twilio/twiml/voice/Conversation.java | 10 ++++---- .../twilio/twiml/voice/ConversationRelay.java | 10 ++++---- .../twiml/voice/ConversationRelaySession.java | 10 ++++---- .../java/com/twilio/twiml/voice/Dial.java | 10 ++++---- .../java/com/twilio/twiml/voice/Echo.java | 6 ++--- .../java/com/twilio/twiml/voice/Enqueue.java | 10 ++++---- .../java/com/twilio/twiml/voice/Gather.java | 10 ++++---- .../java/com/twilio/twiml/voice/Hangup.java | 10 ++++---- .../java/com/twilio/twiml/voice/Header.java | 10 ++++---- .../java/com/twilio/twiml/voice/Headers.java | 10 ++++---- .../java/com/twilio/twiml/voice/Identity.java | 8 +++---- .../java/com/twilio/twiml/voice/Language.java | 10 ++++---- .../java/com/twilio/twiml/voice/Leave.java | 6 ++--- .../java/com/twilio/twiml/voice/Number.java | 10 ++++---- .../com/twilio/twiml/voice/Parameter.java | 10 ++++---- .../java/com/twilio/twiml/voice/Pause.java | 10 ++++---- src/main/java/com/twilio/twiml/voice/Pay.java | 10 ++++---- .../java/com/twilio/twiml/voice/Play.java | 10 ++++---- .../java/com/twilio/twiml/voice/Prompt.java | 10 ++++---- .../java/com/twilio/twiml/voice/Queue.java | 10 ++++---- .../java/com/twilio/twiml/voice/Record.java | 10 ++++---- .../com/twilio/twiml/voice/Recording.java | 10 ++++---- .../java/com/twilio/twiml/voice/Redirect.java | 10 ++++---- .../java/com/twilio/twiml/voice/Refer.java | 10 ++++---- .../java/com/twilio/twiml/voice/ReferSip.java | 8 +++---- .../java/com/twilio/twiml/voice/Reject.java | 10 ++++---- .../java/com/twilio/twiml/voice/Room.java | 10 ++++---- src/main/java/com/twilio/twiml/voice/Say.java | 10 ++++---- src/main/java/com/twilio/twiml/voice/Sim.java | 8 +++---- src/main/java/com/twilio/twiml/voice/Sip.java | 10 ++++---- .../java/com/twilio/twiml/voice/SipUri.java | 10 ++++---- .../java/com/twilio/twiml/voice/Siprec.java | 10 ++++---- src/main/java/com/twilio/twiml/voice/Sms.java | 10 ++++---- .../com/twilio/twiml/voice/SsmlBreak.java | 10 ++++---- .../com/twilio/twiml/voice/SsmlEmphasis.java | 10 ++++---- .../java/com/twilio/twiml/voice/SsmlLang.java | 10 ++++---- .../java/com/twilio/twiml/voice/SsmlP.java | 10 ++++---- .../com/twilio/twiml/voice/SsmlPhoneme.java | 10 ++++---- .../com/twilio/twiml/voice/SsmlProsody.java | 10 ++++---- .../java/com/twilio/twiml/voice/SsmlS.java | 10 ++++---- .../com/twilio/twiml/voice/SsmlSayAs.java | 10 ++++---- .../java/com/twilio/twiml/voice/SsmlSub.java | 10 ++++---- .../java/com/twilio/twiml/voice/SsmlW.java | 10 ++++---- .../java/com/twilio/twiml/voice/Start.java | 10 ++++---- .../java/com/twilio/twiml/voice/Stop.java | 10 ++++---- .../java/com/twilio/twiml/voice/Stream.java | 10 ++++---- .../java/com/twilio/twiml/voice/Task.java | 10 ++++---- .../com/twilio/twiml/voice/Transcription.java | 10 ++++---- .../com/twilio/twiml/voice/VirtualAgent.java | 10 ++++---- .../java/com/twilio/twiml/voice/WhatsApp.java | 10 ++++---- .../twilio/base/TokenPaginationPageTest.java | 8 +++---- .../converter/CurrencyDeserializerTest.java | 8 +++---- .../converter/ISO8601DeserializerTest.java | 4 ++-- .../converter/LocalDateDeserializerTest.java | 4 ++-- .../converter/RFC2822DeserializerTest.java | 4 ++-- .../ZonedDateTimeListDeserializerTest.java | 6 ++--- .../twilio/exception/ApiExceptionTest.java | 2 +- .../exception/RestStandardExceptionTest.java | 2 +- .../com/twilio/http/TwilioRestClientTest.java | 4 ++-- .../jwt/accesstoken/AccessTokenTest.java | 2 +- .../jwt/validation/ValidationTokenTest.java | 2 +- src/test/java/com/twilio/type/TypeTest.java | 6 ++--- 653 files changed, 4952 insertions(+), 6502 deletions(-) diff --git a/pom.xml b/pom.xml index 22e63b2f9c..7c0e0f1ae1 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,8 @@ - 2.15.0 + 3.0.4 + 2.20 3.3.1 0.12.6 false @@ -232,28 +233,23 @@ httpcore5 5.3.4 - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + ${jackson.annotations.version} - com.fasterxml.jackson.core - jackson-databind + tools.jackson.core + jackson-core ${jackson.version} - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 + tools.jackson.core + jackson-databind ${jackson.version} - com.fasterxml.jackson.dataformat + tools.jackson.dataformat jackson-dataformat-xml ${jackson.version} @@ -349,8 +345,8 @@ maven-compiler-plugin 3.8.1 - 8 - 8 + 17 + 17 true true diff --git a/src/main/java/com/twilio/base/Page.java b/src/main/java/com/twilio/base/Page.java index ff580d0d37..51efc9d5a7 100644 --- a/src/main/java/com/twilio/base/Page.java +++ b/src/main/java/com/twilio/base/Page.java @@ -1,7 +1,7 @@ package com.twilio.base; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; import com.twilio.exception.ApiConnectionException; import java.io.IOException; diff --git a/src/main/java/com/twilio/base/TokenPaginationPage.java b/src/main/java/com/twilio/base/TokenPaginationPage.java index 07a90844f0..46f100ce0a 100644 --- a/src/main/java/com/twilio/base/TokenPaginationPage.java +++ b/src/main/java/com/twilio/base/TokenPaginationPage.java @@ -1,7 +1,7 @@ package com.twilio.base; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import lombok.Getter; diff --git a/src/main/java/com/twilio/converter/Converter.java b/src/main/java/com/twilio/converter/Converter.java index 2a9a5befbf..752cf7e82f 100644 --- a/src/main/java/com/twilio/converter/Converter.java +++ b/src/main/java/com/twilio/converter/Converter.java @@ -1,8 +1,8 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Arrays; @@ -48,14 +48,14 @@ public static String objectToJson(Object value) { if (value instanceof Collection || value instanceof Map) { try { return MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { return value.toString(); } } // Fallback: Try JSON, else toString try { return MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { return value.toString(); } } @@ -69,7 +69,7 @@ public static String objectToJson(Object value) { public static String mapToJson(final Map map) { try { return MAPPER.writeValueAsString(map); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { return null; } } diff --git a/src/main/java/com/twilio/converter/CurrencyDeserializer.java b/src/main/java/com/twilio/converter/CurrencyDeserializer.java index 59a9edecc3..1f34861bdd 100644 --- a/src/main/java/com/twilio/converter/CurrencyDeserializer.java +++ b/src/main/java/com/twilio/converter/CurrencyDeserializer.java @@ -1,17 +1,17 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; +import tools.jackson.databind.ValueDeserializer; + -import java.io.IOException; import java.util.Currency; -public class CurrencyDeserializer extends JsonDeserializer { +public class CurrencyDeserializer extends ValueDeserializer { @Override public Currency deserialize(JsonParser jsonParser, - DeserializationContext deserializationContext) throws IOException { + DeserializationContext deserializationContext) { String currencyCode = jsonParser.readValueAs(String.class); return Currency.getInstance(currencyCode.toUpperCase()); diff --git a/src/main/java/com/twilio/converter/ISO8601Deserializer.java b/src/main/java/com/twilio/converter/ISO8601Deserializer.java index a867287b63..248506ac6d 100644 --- a/src/main/java/com/twilio/converter/ISO8601Deserializer.java +++ b/src/main/java/com/twilio/converter/ISO8601Deserializer.java @@ -1,16 +1,15 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; +import tools.jackson.databind.ValueDeserializer; -import java.io.IOException; import java.time.ZonedDateTime; // open-api spec "format: date-time" -public class ISO8601Deserializer extends JsonDeserializer { +public class ISO8601Deserializer extends ValueDeserializer { @Override - public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) { String dateString = parser.getText(); return DateConverter.iso8601DateTimeFromString(dateString); } diff --git a/src/main/java/com/twilio/converter/LocalDateDeserializer.java b/src/main/java/com/twilio/converter/LocalDateDeserializer.java index a8a2260a4d..886d2e84df 100644 --- a/src/main/java/com/twilio/converter/LocalDateDeserializer.java +++ b/src/main/java/com/twilio/converter/LocalDateDeserializer.java @@ -1,16 +1,16 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; +import tools.jackson.databind.ValueDeserializer; + -import java.io.IOException; import java.time.LocalDate; // open-api spec "format: date" -public class LocalDateDeserializer extends JsonDeserializer { +public class LocalDateDeserializer extends ValueDeserializer { @Override - public LocalDate deserialize(JsonParser parser, DeserializationContext context) throws IOException { + public LocalDate deserialize(JsonParser parser, DeserializationContext context) { String dateString = parser.getText(); return DateConverter.localDateFromString(dateString); } diff --git a/src/main/java/com/twilio/converter/RFC2822Deserializer.java b/src/main/java/com/twilio/converter/RFC2822Deserializer.java index 56eb3e891d..29e27e2687 100644 --- a/src/main/java/com/twilio/converter/RFC2822Deserializer.java +++ b/src/main/java/com/twilio/converter/RFC2822Deserializer.java @@ -1,16 +1,16 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; +import tools.jackson.databind.ValueDeserializer; + -import java.io.IOException; import java.time.ZonedDateTime; // open-api spec "format: date-time-rfc-2822" -public class RFC2822Deserializer extends JsonDeserializer { +public class RFC2822Deserializer extends ValueDeserializer { @Override - public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) { String dateString = parser.getText(); return DateConverter.rfc2822DateTimeFromString(dateString); } diff --git a/src/main/java/com/twilio/converter/Serializer.java b/src/main/java/com/twilio/converter/Serializer.java index 4687a184fa..8c7dc18869 100644 --- a/src/main/java/com/twilio/converter/Serializer.java +++ b/src/main/java/com/twilio/converter/Serializer.java @@ -1,8 +1,8 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.constant.EnumConstants.ParameterType; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -38,12 +38,8 @@ public static void toString(Request request, ObjectMapper mapper, T value) { public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java b/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java index 2d98994219..017abdf578 100644 --- a/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java +++ b/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java @@ -1,19 +1,19 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; +import tools.jackson.core.JsonParser; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.DeserializationContext; +import tools.jackson.databind.ValueDeserializer; + -import java.io.IOException; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; -public class ZonedDateTimeListDeserializer extends JsonDeserializer> { +public class ZonedDateTimeListDeserializer extends ValueDeserializer> { @Override - public List deserialize(JsonParser parser, DeserializationContext context) throws IOException { + public List deserialize(JsonParser parser, DeserializationContext context) { List dateStrings = parser.readValueAs(new TypeReference>() { }); List dates = new ArrayList<>(); diff --git a/src/main/java/com/twilio/exception/RestException.java b/src/main/java/com/twilio/exception/RestException.java index e03f8db385..88e1741076 100644 --- a/src/main/java/com/twilio/exception/RestException.java +++ b/src/main/java/com/twilio/exception/RestException.java @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; import java.io.InputStream; @@ -53,7 +53,7 @@ public static RestException fromJson(final InputStream json, final ObjectMapper // Convert all checked exception to Runtime try { return objectMapper.readValue(json, RestException.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/exception/RestStandardException.java b/src/main/java/com/twilio/exception/RestStandardException.java index 19d1674f6a..da623d9277 100644 --- a/src/main/java/com/twilio/exception/RestStandardException.java +++ b/src/main/java/com/twilio/exception/RestStandardException.java @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; import java.io.InputStream; @@ -103,7 +103,7 @@ private RestStandardException( public static RestStandardException fromJson(final InputStream json, final ObjectMapper objectMapper) { try { return objectMapper.readValue(json, RestStandardException.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/http/TwilioRestClient.java b/src/main/java/com/twilio/http/TwilioRestClient.java index 2dafce8fad..5368203588 100644 --- a/src/main/java/com/twilio/http/TwilioRestClient.java +++ b/src/main/java/com/twilio/http/TwilioRestClient.java @@ -1,7 +1,6 @@ package com.twilio.http; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import tools.jackson.databind.ObjectMapper; import com.twilio.auth_strategy.AuthStrategy; import com.twilio.auth_strategy.NoAuthStrategy; import com.twilio.constant.EnumConstants; @@ -138,12 +137,8 @@ public Response request(final Request request) { } public static class Builder { - // This module configures the ObjectMapper to use - // public API methods for manipulating java.time.* - // classes. The alternative is to use reflection which - // generates warnings from the module system on Java 9+ - private static final ObjectMapper DEFAULT_OBJECT_MAPPER = new ObjectMapper() - .registerModule(new JavaTimeModule()); + // Java 8 time support is now built into Jackson 3 databind + private static final ObjectMapper DEFAULT_OBJECT_MAPPER = new ObjectMapper(); private String username; private String password; diff --git a/src/main/java/com/twilio/jwt/taskrouter/Policy.java b/src/main/java/com/twilio/jwt/taskrouter/Policy.java index d7969eb28a..dcdce6fb17 100644 --- a/src/main/java/com/twilio/jwt/taskrouter/Policy.java +++ b/src/main/java/com/twilio/jwt/taskrouter/Policy.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.http.HttpMethod; import java.io.ByteArrayOutputStream; diff --git a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java index adf8c8eba2..319abde1e3 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java +++ b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -59,7 +56,7 @@ public static AuthTokenPromotion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthTokenPromotion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static AuthTokenPromotion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthTokenPromotion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static AuthTokenPromotion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java index cfb50bb5bf..7a8d7de7ce 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static BulkConsents fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkConsents.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static BulkConsents fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkConsents.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static BulkConsents fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java index 17aac42f43..e14975741c 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static BulkContacts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkContacts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static BulkContacts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkContacts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static BulkContacts fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java index 8e251a30da..7af9e84eed 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java +++ b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -63,7 +60,7 @@ public static MessagingGeopermissions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessagingGeopermissions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static MessagingGeopermissions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessagingGeopermissions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static MessagingGeopermissions fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/Safelist.java b/src/main/java/com/twilio/rest/accounts/v1/Safelist.java index b76aaadd5e..359b4065e0 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/Safelist.java +++ b/src/main/java/com/twilio/rest/accounts/v1/Safelist.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -64,7 +61,7 @@ public static Safelist fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Safelist.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Safelist fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Safelist.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Safelist fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java index d6577ff6a8..cbdb4e00e0 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java +++ b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -63,7 +60,7 @@ public static SecondaryAuthToken fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SecondaryAuthToken.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static SecondaryAuthToken fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SecondaryAuthToken.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static SecondaryAuthToken fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java b/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java index 13ac28ef69..64ff0ed6ab 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java +++ b/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -75,7 +72,7 @@ public static Aws fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Aws.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static Aws fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Aws.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static Aws fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java b/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java index 636e9dd080..c231aafce7 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java +++ b/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -75,7 +72,7 @@ public static PublicKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PublicKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static PublicKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PublicKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static PublicKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/Account.java b/src/main/java/com/twilio/rest/api/v2010/Account.java index 3ab5a8a3a4..0c5530e07a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/Account.java +++ b/src/main/java/com/twilio/rest/api/v2010/Account.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -121,7 +118,7 @@ public static Account fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Account.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -143,7 +140,7 @@ public static Account fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Account.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -153,9 +150,9 @@ public static Account fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Address.java b/src/main/java/com/twilio/rest/api/v2010/account/Address.java index ac3bb3da99..9dcbfb6941 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Address.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Address.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -133,7 +130,7 @@ public static Address fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Address.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -155,7 +152,7 @@ public static Address fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Address.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -165,9 +162,9 @@ public static Address fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Application.java b/src/main/java/com/twilio/rest/api/v2010/account/Application.java index 0d580b1776..6c8c54c728 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Application.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Application.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static Application fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Application.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static Application fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Application.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static Application fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java index ff9a66c43e..fd8961148c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -126,7 +123,7 @@ public static AuthorizedConnectApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizedConnectApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,7 +145,7 @@ public static AuthorizedConnectApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizedConnectApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,9 +155,9 @@ public static AuthorizedConnectApp fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java index c89e4a31c0..1f2e471f0d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -83,7 +80,7 @@ public static AvailablePhoneNumberCountry fromJson( json, AvailablePhoneNumberCountry.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static AvailablePhoneNumberCountry fromJson( json, AvailablePhoneNumberCountry.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static AvailablePhoneNumberCountry fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Balance.java b/src/main/java/com/twilio/rest/api/v2010/account/Balance.java index 5589ec5de9..a9b8b77c5d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Balance.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Balance.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -60,7 +57,7 @@ public static Balance fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Balance.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static Balance fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Balance.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static Balance fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Call.java b/src/main/java/com/twilio/rest/api/v2010/account/Call.java index 8a831d33e7..7610c612dd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Call.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Call.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -196,7 +193,7 @@ public static Call fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Call.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -218,7 +215,7 @@ public static Call fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Call.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -228,9 +225,9 @@ public static Call fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Conference.java b/src/main/java/com/twilio/rest/api/v2010/account/Conference.java index f4cb5a7c35..c3479c7022 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Conference.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Conference.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -156,7 +153,7 @@ public static Conference fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conference.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -178,7 +175,7 @@ public static Conference fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conference.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -188,9 +185,9 @@ public static Conference fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java index a8718b35a2..258ee03193 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java @@ -17,12 +17,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -30,7 +28,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -140,7 +137,7 @@ public static ConnectApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -162,7 +159,7 @@ public static ConnectApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -172,9 +169,9 @@ public static ConnectApp fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java index a890937acb..a7adb2c160 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -32,7 +30,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -214,7 +211,7 @@ public static IncomingPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IncomingPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -236,7 +233,7 @@ public static IncomingPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IncomingPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -246,9 +243,9 @@ public static IncomingPhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Key.java b/src/main/java/com/twilio/rest/api/v2010/account/Key.java index 3990de5aee..72ed085c31 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Key.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Key.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -95,7 +92,7 @@ public static Key fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Key.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,7 +114,7 @@ public static Key fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Key.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,9 +124,9 @@ public static Key fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Message.java b/src/main/java/com/twilio/rest/api/v2010/account/Message.java index f9744c90c3..5c92872841 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Message.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -348,7 +345,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -370,7 +367,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -380,9 +377,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java b/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java index c155612b6b..1942edf7c9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -62,7 +59,7 @@ public static NewKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static NewKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static NewKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java index e731c086b5..7043ca2191 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -62,7 +59,7 @@ public static NewSigningKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewSigningKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static NewSigningKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewSigningKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static NewSigningKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Notification.java b/src/main/java/com/twilio/rest/api/v2010/account/Notification.java index 7385488386..afbc5893d5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Notification.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Notification.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -75,7 +72,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static Notification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java index 32cc333a82..48e177e768 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -95,7 +92,7 @@ public static OutgoingCallerId fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OutgoingCallerId.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,7 +114,7 @@ public static OutgoingCallerId fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OutgoingCallerId.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,9 +124,9 @@ public static OutgoingCallerId fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Queue.java b/src/main/java/com/twilio/rest/api/v2010/account/Queue.java index fa7d1cd1f7..945a93c28d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Queue.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Queue.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -106,7 +103,7 @@ public static Queue fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Queue.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,7 +125,7 @@ public static Queue fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Queue.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -138,9 +135,9 @@ public static Queue fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/Recording.java index 81e387b3a1..d46a3d473c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Recording.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -137,7 +134,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -159,7 +156,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -169,9 +166,9 @@ public static Recording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java b/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java index 90b4d24cdc..0b4d30895f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static ShortCode fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static ShortCode fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static ShortCode fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java index 4804969a81..8612907ed2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -95,7 +92,7 @@ public static SigningKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SigningKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,7 +114,7 @@ public static SigningKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SigningKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,9 +124,9 @@ public static SigningKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Token.java b/src/main/java/com/twilio/rest/api/v2010/account/Token.java index d31bf68e57..62429f4975 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Token.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Token.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.IceServer; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -64,7 +61,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Token fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java index 84e07259d4..e0af855b2d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.ZonedDateTime; @@ -108,7 +105,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,7 +127,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -140,9 +137,9 @@ public static Transcription fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java index 78e3c59631..9bab6cc5d2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -65,7 +62,7 @@ public static ValidationRequest fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ValidationRequest.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static ValidationRequest fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ValidationRequest.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static ValidationRequest fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java index 5d63b6840a..2fdb144ffd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -112,7 +109,7 @@ public static DependentPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DependentPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,7 +131,7 @@ public static DependentPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DependentPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,9 +141,9 @@ public static DependentPhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java index 7d944a99da..6dbf6e4045 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static Local fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Local.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Local fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Local.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Local fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java index 0b27ffe640..8b70c8534b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static MachineToMachine fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MachineToMachine.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static MachineToMachine fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MachineToMachine.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static MachineToMachine fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java index 202045ad2e..3245e949f7 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static Mobile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Mobile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Mobile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Mobile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Mobile fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java index 324c571fc6..6b0f0ec7dc 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static National fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, National.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static National fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, National.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static National fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java index ebed9d5889..3800876fd5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static SharedCost fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SharedCost.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static SharedCost fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SharedCost.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static SharedCost fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java index 29a2fa2025..4005c8fa3a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static TollFree fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollFree.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static TollFree fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollFree.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static TollFree fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java index c973cb1291..0b5fe6fb40 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Objects; @@ -65,7 +62,7 @@ public static Voip fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Voip.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Voip fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Voip.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Voip fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java index 546357a2f0..d770f39fcd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -63,7 +60,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static Event fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java index 67a339b296..bfaf9c8e4c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -82,7 +79,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static Notification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java index 0a8eecfc36..a5538c61ef 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -214,7 +211,7 @@ public static Payment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Payment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -236,7 +233,7 @@ public static Payment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Payment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -246,9 +243,9 @@ public static Payment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java index c97fbffabf..c302384279 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.ZonedDateTime; @@ -180,7 +177,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -202,7 +199,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -212,9 +209,9 @@ public static Recording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java index c378a47dcd..141bdd3c01 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -143,7 +140,7 @@ public static Siprec fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Siprec.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -165,7 +162,7 @@ public static Siprec fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Siprec.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -175,9 +172,9 @@ public static Siprec fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java index ac3008df6c..314569bad4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -148,7 +145,7 @@ public static Stream fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Stream.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -170,7 +167,7 @@ public static Stream fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Stream.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -180,9 +177,9 @@ public static Stream fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java index 35dac8da10..6b2c672fc9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -148,7 +145,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -170,7 +167,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -180,9 +177,9 @@ public static Transcription fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java index 709c3bf029..c6157b7e96 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -73,7 +70,7 @@ public static UserDefinedMessage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserDefinedMessage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,7 +92,7 @@ public static UserDefinedMessage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserDefinedMessage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,9 +102,9 @@ public static UserDefinedMessage fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java index b6f959a8d2..9d635464a3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -96,7 +93,7 @@ public static UserDefinedMessageSubscription fromJson( json, UserDefinedMessageSubscription.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static UserDefinedMessageSubscription fromJson( json, UserDefinedMessageSubscription.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static UserDefinedMessageSubscription fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java index dbbd5bf5fe..00a4a9928b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -169,7 +166,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -191,7 +188,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -201,9 +198,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java index 20b83dc42a..e5e0784b31 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Currency; @@ -168,7 +165,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -190,7 +187,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -200,9 +197,9 @@ public static Recording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java index f1120337c4..1851ef6d47 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -123,7 +120,7 @@ public static AssignedAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssignedAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -145,7 +142,7 @@ public static AssignedAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssignedAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -155,9 +152,9 @@ public static AssignedAddOn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java index e0a2ab1101..dc7d8c8d4d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -32,7 +30,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -168,7 +165,7 @@ public static Local fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Local.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -190,7 +187,7 @@ public static Local fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Local.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -200,9 +197,9 @@ public static Local fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java index cd640a8ad2..b63dd8cdb1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -32,7 +30,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -168,7 +165,7 @@ public static Mobile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Mobile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -190,7 +187,7 @@ public static Mobile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Mobile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -200,9 +197,9 @@ public static Mobile fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java index 5c056be595..d57b6244c4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -32,7 +30,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -168,7 +165,7 @@ public static TollFree fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollFree.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -190,7 +187,7 @@ public static TollFree fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollFree.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -200,9 +197,9 @@ public static TollFree fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java index 26108d43c6..e423be7ca8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -100,7 +97,7 @@ public static AssignedAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssignedAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -122,7 +119,7 @@ public static AssignedAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssignedAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -132,9 +129,9 @@ public static AssignedAddOnExtension fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java b/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java index d2d97ef100..c9a9177853 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -86,7 +83,7 @@ public static Feedback fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Feedback.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Feedback fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Feedback.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Feedback fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java b/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java index 01fd8e8011..6ca6fa8229 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -95,7 +92,7 @@ public static Media fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Media.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,7 +114,7 @@ public static Media fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Media.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,9 +124,9 @@ public static Media fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java b/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java index 79ddcdf9a3..1b369ee5d0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -103,7 +100,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static Member fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java index 749ca15e00..ecc3334cfd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -131,7 +128,7 @@ public static AddOnResult fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AddOnResult.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -153,7 +150,7 @@ public static AddOnResult fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AddOnResult.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -163,9 +160,9 @@ public static AddOnResult fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java index 1603dccd1a..17594685ec 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.ZonedDateTime; @@ -127,7 +124,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,7 +146,7 @@ public static Transcription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -159,9 +156,9 @@ public static Transcription fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java index 866ab1a894..cb19e6ffe0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -126,7 +123,7 @@ public static Payload fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Payload.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,7 +145,7 @@ public static Payload fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Payload.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,9 +155,9 @@ public static Payload fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java index cad4b322ba..4df6d0c2b1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -79,7 +76,7 @@ public static Data fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Data.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,7 +98,7 @@ public static Data fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Data.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,9 +108,9 @@ public static Data fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java index c8c7f2b556..037a3400be 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -111,7 +108,7 @@ public static CredentialList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,7 +130,7 @@ public static CredentialList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -143,9 +140,9 @@ public static CredentialList fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java index 53e66d6c20..b9997f6f38 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static Domain fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Domain.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static Domain fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Domain.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static Domain fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java index 44c3b285b4..f6a68f6712 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -119,7 +116,7 @@ public static IpAccessControlList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAccessControlList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,7 +138,7 @@ public static IpAccessControlList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAccessControlList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -151,9 +148,9 @@ public static IpAccessControlList fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java index 324f55c018..9195208ca1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -144,7 +141,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -166,7 +163,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -176,9 +173,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java index 6549ee5ce5..b2cda4bd8b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -127,7 +124,7 @@ public static CredentialListMapping fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialListMapping.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,7 +146,7 @@ public static CredentialListMapping fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialListMapping.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -159,9 +156,9 @@ public static CredentialListMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java index 72c6fe4287..30fbc8750d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -133,7 +130,7 @@ public static IpAccessControlListMapping fromJson( json, IpAccessControlListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,7 +155,7 @@ public static IpAccessControlListMapping fromJson( json, IpAccessControlListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,9 +165,9 @@ public static IpAccessControlListMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java index 8856bf346d..9864b8d089 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -139,7 +136,7 @@ public static AuthCallsCredentialListMapping fromJson( json, AuthCallsCredentialListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -164,7 +161,7 @@ public static AuthCallsCredentialListMapping fromJson( json, AuthCallsCredentialListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -174,9 +171,9 @@ public static AuthCallsCredentialListMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java index ce11b42b98..6292dd09c2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -139,7 +136,7 @@ public static AuthCallsIpAccessControlListMapping fromJson( json, AuthCallsIpAccessControlListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -164,7 +161,7 @@ public static AuthCallsIpAccessControlListMapping fromJson( json, AuthCallsIpAccessControlListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -174,9 +171,9 @@ public static AuthCallsIpAccessControlListMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java index c07fd6ce7a..782c025277 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -139,7 +136,7 @@ public static AuthRegistrationsCredentialListMapping fromJson( json, AuthRegistrationsCredentialListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -164,7 +161,7 @@ public static AuthRegistrationsCredentialListMapping fromJson( json, AuthRegistrationsCredentialListMapping.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -174,9 +171,9 @@ public static AuthRegistrationsCredentialListMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java index 158c3e3ae2..52dc3b7265 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -150,7 +147,7 @@ public static IpAddress fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAddress.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -172,7 +169,7 @@ public static IpAddress fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAddress.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -182,9 +179,9 @@ public static IpAddress fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java index 47322a2b73..51bc65f4ef 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Record fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Record.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Record fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Record.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Record fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java index 335f457c3f..b856e845be 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -163,7 +160,7 @@ public static Trigger fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trigger.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -185,7 +182,7 @@ public static Trigger fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trigger.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -195,9 +192,9 @@ public static Trigger fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java index 6e99f3084f..27484eceef 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static AllTime fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AllTime.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static AllTime fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AllTime.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static AllTime fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java index d14ddeaec8..b8d57f8881 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Daily fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Daily.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Daily fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Daily.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Daily fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java index a3a2de2bf3..18be25a75d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static LastMonth fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LastMonth.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static LastMonth fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LastMonth.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static LastMonth fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java index 7544657776..9548ea45f5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Monthly fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Monthly.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Monthly fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Monthly.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Monthly fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java index e2c5102e94..db9144e7b8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static ThisMonth fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ThisMonth.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static ThisMonth fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ThisMonth.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static ThisMonth fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java index f2220a1c22..33905bd508 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Today fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Today.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Today fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Today.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Today fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java index 28c3741417..dc20914257 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Yearly fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Yearly.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Yearly fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Yearly.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Yearly fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java index 412f3d8501..982b751cb3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.time.LocalDate; @@ -65,7 +62,7 @@ public static Yesterday fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Yesterday.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Yesterday fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Yesterday.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Yesterday fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java index 539f299bfb..520bfaf74f 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -1068,7 +1065,7 @@ public static Assistant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Assistant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1090,7 +1087,7 @@ public static Assistant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Assistant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1100,9 +1097,9 @@ public static Assistant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java b/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java index dc85f094b4..92d9d8e175 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java +++ b/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java b/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java index 006a6aea1d..9ead5aee60 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java +++ b/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java index 73948447e9..e5716ec2da 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -571,7 +568,7 @@ public static Knowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -593,7 +590,7 @@ public static Knowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -603,9 +600,9 @@ public static Knowledge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java b/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java index 533ba6f236..df222b93c2 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java b/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java index 040d4c9d2c..9bafa6919e 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java +++ b/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/Policy.java b/src/main/java/com/twilio/rest/assistants/v1/Policy.java index b6c1752891..a141e2f01f 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Policy.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Policy.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static Policy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Policy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Policy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Policy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Policy fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/Session.java b/src/main/java/com/twilio/rest/assistants/v1/Session.java index a8848b365c..3e5cfe28fa 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Session.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Session.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -62,7 +59,7 @@ public static Session fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Session.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static Session fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Session.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static Session fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/Tool.java b/src/main/java/com/twilio/rest/assistants/v1/Tool.java index eaed83c1d4..805ebb1836 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Tool.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Tool.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -805,7 +802,7 @@ public static Tool fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Tool.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -827,7 +824,7 @@ public static Tool fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Tool.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -837,9 +834,9 @@ public static Tool fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java b/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java index 7b8f27eb2c..de69d5018c 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java +++ b/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java b/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java index 4f799944b6..ed205d30f8 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java +++ b/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java index 7e7065262c..77b58d459b 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -74,7 +71,7 @@ public static AssistantsKnowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssistantsKnowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,7 +93,7 @@ public static AssistantsKnowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssistantsKnowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -106,9 +103,9 @@ public static AssistantsKnowledge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java index 03d6b697cd..0143f2ee08 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -72,7 +69,7 @@ public static AssistantsTool fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssistantsTool.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,7 +91,7 @@ public static AssistantsTool fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssistantsTool.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,9 +101,9 @@ public static AssistantsTool fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java index fefeffe5eb..4a2acee2d0 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -191,7 +188,7 @@ public static Feedback fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Feedback.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -213,7 +210,7 @@ public static Feedback fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Feedback.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -223,9 +220,9 @@ public static Feedback fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java index 078d3ecc84..24ac851e81 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1.assistant; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java index ce9d9fa670..f138505c64 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -205,7 +202,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -227,7 +224,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -237,9 +234,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java index 6324cc19fa..3265d41898 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.assistants.v1.assistant; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java index 005eaad1eb..83796e6cc8 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java +++ b/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static Chunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Chunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Chunk fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java index 70580dfac6..85df05f203 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java +++ b/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static KnowledgeStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static KnowledgeStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static KnowledgeStatus fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java b/src/main/java/com/twilio/rest/assistants/v1/session/Message.java index bb606b76aa..9fe492aa0b 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java +++ b/src/main/java/com/twilio/rest/assistants/v1/session/Message.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/Export.java b/src/main/java/com/twilio/rest/bulkexports/v1/Export.java index ab171ca5bc..71d0adea30 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/Export.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/Export.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -58,7 +55,7 @@ public static Export fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Export.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Export fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Export.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Export fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java index c519cb6a83..fd37512456 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static ExportConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExportConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static ExportConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExportConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static ExportConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java index 642616aa70..9d702aef91 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -64,7 +61,7 @@ public static Day fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Day.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Day fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Day.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Day fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java index 83e9ae5e90..e6a371cabd 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -71,7 +68,7 @@ public static ExportCustomJob fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExportCustomJob.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static ExportCustomJob fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExportCustomJob.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static ExportCustomJob fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java index c350129ec9..687a70d418 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static Job fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Job.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static Job fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Job.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static Job fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/Credential.java b/src/main/java/com/twilio/rest/chat/v1/Credential.java index fad656cd85..586cc57363 100644 --- a/src/main/java/com/twilio/rest/chat/v1/Credential.java +++ b/src/main/java/com/twilio/rest/chat/v1/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/Service.java b/src/main/java/com/twilio/rest/chat/v1/Service.java index abd6496cda..41cf8c3a62 100644 --- a/src/main/java/com/twilio/rest/chat/v1/Service.java +++ b/src/main/java/com/twilio/rest/chat/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -77,7 +74,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/Channel.java b/src/main/java/com/twilio/rest/chat/v1/service/Channel.java index b94c8d38a2..cac1ba24fd 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/Channel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -106,7 +103,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,7 +125,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -138,9 +135,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/Role.java b/src/main/java/com/twilio/rest/chat/v1/service/Role.java index 59730c72b5..482be8f1eb 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -112,7 +109,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,7 +131,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,9 +141,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/User.java b/src/main/java/com/twilio/rest/chat/v1/service/User.java index 2d50061cb5..eafe58b2a4 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/User.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/User.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java index ff3928c4fb..9f3370c265 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Invite fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java index 0338ddd847..32cb4ce422 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -94,7 +91,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -116,7 +113,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,9 +123,9 @@ public static Member fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java index 12ead63102..d6f6c5ab8c 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -115,7 +112,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,7 +134,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -147,9 +144,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java index f0b3a4e71b..d09a1d3f3b 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.Objects; @@ -82,7 +79,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static UserChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/Credential.java b/src/main/java/com/twilio/rest/chat/v2/Credential.java index daee7918ee..93de53aeeb 100644 --- a/src/main/java/com/twilio/rest/chat/v2/Credential.java +++ b/src/main/java/com/twilio/rest/chat/v2/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/Service.java b/src/main/java/com/twilio/rest/chat/v2/Service.java index d03a232a3b..3d6d7cb641 100644 --- a/src/main/java/com/twilio/rest/chat/v2/Service.java +++ b/src/main/java/com/twilio/rest/chat/v2/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -77,7 +74,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Binding.java b/src/main/java/com/twilio/rest/chat/v2/service/Binding.java index ce66c43d6b..6edba3873a 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Binding.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Binding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Binding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Channel.java b/src/main/java/com/twilio/rest/chat/v2/service/Channel.java index c402443ad3..038828297e 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Channel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -126,7 +123,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,7 +145,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,9 +155,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Role.java b/src/main/java/com/twilio/rest/chat/v2/service/Role.java index 2c47640ec6..f2b1c1bebc 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Role.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -112,7 +109,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,7 +131,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,9 +141,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/User.java b/src/main/java/com/twilio/rest/chat/v2/service/User.java index 734182dac2..b32f0ba25c 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/User.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/User.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java index aeffa6750a..c3f67f4487 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Invite fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java index 3b54841d48..ce07c30d40 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -115,7 +112,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,7 +134,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -147,9 +144,9 @@ public static Member fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java index bcdaebfbe8..4bdc5b8e15 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -134,7 +131,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -156,7 +153,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -166,9 +163,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java index 5e1fdc36a5..eec5c737ea 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -136,7 +133,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,7 +155,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,9 +165,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java index 0dbe10806d..a1e910f388 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -101,7 +98,7 @@ public static UserBinding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserBinding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static UserBinding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserBinding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static UserBinding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java index f0b4080a5c..0539c1dabf 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -159,7 +156,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -181,7 +178,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -191,9 +188,9 @@ public static UserChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/chat/v3/Channel.java b/src/main/java/com/twilio/rest/chat/v3/Channel.java index e02202e7f7..eef1f1a1d0 100644 --- a/src/main/java/com/twilio/rest/chat/v3/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v3/Channel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -103,7 +100,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v1/Content.java b/src/main/java/com/twilio/rest/content/v1/Content.java index f9b81a1119..4de76424b2 100644 --- a/src/main/java/com/twilio/rest/content/v1/Content.java +++ b/src/main/java/com/twilio/rest/content/v1/Content.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.net.URI; @@ -3495,7 +3492,7 @@ public static Content fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Content.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -3517,7 +3514,7 @@ public static Content fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Content.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -3527,9 +3524,9 @@ public static Content fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java b/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java index 7f5aa8305c..c95d880518 100644 --- a/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java +++ b/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static ContentAndApprovals fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ContentAndApprovals.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static ContentAndApprovals fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ContentAndApprovals.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static ContentAndApprovals fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v1/ContentCreator.java b/src/main/java/com/twilio/rest/content/v1/ContentCreator.java index 3d8412bb1c..ec149ad465 100644 --- a/src/main/java/com/twilio/rest/content/v1/ContentCreator.java +++ b/src/main/java/com/twilio/rest/content/v1/ContentCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.content.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/content/v1/ContentUpdater.java b/src/main/java/com/twilio/rest/content/v1/ContentUpdater.java index 9002e84580..92e3f535e6 100644 --- a/src/main/java/com/twilio/rest/content/v1/ContentUpdater.java +++ b/src/main/java/com/twilio/rest/content/v1/ContentUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.content.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/content/v1/LegacyContent.java b/src/main/java/com/twilio/rest/content/v1/LegacyContent.java index a88d174c62..ee6eae0ac8 100644 --- a/src/main/java/com/twilio/rest/content/v1/LegacyContent.java +++ b/src/main/java/com/twilio/rest/content/v1/LegacyContent.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -59,7 +56,7 @@ public static LegacyContent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LegacyContent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static LegacyContent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LegacyContent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static LegacyContent fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java index fb7fb8116f..4c9659eb1d 100644 --- a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java +++ b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -146,7 +143,7 @@ public static ApprovalCreate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApprovalCreate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,7 +165,7 @@ public static ApprovalCreate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApprovalCreate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -178,9 +175,9 @@ public static ApprovalCreate fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreateCreator.java b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreateCreator.java index 0b2d23221b..e69ee3ceeb 100644 --- a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreateCreator.java +++ b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreateCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.content.v1.content; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java b/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java index fba69a7e5d..fea859badd 100644 --- a/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java +++ b/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static ApprovalFetch fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApprovalFetch.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static ApprovalFetch fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApprovalFetch.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static ApprovalFetch fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v2/Content.java b/src/main/java/com/twilio/rest/content/v2/Content.java index 2e75271ba6..fe7ec85205 100644 --- a/src/main/java/com/twilio/rest/content/v2/Content.java +++ b/src/main/java/com/twilio/rest/content/v2/Content.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -60,7 +57,7 @@ public static Content fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Content.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static Content fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Content.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static Content fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java b/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java index 34e83f3e9a..46b57aea23 100644 --- a/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java +++ b/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static ContentAndApprovals fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ContentAndApprovals.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static ContentAndApprovals fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ContentAndApprovals.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static ContentAndApprovals fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java index 7a9fddfbdc..3e603ecec1 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -146,7 +143,7 @@ public static AddressConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AddressConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,7 +165,7 @@ public static AddressConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AddressConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -178,9 +175,9 @@ public static AddressConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/Configuration.java b/src/main/java/com/twilio/rest/conversations/v1/Configuration.java index 40ae50e372..42188fce1d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Configuration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Configuration.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -62,7 +59,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static Configuration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java index f0f30f6ea7..39627dd1c4 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -119,7 +116,7 @@ public static Conversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,7 +138,7 @@ public static Conversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -151,9 +148,9 @@ public static Conversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java index 301441f52d..cfeffc8bc7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -106,7 +103,7 @@ public static ConversationWithParticipants fromJson( json, ConversationWithParticipants.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static ConversationWithParticipants fromJson( json, ConversationWithParticipants.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static ConversationWithParticipants fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/Credential.java b/src/main/java/com/twilio/rest/conversations/v1/Credential.java index 33ca854214..aebcc7ca06 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Credential.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java index a01647e796..5ecd84b2dc 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -81,7 +78,7 @@ public static ParticipantConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ParticipantConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static ParticipantConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ParticipantConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static ParticipantConversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/Role.java b/src/main/java/com/twilio/rest/conversations/v1/Role.java index 4e886e29a3..ba251c73bf 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Role.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -104,7 +101,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,7 +123,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -136,9 +133,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/Service.java b/src/main/java/com/twilio/rest/conversations/v1/Service.java index e7ffa13baa..a6844da3a8 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Service.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -72,7 +69,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,7 +91,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,9 +101,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/User.java b/src/main/java/com/twilio/rest/conversations/v1/User.java index 1139896765..e9a4844bd7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/User.java +++ b/src/main/java/com/twilio/rest/conversations/v1/User.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java index 964b5298fa..3735bfc888 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -103,7 +100,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java index ad2bcfca44..3a55110d38 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -127,7 +124,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,7 +146,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -159,9 +156,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java index 23e1e89121..b757256600 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java index a41f4a50d6..f2acb2f288 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -129,7 +126,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -151,7 +148,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -161,9 +158,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java index 5673090803..9b929040d2 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -98,7 +95,7 @@ public static DeliveryReceipt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DeliveryReceipt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,7 +117,7 @@ public static DeliveryReceipt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DeliveryReceipt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,9 +127,9 @@ public static DeliveryReceipt fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java b/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java index 54bc4b34ee..ac2b731509 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Binding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java b/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java index 7cf5caa321..221f11491a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -66,7 +63,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Configuration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java index 94cd61608c..ab0685497b 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -128,7 +125,7 @@ public static Conversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -150,7 +147,7 @@ public static Conversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -160,9 +157,9 @@ public static Conversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java index d1977e9f09..907f00b0a2 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -108,7 +105,7 @@ public static ConversationWithParticipants fromJson( json, ConversationWithParticipants.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,7 +130,7 @@ public static ConversationWithParticipants fromJson( json, ConversationWithParticipants.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -143,9 +140,9 @@ public static ConversationWithParticipants fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java index f0d0cb4fb7..b3f14c0dbd 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Map; @@ -83,7 +80,7 @@ public static ParticipantConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ParticipantConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,7 +102,7 @@ public static ParticipantConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ParticipantConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,9 +112,9 @@ public static ParticipantConversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Role.java b/src/main/java/com/twilio/rest/conversations/v1/service/Role.java index 2974a7b675..6eb6ad87ce 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -117,7 +114,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -139,7 +136,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,9 +146,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/User.java b/src/main/java/com/twilio/rest/conversations/v1/service/User.java index 9642d9f06d..f50cea96ab 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/User.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/User.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java index 70ab79276f..e50eac5a71 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static Notification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java index cec068c075..79f22d22a0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -83,7 +80,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,7 +102,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,9 +112,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java index 21d33e661f..7ce2f4693d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -148,7 +145,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -170,7 +167,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -180,9 +177,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java index ea7008a727..d96a98d1dd 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -126,7 +123,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,7 +145,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,9 +155,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java index adefd55e94..c5583ffa75 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -152,7 +149,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -174,7 +171,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -184,9 +181,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java index f1630b9897..59b50defef 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static DeliveryReceipt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DeliveryReceipt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static DeliveryReceipt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DeliveryReceipt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static DeliveryReceipt fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java index 070f16523a..4088576388 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -141,7 +138,7 @@ public static UserConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -163,7 +160,7 @@ public static UserConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -173,9 +170,9 @@ public static UserConversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java index d0bf955bff..aea88853e7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -123,7 +120,7 @@ public static UserConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -145,7 +142,7 @@ public static UserConversation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserConversation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -155,9 +152,9 @@ public static UserConversation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/EventType.java b/src/main/java/com/twilio/rest/events/v1/EventType.java index fba71c03ff..5009e9ae69 100644 --- a/src/main/java/com/twilio/rest/events/v1/EventType.java +++ b/src/main/java/com/twilio/rest/events/v1/EventType.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static EventType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EventType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static EventType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EventType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static EventType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/Schema.java b/src/main/java/com/twilio/rest/events/v1/Schema.java index 9b3458fd83..f38e64449b 100644 --- a/src/main/java/com/twilio/rest/events/v1/Schema.java +++ b/src/main/java/com/twilio/rest/events/v1/Schema.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -60,7 +57,7 @@ public static Schema fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Schema.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static Schema fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Schema.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static Schema fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/Sink.java b/src/main/java/com/twilio/rest/events/v1/Sink.java index ef83779502..22ff82decc 100644 --- a/src/main/java/com/twilio/rest/events/v1/Sink.java +++ b/src/main/java/com/twilio/rest/events/v1/Sink.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -128,7 +125,7 @@ public static Sink fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sink.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -150,7 +147,7 @@ public static Sink fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sink.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -160,9 +157,9 @@ public static Sink fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/Subscription.java b/src/main/java/com/twilio/rest/events/v1/Subscription.java index 6e61e9927b..50c488335a 100644 --- a/src/main/java/com/twilio/rest/events/v1/Subscription.java +++ b/src/main/java/com/twilio/rest/events/v1/Subscription.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static Subscription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Subscription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static Subscription fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Subscription.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static Subscription fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java index 3cd7a0017a..1b3bc8402f 100644 --- a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java +++ b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -66,7 +63,7 @@ public static SchemaVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SchemaVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static SchemaVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SchemaVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static SchemaVersion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java b/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java index 5d99cd18c7..62c0bcfb25 100644 --- a/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java +++ b/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static SinkTest fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SinkTest.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static SinkTest fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SinkTest.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static SinkTest fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java b/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java index 6f8618a260..d12eec40cc 100644 --- a/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java +++ b/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -59,7 +56,7 @@ public static SinkValidate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SinkValidate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static SinkValidate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SinkValidate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static SinkValidate fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java index 067f8370ff..174177eb7c 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -87,7 +84,7 @@ public static SubscribedEvent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribedEvent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,7 +106,7 @@ public static SubscribedEvent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribedEvent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,9 +116,9 @@ public static SubscribedEvent fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java index 425d882dbc..4d472c95a2 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.net.URI; @@ -98,7 +95,7 @@ public static Assessments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Assessments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,7 +117,7 @@ public static Assessments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Assessments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,9 +127,9 @@ public static Assessments fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Channel.java b/src/main/java/com/twilio/rest/flexapi/v1/Channel.java index ceac2fc319..bcff469831 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Channel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Channel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java b/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java index 7452070304..f601e24501 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Configuration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Configuration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Configuration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/ConfigurationUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/ConfigurationUpdater.java index 88688835ff..9d35310bbc 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/ConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/ConfigurationUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.flexapi.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java index c8e1a0e875..29d1662dcc 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -224,7 +221,7 @@ public static CreateFlexInstance fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CreateFlexInstance.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -246,7 +243,7 @@ public static CreateFlexInstance fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CreateFlexInstance.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -256,9 +253,9 @@ public static CreateFlexInstance fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstanceCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstanceCreator.java index c978b53918..22d9a1794d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstanceCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstanceCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.flexapi.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java b/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java index ede7fc582f..cc14bd7e45 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -125,7 +122,7 @@ public static FlexFlow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlexFlow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -147,7 +144,7 @@ public static FlexFlow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlexFlow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -157,9 +154,9 @@ public static FlexFlow fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java index 331546fda1..a8f4222456 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.net.URI; @@ -79,7 +76,7 @@ public static InsightsAssessmentsComment fromJson( json, InsightsAssessmentsComment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static InsightsAssessmentsComment fromJson( json, InsightsAssessmentsComment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static InsightsAssessmentsComment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java index 4aa1b99644..794017d2b9 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static InsightsConversations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsConversations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static InsightsConversations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsConversations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static InsightsConversations fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java index 263e16a5ee..8fdc63d817 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -81,7 +78,7 @@ public static InsightsQuestionnaires fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsQuestionnaires.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static InsightsQuestionnaires fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsQuestionnaires.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static InsightsQuestionnaires fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java index 6d0ce4b941..bc5f6fb508 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -79,7 +76,7 @@ public static InsightsQuestionnairesCategory fromJson( json, InsightsQuestionnairesCategory.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static InsightsQuestionnairesCategory fromJson( json, InsightsQuestionnairesCategory.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static InsightsQuestionnairesCategory fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java index 2d2b8ebe46..0541056353 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -90,7 +87,7 @@ public static InsightsQuestionnairesQuestion fromJson( json, InsightsQuestionnairesQuestion.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,7 +112,7 @@ public static InsightsQuestionnairesQuestion fromJson( json, InsightsQuestionnairesQuestion.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,9 +122,9 @@ public static InsightsQuestionnairesQuestion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java index dbcefd53e3..e565136de7 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static InsightsSegments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSegments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static InsightsSegments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSegments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static InsightsSegments fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java index 8d0fbed33f..888c987eec 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static InsightsSession fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSession.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static InsightsSession fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSession.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static InsightsSession fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java index 0d4f5db287..78519017bd 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static InsightsSettingsAnswerSets fromJson( json, InsightsSettingsAnswerSets.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static InsightsSettingsAnswerSets fromJson( json, InsightsSettingsAnswerSets.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static InsightsSettingsAnswerSets fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java index 68a11dad9b..56a507eb7a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static InsightsSettingsComment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSettingsComment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static InsightsSettingsComment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsSettingsComment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static InsightsSettingsComment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java index e877828be2..d7dc9e396f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -58,7 +55,7 @@ public static InsightsUserRoles fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsUserRoles.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static InsightsUserRoles fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InsightsUserRoles.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static InsightsUserRoles fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java index 7a57afd515..bda6336ef8 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -66,7 +63,7 @@ public static Interaction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Interaction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Interaction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Interaction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Interaction fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java b/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java index 2ad15e0070..60fc755396 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -72,7 +69,7 @@ public static Plugin fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Plugin.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,7 +91,7 @@ public static Plugin fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Plugin.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,9 +101,9 @@ public static Plugin fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java index 49a3cb00ef..cca9ff09f9 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -59,7 +56,7 @@ public static PluginArchive fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginArchive.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static PluginArchive fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginArchive.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static PluginArchive fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java index c9a28ac5df..9207c3ad2d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -68,7 +65,7 @@ public static PluginConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,7 +87,7 @@ public static PluginConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,9 +97,9 @@ public static PluginConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java index 501f86e013..aa94c0ae75 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static PluginConfigurationArchive fromJson( json, PluginConfigurationArchive.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static PluginConfigurationArchive fromJson( json, PluginConfigurationArchive.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static PluginConfigurationArchive fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java index 9ec5eb49c1..7a1f7c46be 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -67,7 +64,7 @@ public static PluginRelease fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginRelease.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static PluginRelease fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginRelease.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static PluginRelease fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java index 7f56aa320b..ef67b97239 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -62,7 +59,7 @@ public static PluginVersionArchive fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginVersionArchive.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static PluginVersionArchive fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginVersionArchive.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static PluginVersionArchive fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java index c759148a07..0792a0c6f4 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -80,7 +77,7 @@ public static ProvisioningStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ProvisioningStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,7 +99,7 @@ public static ProvisioningStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ProvisioningStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -112,9 +109,9 @@ public static ProvisioningStatus fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java b/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java index b2201876cc..1a570a9b68 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static WebChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WebChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static WebChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WebChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static WebChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java index f8a39adbc4..e637971652 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -151,7 +148,7 @@ public static InteractionChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -173,7 +170,7 @@ public static InteractionChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -183,9 +180,9 @@ public static InteractionChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java index 3549ec67b3..afbd209fca 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -75,7 +72,7 @@ public static InteractionChannelInvite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionChannelInvite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static InteractionChannelInvite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionChannelInvite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static InteractionChannelInvite fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java index 6079388de4..f09e174326 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -138,7 +135,7 @@ public static InteractionChannelParticipant fromJson( json, InteractionChannelParticipant.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -163,7 +160,7 @@ public static InteractionChannelParticipant fromJson( json, InteractionChannelParticipant.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -173,9 +170,9 @@ public static InteractionChannelParticipant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java index b42eb86412..2ad5137caa 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -132,7 +129,7 @@ public static InteractionTransfer fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionTransfer.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -154,7 +151,7 @@ public static InteractionTransfer fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InteractionTransfer.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -164,9 +161,9 @@ public static InteractionTransfer fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferCreator.java index dde7a3bece..4591c3e19f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.flexapi.v1.interaction.interactionchannel; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferUpdater.java index 6c5a6144c7..54cc7b0316 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.flexapi.v1.interaction.interactionchannel; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java index f122508540..076b0ec18a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -74,7 +71,7 @@ public static PluginVersions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginVersions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,7 +93,7 @@ public static PluginVersions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PluginVersions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -106,9 +103,9 @@ public static PluginVersions fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java index f933a10c98..e9012cb7e9 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -68,7 +65,7 @@ public static ConfiguredPlugin fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConfiguredPlugin.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,7 +87,7 @@ public static ConfiguredPlugin fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConfiguredPlugin.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,9 +97,9 @@ public static ConfiguredPlugin fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java b/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java index 4d0ce94267..22cd8cdae3 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -70,7 +67,7 @@ public static FlexUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlexUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,7 +89,7 @@ public static FlexUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlexUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,9 +99,9 @@ public static FlexUser fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java b/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java index 254afcdb27..7d22f7d70e 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static WebChannels fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WebChannels.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static WebChannels fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WebChannels.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static WebChannels fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/frontlineapi/v1/User.java b/src/main/java/com/twilio/rest/frontlineapi/v1/User.java index 7c77559d21..a998edeaab 100644 --- a/src/main/java/com/twilio/rest/frontlineapi/v1/User.java +++ b/src/main/java/com/twilio/rest/frontlineapi/v1/User.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -82,7 +79,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/iam/v1/ApiKey.java b/src/main/java/com/twilio/rest/iam/v1/ApiKey.java index c89615d477..3deecfef72 100644 --- a/src/main/java/com/twilio/rest/iam/v1/ApiKey.java +++ b/src/main/java/com/twilio/rest/iam/v1/ApiKey.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -66,7 +63,7 @@ public static ApiKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApiKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static ApiKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApiKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static ApiKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java index ce8832761c..8a37ccd5a4 100644 --- a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java +++ b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -59,7 +56,7 @@ public static GetApiKeys fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, GetApiKeys.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static GetApiKeys fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, GetApiKeys.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static GetApiKeys fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java b/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java index b5d558252a..1da7897985 100644 --- a/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java +++ b/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -78,7 +75,7 @@ public static NewApiKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewApiKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,7 +97,7 @@ public static NewApiKey fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewApiKey.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,9 +107,9 @@ public static NewApiKey fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java b/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java index 6c40291359..83f6e3a469 100644 --- a/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java +++ b/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -588,7 +585,7 @@ public static OAuthApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OAuthApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -610,7 +607,7 @@ public static OAuthApp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OAuthApp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -620,9 +617,9 @@ public static OAuthApp fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/iam/v1/OAuthAppCreator.java b/src/main/java/com/twilio/rest/iam/v1/OAuthAppCreator.java index 9e410e33e1..8357bf3cda 100644 --- a/src/main/java/com/twilio/rest/iam/v1/OAuthAppCreator.java +++ b/src/main/java/com/twilio/rest/iam/v1/OAuthAppCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.iam.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/iam/v1/OAuthAppUpdater.java b/src/main/java/com/twilio/rest/iam/v1/OAuthAppUpdater.java index 57bc5e779d..8adc2f53b5 100644 --- a/src/main/java/com/twilio/rest/iam/v1/OAuthAppUpdater.java +++ b/src/main/java/com/twilio/rest/iam/v1/OAuthAppUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.iam.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/iam/v1/Token.java b/src/main/java/com/twilio/rest/iam/v1/Token.java index 793fd22271..45ec593c1a 100644 --- a/src/main/java/com/twilio/rest/iam/v1/Token.java +++ b/src/main/java/com/twilio/rest/iam/v1/Token.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -59,7 +56,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static Token fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/Call.java b/src/main/java/com/twilio/rest/insights/v1/Call.java index 000bc1163c..dcf8a5e90b 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Call.java +++ b/src/main/java/com/twilio/rest/insights/v1/Call.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -58,7 +55,7 @@ public static Call fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Call.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Call fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Call.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Call fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java b/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java index 5115a9666b..2b63234930 100644 --- a/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java +++ b/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -200,7 +197,7 @@ public static CallSummaries fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CallSummaries.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -222,7 +219,7 @@ public static CallSummaries fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CallSummaries.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -232,9 +229,9 @@ public static CallSummaries fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/Conference.java b/src/main/java/com/twilio/rest/insights/v1/Conference.java index 1379cb233a..7fe6e71b0e 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Conference.java +++ b/src/main/java/com/twilio/rest/insights/v1/Conference.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -223,7 +220,7 @@ public static Conference fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conference.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -245,7 +242,7 @@ public static Conference fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Conference.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -255,9 +252,9 @@ public static Conference fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/Room.java b/src/main/java/com/twilio/rest/insights/v1/Room.java index 702fa04f05..a1d2e320b5 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Room.java +++ b/src/main/java/com/twilio/rest/insights/v1/Room.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -271,7 +268,7 @@ public static Room fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Room.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -293,7 +290,7 @@ public static Room fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Room.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -303,9 +300,9 @@ public static Room fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/Setting.java b/src/main/java/com/twilio/rest/insights/v1/Setting.java index fdba8d3250..238bd5fc03 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Setting.java +++ b/src/main/java/com/twilio/rest/insights/v1/Setting.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static Setting fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Setting.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static Setting fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Setting.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static Setting fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java b/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java index a8c16217ac..74117a213c 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -108,7 +105,7 @@ public static Annotation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Annotation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,7 +127,7 @@ public static Annotation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Annotation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -140,9 +137,9 @@ public static Annotation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java b/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java index f46ecf5990..5eaefacfaa 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -155,7 +152,7 @@ public static CallSummary fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CallSummary.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -177,7 +174,7 @@ public static CallSummary fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CallSummary.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -187,9 +184,9 @@ public static CallSummary fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Event.java b/src/main/java/com/twilio/rest/insights/v1/call/Event.java index 0bc5521928..c35be13a70 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Event.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Event.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -103,7 +100,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static Event fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Metric.java b/src/main/java/com/twilio/rest/insights/v1/call/Metric.java index f2ce711742..4137bd0f58 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Metric.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Metric.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -102,7 +99,7 @@ public static Metric fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Metric.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,7 +121,7 @@ public static Metric fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Metric.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,9 +131,9 @@ public static Metric fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java index fe8bceae87..0db4d52f4f 100644 --- a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java +++ b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -209,7 +206,7 @@ public static ConferenceParticipant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConferenceParticipant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -231,7 +228,7 @@ public static ConferenceParticipant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConferenceParticipant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -241,9 +238,9 @@ public static ConferenceParticipant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java index a08c4d88ea..67e7937715 100644 --- a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java +++ b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -189,7 +186,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -211,7 +208,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -221,9 +218,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java index 34c4ef3171..8feb39f1e7 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -108,7 +105,7 @@ public static CustomOperator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CustomOperator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,7 +127,7 @@ public static CustomOperator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CustomOperator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -140,9 +137,9 @@ public static CustomOperator fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Operator.java b/src/main/java/com/twilio/rest/intelligence/v2/Operator.java index 1c5bd4867d..aa2637f180 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Operator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Operator.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static Operator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Operator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static Operator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Operator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static Operator fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java index b812dc8d6a..c2d36b5e7a 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -67,7 +64,7 @@ public static OperatorAttachment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorAttachment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static OperatorAttachment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorAttachment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static OperatorAttachment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java index 0d359dacb5..f2ab63c4ec 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -60,7 +57,7 @@ public static OperatorAttachments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorAttachments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static OperatorAttachments fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorAttachments.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static OperatorAttachments fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java index a7cd3a6106..d71560bd71 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -132,7 +129,7 @@ public static OperatorType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -154,7 +151,7 @@ public static OperatorType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -164,9 +161,9 @@ public static OperatorType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java b/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java index cd131a5fd9..1fb4732e8a 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -87,7 +84,7 @@ public static PrebuiltOperator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PrebuiltOperator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,7 +106,7 @@ public static PrebuiltOperator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PrebuiltOperator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,9 +116,9 @@ public static PrebuiltOperator fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Service.java b/src/main/java/com/twilio/rest/intelligence/v2/Service.java index 30d86179da..4bab675365 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Service.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Service.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java index 7c60e76b63..0bc5776f72 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -101,7 +98,7 @@ public static Transcript fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcript.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static Transcript fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcript.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static Transcript fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java index 315de50da2..fcbac8e18f 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -60,7 +57,7 @@ public static EncryptedOperatorResults fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EncryptedOperatorResults.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static EncryptedOperatorResults fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EncryptedOperatorResults.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static EncryptedOperatorResults fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java index 3d5550a7e0..88d8cc8fb7 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -59,7 +56,7 @@ public static EncryptedSentences fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EncryptedSentences.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static EncryptedSentences fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EncryptedSentences.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static EncryptedSentences fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java index 3fd0bbeb1b..8abe942c20 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Media fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Media.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Media fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Media.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Media fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java index f59aed108c..a2959dbac0 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.net.URI; @@ -92,7 +89,7 @@ public static OperatorResult fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorResult.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,7 +111,7 @@ public static OperatorResult fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OperatorResult.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,9 +121,9 @@ public static OperatorResult fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java index 7d59e0052d..00f757e86c 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static Sentence fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sentence.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Sentence fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sentence.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Sentence fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java b/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java index 9ffa29a5b7..37f63bc6d1 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java b/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java index 1f681f892f..354806bbf9 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -77,7 +74,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java index 3892f41f99..f3144c0e9c 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -106,7 +103,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,7 +125,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -138,9 +135,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java index 6d657ee76f..5adab76005 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -112,7 +109,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,7 +131,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,9 +141,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java index 8aca2793d1..b9b2274287 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java index 1f9a7c41da..094c7962a2 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Invite fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java index f49e939b9c..fbb048098e 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -94,7 +91,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -116,7 +113,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,9 +123,9 @@ public static Member fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java index 925e63ca75..0891ef5ccd 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -115,7 +112,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,7 +134,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -147,9 +144,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java index 8b84766365..3e697a3843 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.Objects; @@ -82,7 +79,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static UserChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java b/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java index d5aa80575a..226d91b214 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java b/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java index 53b6483f09..1076cbba7c 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -77,7 +74,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java index c4e68afc07..db7a918454 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Binding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java index 4d1ce8ccdf..818cbdf2c0 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -126,7 +123,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,7 +145,7 @@ public static Channel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Channel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,9 +155,9 @@ public static Channel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java index d5652eec4a..24c42b24e3 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -112,7 +109,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,7 +131,7 @@ public static Role fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Role.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,9 +141,9 @@ public static Role fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java index ef17deda9c..738ab04b64 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java index 60af4066d2..de1c50494d 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static Invite fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Invite.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static Invite fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java index 6fd01b55a2..700d76176e 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -115,7 +112,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,7 +134,7 @@ public static Member fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Member.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -147,9 +144,9 @@ public static Member fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java index e987ab8380..1cb3768833 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -134,7 +131,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -156,7 +153,7 @@ public static Message fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -166,9 +163,9 @@ public static Message fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java index a80159595b..c9258d0aef 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -136,7 +133,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,7 +155,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,9 +165,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java index ae481e9ead..43fcbb0e8d 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -101,7 +98,7 @@ public static UserBinding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserBinding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static UserBinding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserBinding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static UserBinding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java index 2f9da15b26..b9df86e60b 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -139,7 +136,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -161,7 +158,7 @@ public static UserChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UserChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -171,9 +168,9 @@ public static UserChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java index 60c76ff236..a7ce65e9a4 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -553,7 +550,7 @@ public static Knowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -575,7 +572,7 @@ public static Knowledge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -585,9 +582,9 @@ public static Knowledge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java index 954cb6107b..7fcf631620 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.knowledge.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java index 62b5117d8e..f0df28325d 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.knowledge.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java index 0b581740de..6033914bba 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static Chunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static Chunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static Chunk fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java index 9c5219256e..fb5b7e602a 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static KnowledgeStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static KnowledgeStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static KnowledgeStatus fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java index 1c588c16e9..f1e44ca0ff 100644 --- a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java index eefffa38eb..b24f70ad09 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -159,7 +156,7 @@ public static Bucket fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bucket.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -181,7 +178,7 @@ public static Bucket fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bucket.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -191,9 +188,9 @@ public static Bucket fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java b/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java index 3a880e8eac..b4c684c4ad 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java +++ b/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.lookups.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java index 37c207ff0a..3e343a8152 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -258,7 +255,7 @@ public static LookupOverride fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LookupOverride.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -280,7 +277,7 @@ public static LookupOverride fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, LookupOverride.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -290,9 +287,9 @@ public static LookupOverride fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java index 445ffe8d5a..6c830c4176 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.lookups.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java index 3b3a61cd9e..f20446a01d 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.lookups.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java index 06d6fc97aa..a7e8552e8a 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -1317,7 +1314,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1339,7 +1336,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1349,9 +1346,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v2/Query.java b/src/main/java/com/twilio/rest/lookups/v2/Query.java index 04d208bd31..e7221c157f 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Query.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Query.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -2276,7 +2273,7 @@ public static Query fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Query.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -2298,7 +2295,7 @@ public static Query fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Query.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -2308,9 +2305,9 @@ public static Query fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java b/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java index 8097ea52e4..83129b5b7a 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java +++ b/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.lookups.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java index 0bb4d4ce4c..98c7920294 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java +++ b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -194,7 +191,7 @@ public static RateLimit fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RateLimit.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -216,7 +213,7 @@ public static RateLimit fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RateLimit.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -226,9 +223,9 @@ public static RateLimit fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java b/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java index cbc97aa800..48bdfb4f91 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -62,7 +59,7 @@ public static AvailableAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static AvailableAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static AvailableAddOn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java b/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java index c225631f2c..7c7b7587da 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -82,7 +79,7 @@ public static InstalledAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static InstalledAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static InstalledAddOn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java b/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java index 97357031e9..b9d4e60d4e 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static ModuleData fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ModuleData.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static ModuleData fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ModuleData.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static ModuleData fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java b/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java index 9a399e6160..9389a89954 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static ModuleDataManagement fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ModuleDataManagement.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static ModuleDataManagement fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ModuleDataManagement.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static ModuleDataManagement fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java index 0951f3f4e0..db2adceaec 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -131,7 +128,7 @@ public static ReferralConversion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ReferralConversion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -153,7 +150,7 @@ public static ReferralConversion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ReferralConversion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -163,9 +160,9 @@ public static ReferralConversion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversionCreator.java b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversionCreator.java index c2e50eb2f9..7aaee0fe8d 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversionCreator.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversionCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.marketplace.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java index 627b370a5d..73f9b494cf 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -69,7 +66,7 @@ public static AvailableAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,7 +88,7 @@ public static AvailableAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,9 +98,9 @@ public static AvailableAddOnExtension fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java index 779325a4d1..14ab6780ce 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -81,7 +78,7 @@ public static InstalledAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static InstalledAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static InstalledAddOnExtension fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java index 2ec3ebe799..78debb7c36 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.List; @@ -275,7 +272,7 @@ public static InstalledAddOnUsage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnUsage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -297,7 +294,7 @@ public static InstalledAddOnUsage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnUsage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -307,9 +304,9 @@ public static InstalledAddOnUsage fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsageCreator.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsageCreator.java index 19c47d524e..ecd026d1d9 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsageCreator.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsageCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.marketplace.v1.installedaddon; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java b/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java index 89574abd00..810d15f18b 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java +++ b/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -178,7 +175,7 @@ public static BrandRegistration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandRegistration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -200,7 +197,7 @@ public static BrandRegistration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandRegistration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -210,9 +207,9 @@ public static BrandRegistration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java b/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java index 20c4492ac5..432723d79f 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Deactivations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Deactivations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Deactivations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Deactivations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Deactivations fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java b/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java index 735ff7b99a..24f5ad4320 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -70,7 +67,7 @@ public static DomainCerts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainCerts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,7 +89,7 @@ public static DomainCerts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainCerts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,9 +99,9 @@ public static DomainCerts fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java index a2e1032610..671621ff0c 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -63,7 +60,7 @@ public static DomainConfig fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainConfig.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static DomainConfig fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainConfig.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static DomainConfig fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java index 04cf512e6e..2485b411ed 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static DomainConfigMessagingService fromJson( json, DomainConfigMessagingService.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static DomainConfigMessagingService fromJson( json, DomainConfigMessagingService.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static DomainConfigMessagingService fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java index 62349341f0..7b6805cdc8 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static DomainValidateDn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainValidateDn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static DomainValidateDn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainValidateDn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static DomainValidateDn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java b/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java index b888995893..9d1bdb066b 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java +++ b/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -61,7 +58,7 @@ public static ExternalCampaign fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExternalCampaign.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static ExternalCampaign fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExternalCampaign.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static ExternalCampaign fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java index ca4364ea9c..ed40ab36f1 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -76,7 +73,7 @@ public static LinkshorteningMessagingService fromJson( json, LinkshorteningMessagingService.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,7 +98,7 @@ public static LinkshorteningMessagingService fromJson( json, LinkshorteningMessagingService.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,9 +108,9 @@ public static LinkshorteningMessagingService fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java index 6869fef06c..263466bed5 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -64,7 +61,7 @@ public static LinkshorteningMessagingServiceDomainAssociation fromJson( json, LinkshorteningMessagingServiceDomainAssociation.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static LinkshorteningMessagingServiceDomainAssociation fromJson( json, LinkshorteningMessagingServiceDomainAssociation.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static LinkshorteningMessagingServiceDomainAssociation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java index 12fe6ce4ec..4912c3c960 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java +++ b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -61,7 +58,7 @@ public static RequestManagedCert fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RequestManagedCert.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static RequestManagedCert fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RequestManagedCert.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static RequestManagedCert fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/Service.java b/src/main/java/com/twilio/rest/messaging/v1/Service.java index 511d322f65..042fefe368 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Service.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Service.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -99,7 +96,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java index b9fe9386ca..3249327729 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java +++ b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -188,7 +185,7 @@ public static TollfreeVerification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollfreeVerification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -210,7 +207,7 @@ public static TollfreeVerification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TollfreeVerification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -220,9 +217,9 @@ public static TollfreeVerification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/Usecase.java b/src/main/java/com/twilio/rest/messaging/v1/Usecase.java index d2a173be6e..0ca6348732 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Usecase.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Usecase.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static Usecase fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Usecase.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Usecase fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Usecase.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Usecase fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java index 1a7f88d825..42c86b927f 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -58,7 +55,7 @@ public static BrandRegistrationOtp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandRegistrationOtp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static BrandRegistrationOtp fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandRegistrationOtp.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static BrandRegistrationOtp fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java index bdb820fd74..fa0e2cf419 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -94,7 +91,7 @@ public static BrandVetting fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandVetting.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -116,7 +113,7 @@ public static BrandVetting fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BrandVetting.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,9 +123,9 @@ public static BrandVetting fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java index 7573e7f68b..e8ec94a520 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static AlphaSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AlphaSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static AlphaSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AlphaSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static AlphaSender fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java index 68a69758dd..eed88f2408 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -82,7 +79,7 @@ public static ChannelSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ChannelSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static ChannelSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ChannelSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static ChannelSender fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java index 3480f67fd4..e9af491e24 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -83,7 +80,7 @@ public static DestinationAlphaSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DestinationAlphaSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,7 +102,7 @@ public static DestinationAlphaSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DestinationAlphaSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,9 +112,9 @@ public static DestinationAlphaSender fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java index 0e247ffb47..818ba14c82 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java index d69435d105..0af1511faf 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static ShortCode fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static ShortCode fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static ShortCode fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java index aaeb520ba7..ff13242190 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -122,7 +119,7 @@ public static UsAppToPerson fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsAppToPerson.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,7 +141,7 @@ public static UsAppToPerson fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsAppToPerson.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -154,9 +151,9 @@ public static UsAppToPerson fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java index 17d7bceeb1..0bb1e0a478 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -59,7 +56,7 @@ public static UsAppToPersonUsecase fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsAppToPersonUsecase.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static UsAppToPersonUsecase fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsAppToPersonUsecase.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static UsAppToPersonUsecase fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java index b2ee260c4c..8cc91d29ad 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -2112,7 +2109,7 @@ public static ChannelsSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ChannelsSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -2134,7 +2131,7 @@ public static ChannelsSender fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ChannelsSender.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -2144,9 +2141,9 @@ public static ChannelsSender fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderCreator.java b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderCreator.java index 60b771242f..d9070d9c8c 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.messaging.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderUpdater.java b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderUpdater.java index 4f6ea54527..fda982bd90 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderUpdater.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSenderUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.messaging.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java b/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java index 35c854cca3..5ce04a1fdd 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java +++ b/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -59,7 +56,7 @@ public static DomainCerts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainCerts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static DomainCerts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DomainCerts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static DomainCerts fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java b/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java index 97e855092f..3d9dc9fa71 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java +++ b/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -79,7 +76,7 @@ public static TypingIndicator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TypingIndicator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,7 +98,7 @@ public static TypingIndicator fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TypingIndicator.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,9 +108,9 @@ public static TypingIndicator fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/monitor/v1/Alert.java b/src/main/java/com/twilio/rest/monitor/v1/Alert.java index 910dcd3117..7996926501 100644 --- a/src/main/java/com/twilio/rest/monitor/v1/Alert.java +++ b/src/main/java/com/twilio/rest/monitor/v1/Alert.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static Alert fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Alert.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Alert fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Alert.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Alert fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/monitor/v1/Event.java b/src/main/java/com/twilio/rest/monitor/v1/Event.java index 65a0e14754..1385b89500 100644 --- a/src/main/java/com/twilio/rest/monitor/v1/Event.java +++ b/src/main/java/com/twilio/rest/monitor/v1/Event.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Event fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/notify/v1/Credential.java b/src/main/java/com/twilio/rest/notify/v1/Credential.java index 5d5134907a..cdabc05ef2 100644 --- a/src/main/java/com/twilio/rest/notify/v1/Credential.java +++ b/src/main/java/com/twilio/rest/notify/v1/Credential.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Credential fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Credential.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Credential fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/notify/v1/Service.java b/src/main/java/com/twilio/rest/notify/v1/Service.java index cb1299f599..e3268d23f1 100644 --- a/src/main/java/com/twilio/rest/notify/v1/Service.java +++ b/src/main/java/com/twilio/rest/notify/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/notify/v1/service/Binding.java b/src/main/java/com/twilio/rest/notify/v1/service/Binding.java index 7d0a3ac7ab..6183bdf7ee 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/Binding.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/Binding.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -114,7 +111,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -136,7 +133,7 @@ public static Binding fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Binding.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -146,9 +143,9 @@ public static Binding fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/notify/v1/service/Notification.java b/src/main/java/com/twilio/rest/notify/v1/service/Notification.java index 867fcd2668..605de06846 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/Notification.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/Notification.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -80,7 +77,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,7 +99,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -112,9 +109,9 @@ public static Notification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java index 6477f57f98..1fc633f434 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java +++ b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static BulkEligibility fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkEligibility.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static BulkEligibility fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkEligibility.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static BulkEligibility fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityCreator.java b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityCreator.java index bb34e66e3c..401cf728a1 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java b/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java index 906f3a0785..12bfce73fb 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static Eligibility fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Eligibility.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Eligibility fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Eligibility.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Eligibility fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/EligibilityCreator.java b/src/main/java/com/twilio/rest/numbers/v1/EligibilityCreator.java index 897921b710..93e058be73 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/EligibilityCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/EligibilityCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java b/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java index 91fb5b9b7a..84d29f776f 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static PortingAllPortIn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingAllPortIn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static PortingAllPortIn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingAllPortIn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static PortingAllPortIn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java index 60854863a8..682b785c12 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.LocalDate; @@ -1213,7 +1210,7 @@ public static PortingPortIn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortIn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1235,7 +1232,7 @@ public static PortingPortIn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortIn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -1245,9 +1242,9 @@ public static PortingPortIn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInCreator.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInCreator.java index 90a97d91c7..1c11d67662 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java index b68a162886..a816a88333 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -75,7 +72,7 @@ public static PortingPortInPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortInPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static PortingPortInPhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortInPhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static PortingPortInPhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java index 669c031761..d318db41bf 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -82,7 +79,7 @@ public static PortingPortability fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortability.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static PortingPortability fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PortingPortability.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static PortingPortability fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java index af3e79341d..743ec7c780 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -61,7 +58,7 @@ public static PortingWebhookConfiguration fromJson( json, PortingWebhookConfiguration.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static PortingWebhookConfiguration fromJson( json, PortingWebhookConfiguration.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static PortingWebhookConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java index 058ab19bdf..f24f404155 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java index 9465bb5738..6358e015af 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java @@ -16,19 +16,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import lombok.ToString; @@ -79,7 +76,7 @@ public static PortingWebhookConfigurationDelete fromJson( json, PortingWebhookConfigurationDelete.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static PortingWebhookConfigurationDelete fromJson( json, PortingWebhookConfigurationDelete.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static PortingWebhookConfigurationDelete fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java index 1bd4624d7a..6088eb3037 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -64,7 +61,7 @@ public static SigningRequestConfiguration fromJson( json, SigningRequestConfiguration.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static SigningRequestConfiguration fromJson( json, SigningRequestConfiguration.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static SigningRequestConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java index 0c48f025ee..7c726ac9c1 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v1; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v1/Webhook.java b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java index 9b792278b4..e241194597 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/Webhook.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -60,7 +57,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/Application.java b/src/main/java/com/twilio/rest/numbers/v2/Application.java index 6a0818a161..d78af5bb49 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/Application.java +++ b/src/main/java/com/twilio/rest/numbers/v2/Application.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -375,7 +372,7 @@ public static Application fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Application.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -397,7 +394,7 @@ public static Application fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Application.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -407,9 +404,9 @@ public static Application fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/ApplicationCreator.java b/src/main/java/com/twilio/rest/numbers/v2/ApplicationCreator.java index 8507045f44..6ff3c058ed 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/ApplicationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/ApplicationCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java index 5351be886c..52096a914d 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -107,7 +104,7 @@ public static AuthorizationDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizationDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,7 +126,7 @@ public static AuthorizationDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizationDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -139,9 +136,9 @@ public static AuthorizationDocument fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java index 37cedcb5b7..ff7d9bb466 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static BulkHostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkHostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static BulkHostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkHostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static BulkHostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java index 0fa375aac8..cd35323092 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.numbers.v2; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java b/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java index 1f8bfae08e..86ab3bf80f 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -87,7 +84,7 @@ public static BundleClone fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BundleClone.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,7 +106,7 @@ public static BundleClone fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BundleClone.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,9 +116,9 @@ public static BundleClone fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java index 5957597298..69be02ecbb 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -138,7 +135,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -160,7 +157,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -170,9 +167,9 @@ public static HostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java index b25fb90873..d102154087 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -91,7 +88,7 @@ public static DependentHostedNumberOrder fromJson( json, DependentHostedNumberOrder.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -116,7 +113,7 @@ public static DependentHostedNumberOrder fromJson( json, DependentHostedNumberOrder.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,9 +123,9 @@ public static DependentHostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java index 533cdc270b..5344ff313d 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -164,7 +161,7 @@ public static Bundle fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bundle.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -186,7 +183,7 @@ public static Bundle fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bundle.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -196,9 +193,9 @@ public static Bundle fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java index bdbe68ec90..8eeb2fd3b9 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -99,7 +96,7 @@ public static EndUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static EndUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static EndUser fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java index 7deae5e4f8..0f0ec879cf 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static EndUserType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUserType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static EndUserType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUserType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static EndUserType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java index ce56e41880..058670c31b 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -82,7 +79,7 @@ public static Regulation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Regulation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static Regulation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Regulation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static Regulation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java index 04b4865852..9641ea058e 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -104,7 +101,7 @@ public static SupportingDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,7 +123,7 @@ public static SupportingDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -136,9 +133,9 @@ public static SupportingDocument fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java index 455a807fb8..893f63c06f 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static SupportingDocumentType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocumentType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static SupportingDocumentType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocumentType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static SupportingDocumentType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java index f84abbb0bc..b4232a59e0 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static BundleCopy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BundleCopy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static BundleCopy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BundleCopy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static BundleCopy fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java index 6582efdade..03216f7415 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -92,7 +89,7 @@ public static Evaluation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Evaluation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,7 +111,7 @@ public static Evaluation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Evaluation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,9 +121,9 @@ public static Evaluation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java index 4a78fd2f35..83e62f5878 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -80,7 +77,7 @@ public static ItemAssignment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ItemAssignment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,7 +99,7 @@ public static ItemAssignment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ItemAssignment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -112,9 +109,9 @@ public static ItemAssignment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java index 119d6d81fd..a3f2f82e60 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -87,7 +84,7 @@ public static ReplaceItems fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ReplaceItems.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,7 +106,7 @@ public static ReplaceItems fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ReplaceItems.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,9 +116,9 @@ public static ReplaceItems fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java index 0e6a58c70e..07c7f072a6 100644 --- a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -141,7 +138,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -163,7 +160,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -173,9 +170,9 @@ public static HostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/oauth/v1/Authorize.java b/src/main/java/com/twilio/rest/oauth/v1/Authorize.java index 14415cfbf5..b5259aef6e 100644 --- a/src/main/java/com/twilio/rest/oauth/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v1/Authorize.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Authorize fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/oauth/v1/Token.java b/src/main/java/com/twilio/rest/oauth/v1/Token.java index 2fa6a848d3..bb2bc211ed 100644 --- a/src/main/java/com/twilio/rest/oauth/v1/Token.java +++ b/src/main/java/com/twilio/rest/oauth/v1/Token.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -59,7 +56,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static Token fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/oauth/v2/Authorize.java b/src/main/java/com/twilio/rest/oauth/v2/Authorize.java index 8d1e34ea76..ac43a5b64d 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v2/Authorize.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Authorize fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/oauth/v2/Token.java b/src/main/java/com/twilio/rest/oauth/v2/Token.java index cabcfd643b..7c95b23eb9 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/Token.java +++ b/src/main/java/com/twilio/rest/oauth/v2/Token.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static Token fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java index b9e17e691b..58795669fa 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static AuthorizationDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizationDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static AuthorizationDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AuthorizationDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static AuthorizationDocument fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java index e295dc0399..ef1fc8c32b 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -129,7 +126,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -151,7 +148,7 @@ public static HostedNumberOrder fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HostedNumberOrder.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -161,9 +158,9 @@ public static HostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java index 4f4cb8a0c4..d005fa059c 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -114,7 +111,7 @@ public static DependentHostedNumberOrder fromJson( json, DependentHostedNumberOrder.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -139,7 +136,7 @@ public static DependentHostedNumberOrder fromJson( json, DependentHostedNumberOrder.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,9 +146,9 @@ public static DependentHostedNumberOrder fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java b/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java index 0c00be20a7..4bc8334260 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Map; @@ -62,7 +59,7 @@ public static AvailableAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static AvailableAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static AvailableAddOn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java index 48323221e1..29f1bb0d29 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -82,7 +79,7 @@ public static InstalledAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static InstalledAddOn fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOn.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static InstalledAddOn fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java index d196d6a149..ed0b96dff7 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -69,7 +66,7 @@ public static AvailableAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,7 +88,7 @@ public static AvailableAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AvailableAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,9 +98,9 @@ public static AvailableAddOnExtension fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java index 182484feee..67e5b03e41 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -81,7 +78,7 @@ public static InstalledAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static InstalledAddOnExtension fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, InstalledAddOnExtension.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static InstalledAddOnExtension fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/wireless/Command.java b/src/main/java/com/twilio/rest/preview/wireless/Command.java index 985c9969a7..f91bb76ff6 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/Command.java +++ b/src/main/java/com/twilio/rest/preview/wireless/Command.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -67,7 +64,7 @@ public static Command fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Command.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static Command fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Command.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static Command fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java b/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java index 6f96213f8f..13db531232 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java +++ b/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static RatePlan fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RatePlan.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static RatePlan fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RatePlan.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static RatePlan fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/wireless/Sim.java b/src/main/java/com/twilio/rest/preview/wireless/Sim.java index c05e785ae9..d49fbecbf6 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/Sim.java +++ b/src/main/java/com/twilio/rest/preview/wireless/Sim.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -69,7 +66,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,7 +88,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,9 +98,9 @@ public static Sim fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java b/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java index 064a9e4a37..4318c738d0 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java +++ b/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Usage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Usage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Usage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Usage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Usage fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java index ed9f99c72b..cf27591bfa 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -88,7 +85,7 @@ public static Account fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Account.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static Account fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Account.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static Account fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java index 870d19e1d0..570bef66ff 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Builder; @@ -181,7 +178,7 @@ public static RoleAssignment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RoleAssignment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -203,7 +200,7 @@ public static RoleAssignment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RoleAssignment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -213,9 +210,9 @@ public static RoleAssignment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java index 8374ac254c..4c526b34c4 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.previewiam.organizations; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/User.java b/src/main/java/com/twilio/rest/previewiam/organizations/User.java index abf0fe7fe1..2c3ce1946a 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/User.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/User.java @@ -18,20 +18,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -641,7 +638,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -663,7 +660,7 @@ public static User fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, User.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -673,9 +670,9 @@ public static User fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java index 02d0cd5f93..28d3b59cbf 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.previewiam.organizations; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java index bfe4f94617..e9f56c252e 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.previewiam.organizations; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java b/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java index e7a119fddb..cb3bfdf29f 100644 --- a/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -57,7 +54,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Authorize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Authorize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Authorize fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/previewiam/v1/Token.java b/src/main/java/com/twilio/rest/previewiam/v1/Token.java index fd951d2c5b..eaba946be9 100644 --- a/src/main/java/com/twilio/rest/previewiam/v1/Token.java +++ b/src/main/java/com/twilio/rest/previewiam/v1/Token.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -59,7 +56,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static Token fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Token.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static Token fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java b/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java index 5e3a78594e..798e9c9a1d 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundSmsPrice; import com.twilio.type.OutboundSmsPrice; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -66,7 +63,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java index 2e3b990163..afe3ade860 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberPrice; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -65,7 +62,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java b/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java index e0f06002f7..39c65e61d1 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundPrefixPrice; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -66,7 +63,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java b/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java index a076aa02b2..eabe70b2b8 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundCallPrice; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -63,7 +60,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static Number fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v2/Country.java b/src/main/java/com/twilio/rest/pricing/v2/Country.java index 42860480ed..c678da024a 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Country.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundPrefixPriceWithOrigin; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -66,7 +63,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v2/Number.java b/src/main/java/com/twilio/rest/pricing/v2/Number.java index 0f14b808f9..74cc124112 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Number.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundPrefixPriceWithOrigin; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -64,7 +61,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Number fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java b/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java index 42e453af60..f9826cb231 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundPrefixPriceWithOrigin; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -66,7 +63,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java b/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java index f7e3b0358a..c93f247ae0 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -31,7 +29,6 @@ import com.twilio.type.InboundCallPrice; import com.twilio.type.OutboundCallPriceWithOrigin; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Currency; @@ -64,7 +61,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static Number fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Number.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static Number fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/Service.java b/src/main/java/com/twilio/rest/proxy/v1/Service.java index faae7ed3a6..36e96a9b07 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/Service.java +++ b/src/main/java/com/twilio/rest/proxy/v1/Service.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -122,7 +119,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -144,7 +141,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -154,9 +151,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java index 85581ba775..2c41c5a315 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -85,7 +82,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/Session.java b/src/main/java/com/twilio/rest/proxy/v1/service/Session.java index c9b99ee17e..94a1107f4a 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/Session.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/Session.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -130,7 +127,7 @@ public static Session fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Session.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -152,7 +149,7 @@ public static Session fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Session.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -162,9 +159,9 @@ public static Session fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java index 4a4257abba..d6f3e22da3 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -139,7 +136,7 @@ public static Interaction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Interaction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -161,7 +158,7 @@ public static Interaction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Interaction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -171,9 +168,9 @@ public static Interaction fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java index 633a0d7ed1..d1ca09f964 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -91,7 +88,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,7 +110,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,9 +120,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java index 549159221d..b7d121084c 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -171,7 +168,7 @@ public static MessageInteraction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessageInteraction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -193,7 +190,7 @@ public static MessageInteraction fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessageInteraction.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -203,9 +200,9 @@ public static MessageInteraction fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java b/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java index c9f8b68812..839cbd7d26 100644 --- a/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -63,7 +60,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/routes/v2/SipDomain.java b/src/main/java/com/twilio/rest/routes/v2/SipDomain.java index fa814c4552..5e5f2b4e81 100644 --- a/src/main/java/com/twilio/rest/routes/v2/SipDomain.java +++ b/src/main/java/com/twilio/rest/routes/v2/SipDomain.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -63,7 +60,7 @@ public static SipDomain fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SipDomain.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static SipDomain fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SipDomain.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static SipDomain fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/routes/v2/Trunk.java b/src/main/java/com/twilio/rest/routes/v2/Trunk.java index c49f712a9c..8b4819463a 100644 --- a/src/main/java/com/twilio/rest/routes/v2/Trunk.java +++ b/src/main/java/com/twilio/rest/routes/v2/Trunk.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -63,7 +60,7 @@ public static Trunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static Trunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static Trunk fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/Service.java b/src/main/java/com/twilio/rest/serverless/v1/Service.java index 76a62ead35..1ccacd7e2f 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/Service.java +++ b/src/main/java/com/twilio/rest/serverless/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -79,7 +76,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,7 +98,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,9 +108,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java b/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java index 69e2cda5e7..f973ae1432 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -89,7 +86,7 @@ public static Asset fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Asset.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,7 +108,7 @@ public static Asset fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Asset.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,9 +118,9 @@ public static Asset fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java index d3a69bd84f..ba84bd876c 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -127,7 +124,7 @@ public static Build fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Build.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -149,7 +146,7 @@ public static Build fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Build.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -159,9 +156,9 @@ public static Build fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java b/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java index 4fdf19327d..744d5f9e42 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static Environment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Environment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static Environment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Environment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static Environment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Function.java b/src/main/java/com/twilio/rest/serverless/v1/service/Function.java index 251f64ab9f..c3098fab9e 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Function.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Function.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -89,7 +86,7 @@ public static Function fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Function.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,7 +108,7 @@ public static Function fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Function.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,9 +118,9 @@ public static Function fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java index 29d2bb7b60..7e9804edd8 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -92,7 +89,7 @@ public static AssetVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssetVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,7 +111,7 @@ public static AssetVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AssetVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,9 +121,9 @@ public static AssetVersion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java index 09c3365775..7fdfc7a7ca 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -82,7 +79,7 @@ public static BuildStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BuildStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static BuildStatus fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BuildStatus.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static BuildStatus fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java index c2e2c42339..512e8dd7d2 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static Deployment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Deployment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static Deployment fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Deployment.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static Deployment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java index 7a75b72dc0..67e668e0ea 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -70,7 +67,7 @@ public static Log fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Log.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,7 +89,7 @@ public static Log fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Log.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,9 +99,9 @@ public static Log fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java index 9ddefc4ad1..595084acf3 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -100,7 +97,7 @@ public static Variable fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Variable.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -122,7 +119,7 @@ public static Variable fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Variable.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -132,9 +129,9 @@ public static Variable fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java index 8a3f09a2b6..3737e1ad71 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static FunctionVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FunctionVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static FunctionVersion fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FunctionVersion.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static FunctionVersion fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java index 4664238d5c..1056f67fbd 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static FunctionVersionContent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FunctionVersionContent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static FunctionVersionContent fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FunctionVersionContent.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static FunctionVersionContent fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/Flow.java b/src/main/java/com/twilio/rest/studio/v1/Flow.java index fac43f8f51..baf7369b4b 100644 --- a/src/main/java/com/twilio/rest/studio/v1/Flow.java +++ b/src/main/java/com/twilio/rest/studio/v1/Flow.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -89,7 +86,7 @@ public static Flow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Flow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,7 +108,7 @@ public static Flow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Flow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,9 +118,9 @@ public static Flow fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java b/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java index 7a758a0b4f..9c2ad0a570 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -103,7 +100,7 @@ public static Engagement fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Engagement.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static Engagement fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Engagement.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static Engagement fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java b/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java index e5347ef066..1dc160ba15 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -111,7 +108,7 @@ public static Execution fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Execution.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,7 +130,7 @@ public static Execution fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Execution.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -143,9 +140,9 @@ public static Execution fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java index 842f852af7..9db076c9ab 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static EngagementContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EngagementContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static EngagementContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EngagementContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static EngagementContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java index a372189080..8f324455cd 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -71,7 +68,7 @@ public static Step fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Step.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static Step fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Step.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static Step fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java index ed362ef291..e4f361347b 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static StepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, StepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static StepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, StepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static StepContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java index e6e7339ff8..556b041fe2 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static ExecutionContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static ExecutionContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static ExecutionContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java index 8b3092a543..63f23c56b7 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -71,7 +68,7 @@ public static ExecutionStep fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStep.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static ExecutionStep fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStep.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static ExecutionStep fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java index d748acb275..60cd76f8bf 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static ExecutionStepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static ExecutionStepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static ExecutionStepContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/Flow.java b/src/main/java/com/twilio/rest/studio/v2/Flow.java index 2320f8b4e2..1d1aa27c22 100644 --- a/src/main/java/com/twilio/rest/studio/v2/Flow.java +++ b/src/main/java/com/twilio/rest/studio/v2/Flow.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static Flow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Flow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static Flow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Flow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static Flow fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java index e83cf61ead..6cde5fdf71 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -81,7 +78,7 @@ public static FlowValidate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowValidate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static FlowValidate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowValidate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static FlowValidate fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java b/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java index 78cb4eba43..98c9dca919 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -111,7 +108,7 @@ public static Execution fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Execution.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,7 +130,7 @@ public static Execution fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Execution.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -143,9 +140,9 @@ public static Execution fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java index b2f10b2cad..691f7bb9fb 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static FlowRevision fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowRevision.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static FlowRevision fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowRevision.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static FlowRevision fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java b/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java index 82d5102620..a7bd0bde97 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -65,7 +62,7 @@ public static FlowTestUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowTestUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static FlowTestUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, FlowTestUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static FlowTestUser fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java index 04541256a4..b62dfc1efb 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static ExecutionContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static ExecutionContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static ExecutionContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java index 555abc1fa9..2e25a9bded 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -71,7 +68,7 @@ public static ExecutionStep fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStep.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static ExecutionStep fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStep.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static ExecutionStep fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java index 05a4469f35..d6b8383eae 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static ExecutionStepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static ExecutionStepContext fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ExecutionStepContext.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static ExecutionStepContext fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java b/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java index ba034af30a..38e3c0bab9 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java +++ b/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -92,7 +89,7 @@ public static EsimProfile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EsimProfile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,7 +111,7 @@ public static EsimProfile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EsimProfile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,9 +121,9 @@ public static EsimProfile fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/Fleet.java b/src/main/java/com/twilio/rest/supersim/v1/Fleet.java index 4eadb7b626..f6ccd9010c 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Fleet.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Fleet.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -92,7 +89,7 @@ public static Fleet fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Fleet.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,7 +111,7 @@ public static Fleet fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Fleet.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,9 +121,9 @@ public static Fleet fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java b/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java index 78ec52f3d9..012e4511c0 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java +++ b/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -134,7 +131,7 @@ public static IpCommand fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpCommand.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -156,7 +153,7 @@ public static IpCommand fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpCommand.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -166,9 +163,9 @@ public static IpCommand fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/Network.java b/src/main/java/com/twilio/rest/supersim/v1/Network.java index 2cec60fb82..d1aaf04507 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Network.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Network.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static Network fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Network.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static Network fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Network.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static Network fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java b/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java index 4947bc19ee..a34c6e0235 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java +++ b/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -72,7 +69,7 @@ public static NetworkAccessProfile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NetworkAccessProfile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,7 +91,7 @@ public static NetworkAccessProfile fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NetworkAccessProfile.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,9 +101,9 @@ public static NetworkAccessProfile fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java b/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java index 86fa17a3a3..0211056abf 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java +++ b/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -82,7 +79,7 @@ public static SettingsUpdate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SettingsUpdate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -104,7 +101,7 @@ public static SettingsUpdate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SettingsUpdate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -114,9 +111,9 @@ public static SettingsUpdate fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/Sim.java b/src/main/java/com/twilio/rest/supersim/v1/Sim.java index 86362c478b..f30917ca6d 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Sim.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Sim.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -120,7 +117,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -142,7 +139,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -152,9 +149,9 @@ public static Sim fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java b/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java index b92e60d906..c784ed517f 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java +++ b/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -114,7 +111,7 @@ public static SmsCommand fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SmsCommand.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -136,7 +133,7 @@ public static SmsCommand fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SmsCommand.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -146,9 +143,9 @@ public static SmsCommand fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java b/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java index a9fb40f12a..903a74fb4d 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java +++ b/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.util.Currency; @@ -103,7 +100,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static UsageRecord fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java index ec680816c0..1c4ac9e410 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -95,7 +92,7 @@ public static NetworkAccessProfileNetwork fromJson( json, NetworkAccessProfileNetwork.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,7 +117,7 @@ public static NetworkAccessProfileNetwork fromJson( json, NetworkAccessProfileNetwork.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,9 +127,9 @@ public static NetworkAccessProfileNetwork fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java b/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java index 75d9d55421..aa2af1b0a2 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java +++ b/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -79,7 +76,7 @@ public static BillingPeriod fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BillingPeriod.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,7 +98,7 @@ public static BillingPeriod fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BillingPeriod.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -111,9 +108,9 @@ public static BillingPeriod fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java b/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java index b0306d3eb7..c3de7ef1aa 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java +++ b/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -77,7 +74,7 @@ public static SimIpAddress fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SimIpAddress.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static SimIpAddress fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SimIpAddress.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static SimIpAddress fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/Service.java b/src/main/java/com/twilio/rest/sync/v1/Service.java index 748078e716..d8fbd47c2c 100644 --- a/src/main/java/com/twilio/rest/sync/v1/Service.java +++ b/src/main/java/com/twilio/rest/sync/v1/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/Document.java b/src/main/java/com/twilio/rest/sync/v1/service/Document.java index 7611cf399f..919b16e5bd 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/Document.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/Document.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -85,7 +82,7 @@ public static Document fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Document.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static Document fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Document.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static Document fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java index 712be9fcd0..0c29626596 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -85,7 +82,7 @@ public static SyncList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static SyncList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static SyncList fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java index 6d20ae1d74..6c05dabf99 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -85,7 +82,7 @@ public static SyncMap fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMap.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static SyncMap fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMap.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static SyncMap fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java index 22aa646713..641a2fbb3c 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -85,7 +82,7 @@ public static SyncStream fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncStream.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static SyncStream fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncStream.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static SyncStream fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java index 16c23f7a22..9451f0c2e9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -102,7 +99,7 @@ public static DocumentPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DocumentPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,7 +121,7 @@ public static DocumentPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DocumentPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,9 +131,9 @@ public static DocumentPermission fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java index 1a1f2d4e47..176133e31e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -135,7 +132,7 @@ public static SyncListItem fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncListItem.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -157,7 +154,7 @@ public static SyncListItem fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncListItem.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -167,9 +164,9 @@ public static SyncListItem fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java index 2a15e30f2c..d0c88b9b3e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -102,7 +99,7 @@ public static SyncListPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncListPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,7 +121,7 @@ public static SyncListPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncListPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,9 +131,9 @@ public static SyncListPermission fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java index e04fb2fa8d..3e121f07f9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -136,7 +133,7 @@ public static SyncMapItem fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMapItem.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -158,7 +155,7 @@ public static SyncMapItem fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMapItem.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -168,9 +165,9 @@ public static SyncMapItem fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java index 2c5a90254e..c63c5b00fe 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -102,7 +99,7 @@ public static SyncMapPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMapPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -124,7 +121,7 @@ public static SyncMapPermission fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SyncMapPermission.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -134,9 +131,9 @@ public static SyncMapPermission fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java index c5eef39b51..c0f1314ded 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -60,7 +57,7 @@ public static StreamMessage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, StreamMessage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static StreamMessage fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, StreamMessage.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static StreamMessage fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java b/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java index 2d67dbbdce..6fcc05b0c8 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static Workspace fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Workspace.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static Workspace fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Workspace.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static Workspace fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java index cea63cb054..266d570af7 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static Activity fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Activity.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static Activity fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Activity.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static Activity fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java index e684a2fa00..c5fcc6ac21 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -66,7 +63,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Event fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Event fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java index cc4ddd8ea7..5b7ab9d217 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -110,7 +107,7 @@ public static Task fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Task.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -132,7 +129,7 @@ public static Task fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Task.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -142,9 +139,9 @@ public static Task fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java index afcb75c056..cd72a69671 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -93,7 +90,7 @@ public static TaskChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,7 +112,7 @@ public static TaskChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,9 +122,9 @@ public static TaskChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java index 25f802a6a6..8e91ca847e 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -109,7 +106,7 @@ public static TaskQueue fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueue.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static TaskQueue fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueue.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static TaskQueue fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java index 7622eb6bb6..7456a0d2ee 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static Worker fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Worker.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static Worker fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Worker.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static Worker fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java index 45f2e82be8..065047c5e6 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -93,7 +90,7 @@ public static Workflow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Workflow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,7 +112,7 @@ public static Workflow fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Workflow.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,9 +122,9 @@ public static Workflow fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java index 388669777d..d6a55ff1d7 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -64,7 +61,7 @@ public static WorkspaceCumulativeStatistics fromJson( json, WorkspaceCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static WorkspaceCumulativeStatistics fromJson( json, WorkspaceCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static WorkspaceCumulativeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java index 087a47848c..0c6387fffa 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -63,7 +60,7 @@ public static WorkspaceRealTimeStatistics fromJson( json, WorkspaceRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static WorkspaceRealTimeStatistics fromJson( json, WorkspaceRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static WorkspaceRealTimeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java index 7f50158263..14745fd7c2 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -59,7 +56,7 @@ public static WorkspaceStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkspaceStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static WorkspaceStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkspaceStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static WorkspaceStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java index 0f3872c12f..b472733ff1 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -174,7 +171,7 @@ public static Reservation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Reservation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -196,7 +193,7 @@ public static Reservation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Reservation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -206,9 +203,9 @@ public static Reservation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java index 176f5346d4..7ce2bc9e5c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -63,7 +60,7 @@ public static TaskQueueBulkRealTimeStatistics fromJson( json, TaskQueueBulkRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static TaskQueueBulkRealTimeStatistics fromJson( json, TaskQueueBulkRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static TaskQueueBulkRealTimeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatisticsCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatisticsCreator.java index 330f706ec7..a269f5c987 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatisticsCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatisticsCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.taskrouter.v1.workspace.taskqueue; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java index 64d1a2173c..5dd47fbb50 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -68,7 +65,7 @@ public static TaskQueueCumulativeStatistics fromJson( json, TaskQueueCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static TaskQueueCumulativeStatistics fromJson( json, TaskQueueCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static TaskQueueCumulativeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java index afdbaaba54..3836736c6e 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -67,7 +64,7 @@ public static TaskQueueRealTimeStatistics fromJson( json, TaskQueueRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,7 +89,7 @@ public static TaskQueueRealTimeStatistics fromJson( json, TaskQueueRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,9 +99,9 @@ public static TaskQueueRealTimeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java index 5437a31c53..4129c888e8 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -63,7 +60,7 @@ public static TaskQueueStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueueStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static TaskQueueStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueueStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static TaskQueueStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java index 1a8aafaa9b..d2e0f306db 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -58,7 +55,7 @@ public static TaskQueuesStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueuesStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static TaskQueuesStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueuesStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static TaskQueuesStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java index 376ed41bfd..bbeb9285de 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -153,7 +150,7 @@ public static Reservation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Reservation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -175,7 +172,7 @@ public static Reservation fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Reservation.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -185,9 +182,9 @@ public static Reservation fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java index a8475ac85f..179c859bff 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -86,7 +83,7 @@ public static WorkerChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkerChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,7 +105,7 @@ public static WorkerChannel fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkerChannel.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,9 +115,9 @@ public static WorkerChannel fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java index b10cb24227..b8ac9a1382 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static WorkerStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkerStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static WorkerStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkerStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static WorkerStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java index 4266d7ca60..b79acbcc2b 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -65,7 +62,7 @@ public static WorkersCumulativeStatistics fromJson( json, WorkersCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,7 +87,7 @@ public static WorkersCumulativeStatistics fromJson( json, WorkersCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,9 +97,9 @@ public static WorkersCumulativeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java index c2441862f9..7abdbcd2bc 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -63,7 +60,7 @@ public static WorkersRealTimeStatistics fromJson( json, WorkersRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static WorkersRealTimeStatistics fromJson( json, WorkersRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static WorkersRealTimeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java index 13c9a4cd7d..a5c459509f 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -59,7 +56,7 @@ public static WorkersStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkersStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -81,7 +78,7 @@ public static WorkersStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkersStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,9 +88,9 @@ public static WorkersStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java index a88051dcdb..cd2aed9738 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -68,7 +65,7 @@ public static WorkflowCumulativeStatistics fromJson( json, WorkflowCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,7 +90,7 @@ public static WorkflowCumulativeStatistics fromJson( json, WorkflowCumulativeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,9 +100,9 @@ public static WorkflowCumulativeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java index ef686577c6..a477153a3c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -66,7 +63,7 @@ public static WorkflowRealTimeStatistics fromJson( json, WorkflowRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -91,7 +88,7 @@ public static WorkflowRealTimeStatistics fromJson( json, WorkflowRealTimeStatistics.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -101,9 +98,9 @@ public static WorkflowRealTimeStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java index 04bb2e2a17..a900be0e62 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -60,7 +57,7 @@ public static WorkflowStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkflowStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -82,7 +79,7 @@ public static WorkflowStatistics fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, WorkflowStatistics.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,9 +89,9 @@ public static WorkflowStatistics fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java index 297ec77d03..1d623cf510 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java +++ b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -120,7 +117,7 @@ public static Trunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -142,7 +139,7 @@ public static Trunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Trunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -152,9 +149,9 @@ public static Trunk fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java index 9131ebbbcc..507a58eadd 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -80,7 +77,7 @@ public static CredentialList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,7 +99,7 @@ public static CredentialList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CredentialList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -112,9 +109,9 @@ public static CredentialList fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java index 39b4c23f65..a7577ffe58 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -83,7 +80,7 @@ public static IpAccessControlList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAccessControlList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,7 +102,7 @@ public static IpAccessControlList fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpAccessControlList.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,9 +112,9 @@ public static IpAccessControlList fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java index b1878822c3..fa90613ad6 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -98,7 +95,7 @@ public static OriginationUrl fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OriginationUrl.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,7 +117,7 @@ public static OriginationUrl fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, OriginationUrl.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -130,9 +127,9 @@ public static OriginationUrl fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java index 9da9d5077a..0d794f4abe 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -32,7 +30,6 @@ import com.twilio.type.*; import com.twilio.type.PhoneNumberCapabilities; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -106,7 +103,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,7 +125,7 @@ public static PhoneNumber fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PhoneNumber.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -138,9 +135,9 @@ public static PhoneNumber fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java index f232207c78..498079eea6 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -104,7 +101,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -126,7 +123,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -136,9 +133,9 @@ public static Recording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java index 14c329e18a..76bf61cfae 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -67,7 +64,7 @@ public static ComplianceInquiries fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ComplianceInquiries.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,7 +86,7 @@ public static ComplianceInquiries fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ComplianceInquiries.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,9 +96,9 @@ public static ComplianceInquiries fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java index ebe09d9a9e..2e37f52d84 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -167,7 +164,7 @@ public static ComplianceRegistrationInquiries fromJson( json, ComplianceRegistrationInquiries.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -192,7 +189,7 @@ public static ComplianceRegistrationInquiries fromJson( json, ComplianceRegistrationInquiries.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -202,9 +199,9 @@ public static ComplianceRegistrationInquiries fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java index 67d29062cd..a8f32a8301 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -113,7 +110,7 @@ public static ComplianceTollfreeInquiries fromJson( json, ComplianceTollfreeInquiries.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -138,7 +135,7 @@ public static ComplianceTollfreeInquiries fromJson( json, ComplianceTollfreeInquiries.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -148,9 +145,9 @@ public static ComplianceTollfreeInquiries fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java index 30f7650acc..e5e6cd428d 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static CustomerProfiles fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CustomerProfiles.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static CustomerProfiles fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CustomerProfiles.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static CustomerProfiles fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java index 52747ace40..091e2a9cc5 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -78,7 +75,7 @@ public static EndUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,7 +97,7 @@ public static EndUser fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUser.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,9 +107,9 @@ public static EndUser fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java index 24fb669995..7af7583635 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static EndUserType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUserType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static EndUserType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, EndUserType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static EndUserType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/Policies.java b/src/main/java/com/twilio/rest/trusthub/v1/Policies.java index 1d47da815e..3c09794a0d 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/Policies.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/Policies.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static Policies fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Policies.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static Policies fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Policies.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static Policies fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java index 994f193410..41c9fb9516 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -103,7 +100,7 @@ public static SupportingDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static SupportingDocument fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocument.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static SupportingDocument fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java index 99d66b2774..065f733eb9 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -62,7 +59,7 @@ public static SupportingDocumentType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocumentType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -84,7 +81,7 @@ public static SupportingDocumentType fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SupportingDocumentType.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -94,9 +91,9 @@ public static SupportingDocumentType fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java b/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java index 7d7f8c7288..c88a61afff 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -105,7 +102,7 @@ public static TrustProducts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TrustProducts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -127,7 +124,7 @@ public static TrustProducts fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TrustProducts.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -137,9 +134,9 @@ public static TrustProducts fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java index 5cc505cb95..a2fb77f587 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -98,7 +95,7 @@ public static CustomerProfilesChannelEndpointAssignment fromJson( json, CustomerProfilesChannelEndpointAssignment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static CustomerProfilesChannelEndpointAssignment fromJson( json, CustomerProfilesChannelEndpointAssignment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static CustomerProfilesChannelEndpointAssignment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java index 28ee8ac76a..e3116f74f4 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -96,7 +93,7 @@ public static CustomerProfilesEntityAssignments fromJson( json, CustomerProfilesEntityAssignments.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static CustomerProfilesEntityAssignments fromJson( json, CustomerProfilesEntityAssignments.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static CustomerProfilesEntityAssignments fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java index afea014c9c..1cd9e7c8f6 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -106,7 +103,7 @@ public static CustomerProfilesEvaluations fromJson( json, CustomerProfilesEvaluations.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,7 +128,7 @@ public static CustomerProfilesEvaluations fromJson( json, CustomerProfilesEvaluations.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,9 +138,9 @@ public static CustomerProfilesEvaluations fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java index 8c0b311b46..41e8a94d8b 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -98,7 +95,7 @@ public static TrustProductsChannelEndpointAssignment fromJson( json, TrustProductsChannelEndpointAssignment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static TrustProductsChannelEndpointAssignment fromJson( json, TrustProductsChannelEndpointAssignment.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static TrustProductsChannelEndpointAssignment fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java index c71e018363..f5f1e7e8c9 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -94,7 +91,7 @@ public static TrustProductsEntityAssignments fromJson( json, TrustProductsEntityAssignments.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static TrustProductsEntityAssignments fromJson( json, TrustProductsEntityAssignments.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static TrustProductsEntityAssignments fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java index aff170b0ac..07e0cdcc59 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -103,7 +100,7 @@ public static TrustProductsEvaluations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TrustProductsEvaluations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -125,7 +122,7 @@ public static TrustProductsEvaluations fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TrustProductsEvaluations.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -135,9 +132,9 @@ public static TrustProductsEvaluations fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/Form.java b/src/main/java/com/twilio/rest/verify/v2/Form.java index 54f3513d3a..63d4e35175 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Form.java +++ b/src/main/java/com/twilio/rest/verify/v2/Form.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -77,7 +74,7 @@ public static Form fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Form.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -99,7 +96,7 @@ public static Form fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Form.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,9 +106,9 @@ public static Form fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/Safelist.java b/src/main/java/com/twilio/rest/verify/v2/Safelist.java index ab15073c50..463d12c71a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Safelist.java +++ b/src/main/java/com/twilio/rest/verify/v2/Safelist.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -65,7 +62,7 @@ public static Safelist fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Safelist.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -87,7 +84,7 @@ public static Safelist fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Safelist.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,9 +94,9 @@ public static Safelist fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/Service.java b/src/main/java/com/twilio/rest/verify/v2/Service.java index e35c39dd5c..1ff06c1242 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Service.java +++ b/src/main/java/com/twilio/rest/verify/v2/Service.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static Service fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Service.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static Service fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/Template.java b/src/main/java/com/twilio/rest/verify/v2/Template.java index b6e19cb155..4aa526c833 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Template.java +++ b/src/main/java/com/twilio/rest/verify/v2/Template.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Objects; @@ -57,7 +54,7 @@ public static Template fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Template.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static Template fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Template.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static Template fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java index 00439771e1..2251a465cb 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -107,7 +104,7 @@ public static VerificationAttempt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, VerificationAttempt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,7 +126,7 @@ public static VerificationAttempt fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, VerificationAttempt.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -139,9 +136,9 @@ public static VerificationAttempt fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java index 2cfb6df648..fe3721bbf0 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -84,7 +81,7 @@ public static VerificationAttemptsSummary fromJson( json, VerificationAttemptsSummary.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -109,7 +106,7 @@ public static VerificationAttemptsSummary fromJson( json, VerificationAttemptsSummary.class ); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,9 +116,9 @@ public static VerificationAttemptsSummary fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java b/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java index f0156dfc03..a61ff87ecf 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -90,7 +87,7 @@ public static AccessToken fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AccessToken.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -112,7 +109,7 @@ public static AccessToken fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, AccessToken.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -122,9 +119,9 @@ public static AccessToken fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java index 684723451c..a1987dfd11 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -439,7 +436,7 @@ public static ApproveChallenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApproveChallenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -461,7 +458,7 @@ public static ApproveChallenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ApproveChallenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -471,9 +468,9 @@ public static ApproveChallenge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallengeUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallengeUpdater.java index a609333b5a..313912dfae 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallengeUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallengeUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.verify.v2.service; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Entity.java b/src/main/java/com/twilio/rest/verify/v2/service/Entity.java index 712535f7c5..9cfa47490b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Entity.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Entity.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static Entity fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Entity.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static Entity fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Entity.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static Entity fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java index a6ecf0cc1d..2d2b593f07 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -99,7 +96,7 @@ public static MessagingConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessagingConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static MessagingConfiguration fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, MessagingConfiguration.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static MessagingConfiguration fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java b/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java index ee6e2b5462..f4204fb5b4 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -220,7 +217,7 @@ public static NewChallenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewChallenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -242,7 +239,7 @@ public static NewChallenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewChallenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -252,9 +249,9 @@ public static NewChallenge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewChallengeCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/NewChallengeCreator.java index e7593d5893..2781404e94 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewChallengeCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewChallengeCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.verify.v2.service; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java index 7992f45409..1e86299fd1 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -531,7 +528,7 @@ public static NewFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -553,7 +550,7 @@ public static NewFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -563,9 +560,9 @@ public static NewFactor fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewFactorCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/NewFactorCreator.java index 5c6ff6521a..5269e7add1 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewFactorCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewFactorCreator.java @@ -14,7 +14,7 @@ package com.twilio.rest.verify.v2.service; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java index 6788850694..86c0afef27 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java @@ -18,21 +18,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -435,7 +432,7 @@ public static NewVerifyFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewVerifyFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -457,7 +454,7 @@ public static NewVerifyFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewVerifyFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -467,9 +464,9 @@ public static NewVerifyFactor fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactorUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactorUpdater.java index 378502ade0..b50353281f 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactorUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactorUpdater.java @@ -14,7 +14,7 @@ package com.twilio.rest.verify.v2.service; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java index 8a305fd772..7a952b8613 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -88,7 +85,7 @@ public static RateLimit fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RateLimit.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,7 +107,7 @@ public static RateLimit fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RateLimit.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -120,9 +117,9 @@ public static RateLimit fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Verification.java b/src/main/java/com/twilio/rest/verify/v2/service/Verification.java index 31a46ec659..3d9023ddfc 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Verification.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Verification.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -143,7 +140,7 @@ public static Verification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Verification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -165,7 +162,7 @@ public static Verification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Verification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -175,9 +172,9 @@ public static Verification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java index f102fb8049..cabfa789e4 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -85,7 +82,7 @@ public static VerificationCheck fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, VerificationCheck.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,7 +104,7 @@ public static VerificationCheck fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, VerificationCheck.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -117,9 +114,9 @@ public static VerificationCheck fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java b/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java index 587b676e0c..16e0c2755a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -156,7 +153,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -178,7 +175,7 @@ public static Webhook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Webhook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -188,9 +185,9 @@ public static Webhook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java index 1ccf2a423d..f43d5e5b43 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -172,7 +169,7 @@ public static Challenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Challenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -194,7 +191,7 @@ public static Challenge fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Challenge.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -204,9 +201,9 @@ public static Challenge fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java index 7a50021922..5b25c09c22 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -149,7 +146,7 @@ public static Factor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Factor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -171,7 +168,7 @@ public static Factor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Factor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -181,9 +178,9 @@ public static Factor fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java index e1d03e67e1..26cc3ba38b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -156,7 +153,7 @@ public static NewFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -178,7 +175,7 @@ public static NewFactor fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, NewFactor.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -188,9 +185,9 @@ public static NewFactor fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java index a1189c890b..806a742b72 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -66,7 +63,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,7 +85,7 @@ public static Notification fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Notification.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,9 +95,9 @@ public static Notification fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java index d71453cb98..44d49d25ec 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -100,7 +97,7 @@ public static Bucket fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bucket.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -122,7 +119,7 @@ public static Bucket fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Bucket.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -132,9 +129,9 @@ public static Bucket fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/Composition.java b/src/main/java/com/twilio/rest/video/v1/Composition.java index 846c43a031..ba09a7a6eb 100644 --- a/src/main/java/com/twilio/rest/video/v1/Composition.java +++ b/src/main/java/com/twilio/rest/video/v1/Composition.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -118,7 +115,7 @@ public static Composition fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Composition.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -140,7 +137,7 @@ public static Composition fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Composition.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -150,9 +147,9 @@ public static Composition fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionHook.java b/src/main/java/com/twilio/rest/video/v1/CompositionHook.java index f7e6394c68..ce11430c75 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionHook.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionHook.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -101,7 +98,7 @@ public static CompositionHook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CompositionHook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static CompositionHook fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CompositionHook.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static CompositionHook fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java b/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java index 889924990a..ac3ed0ff2f 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -63,7 +60,7 @@ public static CompositionSettings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CompositionSettings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static CompositionSettings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, CompositionSettings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static CompositionSettings fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/Recording.java b/src/main/java/com/twilio/rest/video/v1/Recording.java index 331b02bced..0fce55980a 100644 --- a/src/main/java/com/twilio/rest/video/v1/Recording.java +++ b/src/main/java/com/twilio/rest/video/v1/Recording.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -155,7 +152,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -177,7 +174,7 @@ public static Recording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Recording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -187,9 +184,9 @@ public static Recording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java b/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java index 8bde0cd89d..bac8b15057 100644 --- a/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java +++ b/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static RecordingSettings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RecordingSettings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static RecordingSettings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RecordingSettings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static RecordingSettings fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/Room.java b/src/main/java/com/twilio/rest/video/v1/Room.java index 44b5864fe6..056587ef71 100644 --- a/src/main/java/com/twilio/rest/video/v1/Room.java +++ b/src/main/java/com/twilio/rest/video/v1/Room.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -161,7 +158,7 @@ public static Room fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Room.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -183,7 +180,7 @@ public static Room fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Room.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -193,9 +190,9 @@ public static Room fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/Participant.java b/src/main/java/com/twilio/rest/video/v1/room/Participant.java index 8ab06ab5de..90e1f37705 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/Participant.java +++ b/src/main/java/com/twilio/rest/video/v1/room/Participant.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -96,7 +93,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,7 +115,7 @@ public static Participant fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Participant.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,9 +125,9 @@ public static Participant fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java b/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java index 9f04d7197c..790b462817 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java +++ b/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.RecordingRule; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -64,7 +61,7 @@ public static RecordingRules fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RecordingRules.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -86,7 +83,7 @@ public static RecordingRules fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RecordingRules.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -96,9 +93,9 @@ public static RecordingRules fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java b/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java index 8973177eb0..bec169d2de 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java +++ b/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -160,7 +157,7 @@ public static RoomRecording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RoomRecording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -182,7 +179,7 @@ public static RoomRecording fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RoomRecording.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -192,9 +189,9 @@ public static RoomRecording fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java index c340d841dd..3aec0becd0 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java +++ b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -99,7 +96,7 @@ public static Transcriptions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcriptions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -121,7 +118,7 @@ public static Transcriptions fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Transcriptions.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -131,9 +128,9 @@ public static Transcriptions fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java b/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java index 2ce5f91529..d36aa5fdb6 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -83,7 +80,7 @@ public static Anonymize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Anonymize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -105,7 +102,7 @@ public static Anonymize fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Anonymize.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -115,9 +112,9 @@ public static Anonymize fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java index 419a0e5ca0..69b0116ea5 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -96,7 +93,7 @@ public static PublishedTrack fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PublishedTrack.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,7 +115,7 @@ public static PublishedTrack fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, PublishedTrack.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,9 +125,9 @@ public static PublishedTrack fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java index 213d4dfd48..b3169549dc 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import com.twilio.type.SubscribeRule; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.List; @@ -70,7 +67,7 @@ public static SubscribeRules fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribeRules.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -92,7 +89,7 @@ public static SubscribeRules fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribeRules.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -102,9 +99,9 @@ public static SubscribeRules fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java index 9dad3726b8..eb592314c0 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -96,7 +93,7 @@ public static SubscribedTrack fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribedTrack.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -118,7 +115,7 @@ public static SubscribedTrack fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SubscribedTrack.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -128,9 +125,9 @@ public static SubscribedTrack fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java b/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java index 2722acc881..3971850120 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java +++ b/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java @@ -16,18 +16,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.LocalDate; import lombok.ToString; @@ -57,7 +54,7 @@ public static ArchivedCall fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ArchivedCall.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -79,7 +76,7 @@ public static ArchivedCall fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ArchivedCall.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -89,9 +86,9 @@ public static ArchivedCall fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java b/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java index eb152023e5..b2639c9c8c 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java +++ b/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static ByocTrunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ByocTrunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static ByocTrunk fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ByocTrunk.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static ByocTrunk fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java b/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java index 1fc69b694f..b4b5cb9235 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java +++ b/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -76,7 +73,7 @@ public static ConnectionPolicy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectionPolicy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -98,7 +95,7 @@ public static ConnectionPolicy fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectionPolicy.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -108,9 +105,9 @@ public static ConnectionPolicy fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/IpRecord.java b/src/main/java/com/twilio/rest/voice/v1/IpRecord.java index a848bdd684..efbac44fc7 100644 --- a/src/main/java/com/twilio/rest/voice/v1/IpRecord.java +++ b/src/main/java/com/twilio/rest/voice/v1/IpRecord.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -75,7 +72,7 @@ public static IpRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -97,7 +94,7 @@ public static IpRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, IpRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -107,9 +104,9 @@ public static IpRecord fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java b/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java index c2943d7e67..72a35197b8 100644 --- a/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java +++ b/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -81,7 +78,7 @@ public static SourceIpMapping fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SourceIpMapping.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -103,7 +100,7 @@ public static SourceIpMapping fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, SourceIpMapping.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -113,9 +110,9 @@ public static SourceIpMapping fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java index 85ff49422e..687bb0c0da 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -101,7 +98,7 @@ public static ConnectionPolicyTarget fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectionPolicyTarget.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -123,7 +120,7 @@ public static ConnectionPolicyTarget fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, ConnectionPolicyTarget.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -133,9 +130,9 @@ public static ConnectionPolicyTarget fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java index 3bd8e18a32..a7a3ba61fc 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static BulkCountryUpdate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkCountryUpdate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static BulkCountryUpdate fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, BulkCountryUpdate.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static BulkCountryUpdate fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java index e5661204fd..3289fd5c31 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.List; @@ -63,7 +60,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -85,7 +82,7 @@ public static Country fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Country.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -95,9 +92,9 @@ public static Country fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java index 739ec6183e..6e6fbe1b23 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.util.Objects; @@ -61,7 +58,7 @@ public static Settings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Settings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -83,7 +80,7 @@ public static Settings fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Settings.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -93,9 +90,9 @@ public static Settings fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java index 29b37ff85a..8c2810e644 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java @@ -17,18 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -56,7 +53,7 @@ public static HighriskSpecialPrefix fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HighriskSpecialPrefix.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -78,7 +75,7 @@ public static HighriskSpecialPrefix fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, HighriskSpecialPrefix.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -88,9 +85,9 @@ public static HighriskSpecialPrefix fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/Command.java b/src/main/java/com/twilio/rest/wireless/v1/Command.java index 4d44a161b8..bd24d884ab 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/Command.java +++ b/src/main/java/com/twilio/rest/wireless/v1/Command.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -155,7 +152,7 @@ public static Command fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Command.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -177,7 +174,7 @@ public static Command fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Command.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -187,9 +184,9 @@ public static Command fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java b/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java index be29d7df1d..8cc03a1111 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java +++ b/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java @@ -17,20 +17,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -97,7 +94,7 @@ public static RatePlan fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RatePlan.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -119,7 +116,7 @@ public static RatePlan fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, RatePlan.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -129,9 +126,9 @@ public static RatePlan fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/Sim.java b/src/main/java/com/twilio/rest/wireless/v1/Sim.java index 0cbbf6550c..979c988828 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/Sim.java +++ b/src/main/java/com/twilio/rest/wireless/v1/Sim.java @@ -17,13 +17,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; @@ -31,7 +29,6 @@ import com.twilio.http.HttpMethod; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; @@ -119,7 +116,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -141,7 +138,7 @@ public static Sim fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, Sim.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -151,9 +148,9 @@ public static Sim fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java b/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java index 6f05800527..33fc87b8e6 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java +++ b/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -78,7 +75,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,7 +97,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,9 +107,9 @@ public static UsageRecord fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java b/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java index eb2d4a6ef3..ceeb0b8dc0 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java +++ b/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; @@ -58,7 +55,7 @@ public static DataSession fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DataSession.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -80,7 +77,7 @@ public static DataSession fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, DataSession.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -90,9 +87,9 @@ public static DataSession fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java b/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java index 811660cb8e..687053eb57 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java +++ b/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java @@ -17,19 +17,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; +import tools.jackson.core.exc.StreamReadException; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; import java.io.IOException; -import java.io.IOException; import java.io.InputStream; import java.util.Objects; import lombok.Getter; @@ -78,7 +75,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -100,7 +97,7 @@ public static UsageRecord fromJson( // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, UsageRecord.class); - } catch (final JsonMappingException | JsonParseException e) { + } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); @@ -110,9 +107,9 @@ public static UsageRecord fromJson( public static String toJson(Object object, ObjectMapper mapper) { try { return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { + } catch (final DatabindException e) { throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { throw new ApiConnectionException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/taskrouter/TaskRouterResource.java b/src/main/java/com/twilio/taskrouter/TaskRouterResource.java index e52e240265..e11affe82d 100644 --- a/src/main/java/com/twilio/taskrouter/TaskRouterResource.java +++ b/src/main/java/com/twilio/taskrouter/TaskRouterResource.java @@ -1,6 +1,6 @@ package com.twilio.taskrouter; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/com/twilio/taskrouter/TaskRouting.java b/src/main/java/com/twilio/taskrouter/TaskRouting.java index 5f4022fc01..9aa8d5a899 100644 --- a/src/main/java/com/twilio/taskrouter/TaskRouting.java +++ b/src/main/java/com/twilio/taskrouter/TaskRouting.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import lombok.ToString; import java.io.IOException; diff --git a/src/main/java/com/twilio/taskrouter/Workflow.java b/src/main/java/com/twilio/taskrouter/Workflow.java index ce8232555f..944097935e 100644 --- a/src/main/java/com/twilio/taskrouter/Workflow.java +++ b/src/main/java/com/twilio/taskrouter/Workflow.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import lombok.ToString; import java.io.IOException; diff --git a/src/main/java/com/twilio/taskrouter/WorkflowRule.java b/src/main/java/com/twilio/taskrouter/WorkflowRule.java index e9e18d34dd..14fac4baee 100644 --- a/src/main/java/com/twilio/taskrouter/WorkflowRule.java +++ b/src/main/java/com/twilio/taskrouter/WorkflowRule.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import lombok.ToString; import java.io.IOException; diff --git a/src/main/java/com/twilio/taskrouter/WorkflowRuleTarget.java b/src/main/java/com/twilio/taskrouter/WorkflowRuleTarget.java index 172059e5a1..a770228cff 100644 --- a/src/main/java/com/twilio/taskrouter/WorkflowRuleTarget.java +++ b/src/main/java/com/twilio/taskrouter/WorkflowRuleTarget.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import lombok.ToString; import java.io.IOException; diff --git a/src/main/java/com/twilio/twiml/FaxResponse.java b/src/main/java/com/twilio/twiml/FaxResponse.java index c6902a141a..5461b197d3 100644 --- a/src/main/java/com/twilio/twiml/FaxResponse.java +++ b/src/main/java/com/twilio/twiml/FaxResponse.java @@ -7,10 +7,10 @@ package com.twilio.twiml; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiMLException; import com.twilio.twiml.fax.Receive; @@ -44,7 +44,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a FaxResponse.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/MessagingResponse.java b/src/main/java/com/twilio/twiml/MessagingResponse.java index f87fd6e9b8..6648d5f63a 100644 --- a/src/main/java/com/twilio/twiml/MessagingResponse.java +++ b/src/main/java/com/twilio/twiml/MessagingResponse.java @@ -7,10 +7,10 @@ package com.twilio.twiml; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiMLException; import com.twilio.twiml.messaging.Message; import com.twilio.twiml.messaging.Redirect; @@ -45,7 +45,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a MessagingResponse.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/TwiML.java b/src/main/java/com/twilio/twiml/TwiML.java index d81056d48a..a41f6836f9 100644 --- a/src/main/java/com/twilio/twiml/TwiML.java +++ b/src/main/java/com/twilio/twiml/TwiML.java @@ -2,11 +2,11 @@ import com.ctc.wstx.stax.WstxInputFactory; import com.ctc.wstx.stax.WstxOutputFactory; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.xml.XmlFactory; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; +import tools.jackson.databind.DeserializationFeature; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.dataformat.xml.XmlFactory; +import tools.jackson.dataformat.xml.XmlMapper; +import tools.jackson.dataformat.xml.annotation.JacksonXmlText; import lombok.ToString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/com/twilio/twiml/VoiceResponse.java b/src/main/java/com/twilio/twiml/VoiceResponse.java index 2a8e4f1305..a400d9cd44 100644 --- a/src/main/java/com/twilio/twiml/VoiceResponse.java +++ b/src/main/java/com/twilio/twiml/VoiceResponse.java @@ -7,10 +7,10 @@ package com.twilio.twiml; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiMLException; import com.twilio.twiml.voice.Connect; import com.twilio.twiml.voice.Dial; @@ -63,7 +63,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a VoiceResponse.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/fax/Receive.java b/src/main/java/com/twilio/twiml/fax/Receive.java index ca138c3608..89a981796e 100644 --- a/src/main/java/com/twilio/twiml/fax/Receive.java +++ b/src/main/java/com/twilio/twiml/fax/Receive.java @@ -7,10 +7,10 @@ package com.twilio.twiml.fax; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -165,7 +165,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Receive.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/messaging/Body.java b/src/main/java/com/twilio/twiml/messaging/Body.java index 2bee30fb0d..b28538ef57 100644 --- a/src/main/java/com/twilio/twiml/messaging/Body.java +++ b/src/main/java/com/twilio/twiml/messaging/Body.java @@ -7,9 +7,9 @@ package com.twilio.twiml.messaging; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -64,7 +64,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Body.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/messaging/Media.java b/src/main/java/com/twilio/twiml/messaging/Media.java index 11e44a9535..bc2441fc17 100644 --- a/src/main/java/com/twilio/twiml/messaging/Media.java +++ b/src/main/java/com/twilio/twiml/messaging/Media.java @@ -7,9 +7,9 @@ package com.twilio.twiml.messaging; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -67,7 +67,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Media.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/messaging/Message.java b/src/main/java/com/twilio/twiml/messaging/Message.java index 65ed8fcce0..9087474a73 100644 --- a/src/main/java/com/twilio/twiml/messaging/Message.java +++ b/src/main/java/com/twilio/twiml/messaging/Message.java @@ -7,10 +7,10 @@ package com.twilio.twiml.messaging; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -156,7 +156,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Message.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/messaging/Redirect.java b/src/main/java/com/twilio/twiml/messaging/Redirect.java index 3578c31928..481b9eb5f1 100644 --- a/src/main/java/com/twilio/twiml/messaging/Redirect.java +++ b/src/main/java/com/twilio/twiml/messaging/Redirect.java @@ -7,10 +7,10 @@ package com.twilio.twiml.messaging; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -98,7 +98,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Redirect.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/AiSession.java b/src/main/java/com/twilio/twiml/voice/AiSession.java index da1d9001fb..de8667ce45 100644 --- a/src/main/java/com/twilio/twiml/voice/AiSession.java +++ b/src/main/java/com/twilio/twiml/voice/AiSession.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -91,7 +91,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a AiSession.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Application.java b/src/main/java/com/twilio/twiml/voice/Application.java index 78e325f1ab..d800d1bea7 100644 --- a/src/main/java/com/twilio/twiml/voice/Application.java +++ b/src/main/java/com/twilio/twiml/voice/Application.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -215,7 +215,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Application.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/ApplicationSid.java b/src/main/java/com/twilio/twiml/voice/ApplicationSid.java index ab277af037..198c4278e3 100644 --- a/src/main/java/com/twilio/twiml/voice/ApplicationSid.java +++ b/src/main/java/com/twilio/twiml/voice/ApplicationSid.java @@ -7,9 +7,9 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -64,7 +64,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a ApplicationSid.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Assistant.java b/src/main/java/com/twilio/twiml/voice/Assistant.java index f74f3a658c..02518cb984 100644 --- a/src/main/java/com/twilio/twiml/voice/Assistant.java +++ b/src/main/java/com/twilio/twiml/voice/Assistant.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -374,7 +374,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Assistant.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Autopilot.java b/src/main/java/com/twilio/twiml/voice/Autopilot.java index aa1ef0e26f..1042b0ce3a 100644 --- a/src/main/java/com/twilio/twiml/voice/Autopilot.java +++ b/src/main/java/com/twilio/twiml/voice/Autopilot.java @@ -7,9 +7,9 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -64,7 +64,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Autopilot.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Client.java b/src/main/java/com/twilio/twiml/voice/Client.java index 32942cfae3..5daebc91da 100644 --- a/src/main/java/com/twilio/twiml/voice/Client.java +++ b/src/main/java/com/twilio/twiml/voice/Client.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -185,7 +185,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Client.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Conference.java b/src/main/java/com/twilio/twiml/voice/Conference.java index fd5a414376..ce5a07c9d3 100644 --- a/src/main/java/com/twilio/twiml/voice/Conference.java +++ b/src/main/java/com/twilio/twiml/voice/Conference.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -513,7 +513,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Conference.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Config.java b/src/main/java/com/twilio/twiml/voice/Config.java index 3dff3f0754..1846116446 100644 --- a/src/main/java/com/twilio/twiml/voice/Config.java +++ b/src/main/java/com/twilio/twiml/voice/Config.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -89,7 +89,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Config.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Connect.java b/src/main/java/com/twilio/twiml/voice/Connect.java index cced72fad1..87047e0d0c 100644 --- a/src/main/java/com/twilio/twiml/voice/Connect.java +++ b/src/main/java/com/twilio/twiml/voice/Connect.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -92,7 +92,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Connect.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Conversation.java b/src/main/java/com/twilio/twiml/voice/Conversation.java index 50996978d7..d4d0a18946 100644 --- a/src/main/java/com/twilio/twiml/voice/Conversation.java +++ b/src/main/java/com/twilio/twiml/voice/Conversation.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -354,7 +354,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Conversation.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/ConversationRelay.java b/src/main/java/com/twilio/twiml/voice/ConversationRelay.java index 40d8e050fa..2b6b850062 100644 --- a/src/main/java/com/twilio/twiml/voice/ConversationRelay.java +++ b/src/main/java/com/twilio/twiml/voice/ConversationRelay.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -374,7 +374,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a ConversationRelay.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/ConversationRelaySession.java b/src/main/java/com/twilio/twiml/voice/ConversationRelaySession.java index 01b76a4fb6..2d7f2d6129 100644 --- a/src/main/java/com/twilio/twiml/voice/ConversationRelaySession.java +++ b/src/main/java/com/twilio/twiml/voice/ConversationRelaySession.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -94,7 +94,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a ConversationRelaySession.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Dial.java b/src/main/java/com/twilio/twiml/voice/Dial.java index 27eeda82c8..6b42f790bc 100644 --- a/src/main/java/com/twilio/twiml/voice/Dial.java +++ b/src/main/java/com/twilio/twiml/voice/Dial.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -490,7 +490,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Dial.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Echo.java b/src/main/java/com/twilio/twiml/voice/Echo.java index 7ff1dfabf2..8fa17de9fb 100644 --- a/src/main/java/com/twilio/twiml/voice/Echo.java +++ b/src/main/java/com/twilio/twiml/voice/Echo.java @@ -7,8 +7,8 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -41,7 +41,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Echo.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Enqueue.java b/src/main/java/com/twilio/twiml/voice/Enqueue.java index c4ea4ec295..b5c30d5355 100644 --- a/src/main/java/com/twilio/twiml/voice/Enqueue.java +++ b/src/main/java/com/twilio/twiml/voice/Enqueue.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -168,7 +168,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Enqueue.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Gather.java b/src/main/java/com/twilio/twiml/voice/Gather.java index 9db53eab67..2a7f19135b 100644 --- a/src/main/java/com/twilio/twiml/voice/Gather.java +++ b/src/main/java/com/twilio/twiml/voice/Gather.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -490,7 +490,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Gather.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Hangup.java b/src/main/java/com/twilio/twiml/voice/Hangup.java index bce2e05bcb..72c053614c 100644 --- a/src/main/java/com/twilio/twiml/voice/Hangup.java +++ b/src/main/java/com/twilio/twiml/voice/Hangup.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -44,7 +44,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Hangup.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Header.java b/src/main/java/com/twilio/twiml/voice/Header.java index 03cbeb9b94..f40ed50625 100644 --- a/src/main/java/com/twilio/twiml/voice/Header.java +++ b/src/main/java/com/twilio/twiml/voice/Header.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -89,7 +89,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Header.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Headers.java b/src/main/java/com/twilio/twiml/voice/Headers.java index 28ef747b89..f3a81ccfe4 100644 --- a/src/main/java/com/twilio/twiml/voice/Headers.java +++ b/src/main/java/com/twilio/twiml/voice/Headers.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -44,7 +44,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Headers.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Identity.java b/src/main/java/com/twilio/twiml/voice/Identity.java index a8596b0e50..3a67ed756f 100644 --- a/src/main/java/com/twilio/twiml/voice/Identity.java +++ b/src/main/java/com/twilio/twiml/voice/Identity.java @@ -7,9 +7,9 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -64,7 +64,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Identity.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Language.java b/src/main/java/com/twilio/twiml/voice/Language.java index ac88000893..20a2f1b9d5 100644 --- a/src/main/java/com/twilio/twiml/voice/Language.java +++ b/src/main/java/com/twilio/twiml/voice/Language.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -131,7 +131,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Language.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Leave.java b/src/main/java/com/twilio/twiml/voice/Leave.java index 34d46543a9..2b1e222043 100644 --- a/src/main/java/com/twilio/twiml/voice/Leave.java +++ b/src/main/java/com/twilio/twiml/voice/Leave.java @@ -7,8 +7,8 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -41,7 +41,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Leave.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Number.java b/src/main/java/com/twilio/twiml/voice/Number.java index 4ee66d04f6..f586c63b65 100644 --- a/src/main/java/com/twilio/twiml/voice/Number.java +++ b/src/main/java/com/twilio/twiml/voice/Number.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -314,7 +314,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Number.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Parameter.java b/src/main/java/com/twilio/twiml/voice/Parameter.java index e1f4e50e65..6e2d0e1407 100644 --- a/src/main/java/com/twilio/twiml/voice/Parameter.java +++ b/src/main/java/com/twilio/twiml/voice/Parameter.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -89,7 +89,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Parameter.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Pause.java b/src/main/java/com/twilio/twiml/voice/Pause.java index ff8084d814..18a4edff1c 100644 --- a/src/main/java/com/twilio/twiml/voice/Pause.java +++ b/src/main/java/com/twilio/twiml/voice/Pause.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -75,7 +75,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Pause.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Pay.java b/src/main/java/com/twilio/twiml/voice/Pay.java index eceaf2ed0b..3d78754de1 100644 --- a/src/main/java/com/twilio/twiml/voice/Pay.java +++ b/src/main/java/com/twilio/twiml/voice/Pay.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -463,7 +463,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Pay.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Play.java b/src/main/java/com/twilio/twiml/voice/Play.java index 1cfaed6c0c..1585939b09 100644 --- a/src/main/java/com/twilio/twiml/voice/Play.java +++ b/src/main/java/com/twilio/twiml/voice/Play.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -111,7 +111,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Play.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Prompt.java b/src/main/java/com/twilio/twiml/voice/Prompt.java index 0d7e03fff4..d594ca595a 100644 --- a/src/main/java/com/twilio/twiml/voice/Prompt.java +++ b/src/main/java/com/twilio/twiml/voice/Prompt.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -233,7 +233,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Prompt.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Queue.java b/src/main/java/com/twilio/twiml/voice/Queue.java index e1006ab652..df00634a3c 100644 --- a/src/main/java/com/twilio/twiml/voice/Queue.java +++ b/src/main/java/com/twilio/twiml/voice/Queue.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -140,7 +140,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Queue.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Record.java b/src/main/java/com/twilio/twiml/voice/Record.java index c1458a109e..c448886d5a 100644 --- a/src/main/java/com/twilio/twiml/voice/Record.java +++ b/src/main/java/com/twilio/twiml/voice/Record.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -277,7 +277,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Record.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Recording.java b/src/main/java/com/twilio/twiml/voice/Recording.java index 593a233944..e76a3e45e7 100644 --- a/src/main/java/com/twilio/twiml/voice/Recording.java +++ b/src/main/java/com/twilio/twiml/voice/Recording.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -237,7 +237,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Recording.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Redirect.java b/src/main/java/com/twilio/twiml/voice/Redirect.java index d7f0ef1b0d..3203e2962d 100644 --- a/src/main/java/com/twilio/twiml/voice/Redirect.java +++ b/src/main/java/com/twilio/twiml/voice/Redirect.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -98,7 +98,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Redirect.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Refer.java b/src/main/java/com/twilio/twiml/voice/Refer.java index a037900080..fdb465dd5c 100644 --- a/src/main/java/com/twilio/twiml/voice/Refer.java +++ b/src/main/java/com/twilio/twiml/voice/Refer.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -92,7 +92,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Refer.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/ReferSip.java b/src/main/java/com/twilio/twiml/voice/ReferSip.java index 59d7dfe317..f8f8371578 100644 --- a/src/main/java/com/twilio/twiml/voice/ReferSip.java +++ b/src/main/java/com/twilio/twiml/voice/ReferSip.java @@ -7,9 +7,9 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -67,7 +67,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a ReferSip.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Reject.java b/src/main/java/com/twilio/twiml/voice/Reject.java index 31e7500a06..ccf634f308 100644 --- a/src/main/java/com/twilio/twiml/voice/Reject.java +++ b/src/main/java/com/twilio/twiml/voice/Reject.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -90,7 +90,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Reject.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Room.java b/src/main/java/com/twilio/twiml/voice/Room.java index 1959f51a40..b8028fc0c7 100644 --- a/src/main/java/com/twilio/twiml/voice/Room.java +++ b/src/main/java/com/twilio/twiml/voice/Room.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -95,7 +95,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Room.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Say.java b/src/main/java/com/twilio/twiml/voice/Say.java index c317fe078e..9ad4dad138 100644 --- a/src/main/java/com/twilio/twiml/voice/Say.java +++ b/src/main/java/com/twilio/twiml/voice/Say.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -1118,7 +1118,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Say.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Sim.java b/src/main/java/com/twilio/twiml/voice/Sim.java index bab131f011..70fc940aa6 100644 --- a/src/main/java/com/twilio/twiml/voice/Sim.java +++ b/src/main/java/com/twilio/twiml/voice/Sim.java @@ -7,9 +7,9 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -64,7 +64,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Sim.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Sip.java b/src/main/java/com/twilio/twiml/voice/Sip.java index f1b15f97cc..e8be61af75 100644 --- a/src/main/java/com/twilio/twiml/voice/Sip.java +++ b/src/main/java/com/twilio/twiml/voice/Sip.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -314,7 +314,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Sip.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SipUri.java b/src/main/java/com/twilio/twiml/voice/SipUri.java index 83d91c2dae..d97a3b486a 100644 --- a/src/main/java/com/twilio/twiml/voice/SipUri.java +++ b/src/main/java/com/twilio/twiml/voice/SipUri.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -139,7 +139,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SipUri.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Siprec.java b/src/main/java/com/twilio/twiml/voice/Siprec.java index efcb331faf..09006695b7 100644 --- a/src/main/java/com/twilio/twiml/voice/Siprec.java +++ b/src/main/java/com/twilio/twiml/voice/Siprec.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -162,7 +162,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Siprec.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Sms.java b/src/main/java/com/twilio/twiml/voice/Sms.java index 7d10fcd7e7..530c9e7cd2 100644 --- a/src/main/java/com/twilio/twiml/voice/Sms.java +++ b/src/main/java/com/twilio/twiml/voice/Sms.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -154,7 +154,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Sms.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlBreak.java b/src/main/java/com/twilio/twiml/voice/SsmlBreak.java index 24d8972164..9db6c5de9c 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlBreak.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlBreak.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -110,7 +110,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlBreak.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlEmphasis.java b/src/main/java/com/twilio/twiml/voice/SsmlEmphasis.java index 525ff330c5..2609933d80 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlEmphasis.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlEmphasis.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -111,7 +111,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlEmphasis.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlLang.java b/src/main/java/com/twilio/twiml/voice/SsmlLang.java index beab44a6aa..496f78bdab 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlLang.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlLang.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -145,7 +145,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlLang.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlP.java b/src/main/java/com/twilio/twiml/voice/SsmlP.java index 14576b892d..8479da932f 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlP.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlP.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -65,7 +65,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlP.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlPhoneme.java b/src/main/java/com/twilio/twiml/voice/SsmlPhoneme.java index 743330ac93..83de89482a 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlPhoneme.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlPhoneme.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -128,7 +128,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlPhoneme.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlProsody.java b/src/main/java/com/twilio/twiml/voice/SsmlProsody.java index 036f4c1d43..b43cef9fce 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlProsody.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlProsody.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -128,7 +128,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlProsody.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlS.java b/src/main/java/com/twilio/twiml/voice/SsmlS.java index 2c1c068439..3891b965be 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlS.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlS.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -65,7 +65,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlS.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlSayAs.java b/src/main/java/com/twilio/twiml/voice/SsmlSayAs.java index 3f72a618d0..aa41319d5a 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlSayAs.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlSayAs.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -159,7 +159,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlSayAs.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlSub.java b/src/main/java/com/twilio/twiml/voice/SsmlSub.java index 15770f11a3..45988cce1f 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlSub.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlSub.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -97,7 +97,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlSub.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/SsmlW.java b/src/main/java/com/twilio/twiml/voice/SsmlW.java index b0071167c8..b18297353f 100644 --- a/src/main/java/com/twilio/twiml/voice/SsmlW.java +++ b/src/main/java/com/twilio/twiml/voice/SsmlW.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -97,7 +97,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a SsmlW.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Start.java b/src/main/java/com/twilio/twiml/voice/Start.java index 9bcd0ad629..51e0d3cd94 100644 --- a/src/main/java/com/twilio/twiml/voice/Start.java +++ b/src/main/java/com/twilio/twiml/voice/Start.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -92,7 +92,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Start.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Stop.java b/src/main/java/com/twilio/twiml/voice/Stop.java index 491cb8afff..ce7ca6df82 100644 --- a/src/main/java/com/twilio/twiml/voice/Stop.java +++ b/src/main/java/com/twilio/twiml/voice/Stop.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -44,7 +44,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Stop.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Stream.java b/src/main/java/com/twilio/twiml/voice/Stream.java index 16ce30d124..123be1a850 100644 --- a/src/main/java/com/twilio/twiml/voice/Stream.java +++ b/src/main/java/com/twilio/twiml/voice/Stream.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -176,7 +176,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Stream.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Task.java b/src/main/java/com/twilio/twiml/voice/Task.java index 904fe59be7..63f212e56f 100644 --- a/src/main/java/com/twilio/twiml/voice/Task.java +++ b/src/main/java/com/twilio/twiml/voice/Task.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -109,7 +109,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Task.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/Transcription.java b/src/main/java/com/twilio/twiml/voice/Transcription.java index 783b72db96..9eef9bc901 100644 --- a/src/main/java/com/twilio/twiml/voice/Transcription.java +++ b/src/main/java/com/twilio/twiml/voice/Transcription.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -288,7 +288,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a Transcription.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/VirtualAgent.java b/src/main/java/com/twilio/twiml/voice/VirtualAgent.java index 8eaf03ea93..621c2ee1fe 100644 --- a/src/main/java/com/twilio/twiml/voice/VirtualAgent.java +++ b/src/main/java/com/twilio/twiml/voice/VirtualAgent.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; import com.twilio.twiml.TwiMLException; @@ -132,7 +132,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a VirtualAgent.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/main/java/com/twilio/twiml/voice/WhatsApp.java b/src/main/java/com/twilio/twiml/voice/WhatsApp.java index 1556ead3c4..d2498a544f 100644 --- a/src/main/java/com/twilio/twiml/voice/WhatsApp.java +++ b/src/main/java/com/twilio/twiml/voice/WhatsApp.java @@ -7,10 +7,10 @@ package com.twilio.twiml.voice; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.annotation.JsonPOJOBuilder; +import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.twilio.converter.Promoter; import com.twilio.http.HttpMethod; import com.twilio.twiml.TwiML; @@ -185,7 +185,7 @@ public static class Builder extends TwiML.Builder { public static Builder fromXml(final String xml) throws TwiMLException { try { return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { + } catch (final JacksonException jpe) { throw new TwiMLException( "Failed to deserialize a WhatsApp.Builder from the provided XML string: " + jpe.getMessage()); } catch (final Exception e) { diff --git a/src/test/java/com/twilio/base/TokenPaginationPageTest.java b/src/test/java/com/twilio/base/TokenPaginationPageTest.java index a05b753cbe..3be70f738f 100644 --- a/src/test/java/com/twilio/base/TokenPaginationPageTest.java +++ b/src/test/java/com/twilio/base/TokenPaginationPageTest.java @@ -1,9 +1,9 @@ package com.twilio.base; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; -import com.fasterxml.jackson.databind.node.ObjectNode; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.node.JsonNodeFactory; +import tools.jackson.databind.node.ObjectNode; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.http.TwilioRestClient; diff --git a/src/test/java/com/twilio/converter/CurrencyDeserializerTest.java b/src/test/java/com/twilio/converter/CurrencyDeserializerTest.java index da96d62a1a..31950f6e7e 100644 --- a/src/test/java/com/twilio/converter/CurrencyDeserializerTest.java +++ b/src/test/java/com/twilio/converter/CurrencyDeserializerTest.java @@ -1,9 +1,9 @@ package com.twilio.converter; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.annotation.JsonDeserialize; import org.junit.Assert; import org.junit.Test; @@ -24,7 +24,7 @@ public void testDeserialize() throws IOException { Assert.assertEquals("USD", c.currency.getCurrencyCode()); } - @Test(expected = JsonMappingException.class) + @Test(expected = DatabindException.class) public void testInvalidCurrency() throws IOException { String json = "{ \"currency\": \"poo\" }"; ObjectMapper mapper = new ObjectMapper(); diff --git a/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java b/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java index 4051e0c195..65cc795d18 100644 --- a/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java +++ b/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java @@ -1,7 +1,7 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; diff --git a/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java b/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java index e290550ec3..4d2d080a0d 100644 --- a/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java +++ b/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java @@ -1,7 +1,7 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; diff --git a/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java b/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java index dacee0cac1..2d1e90e657 100644 --- a/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java +++ b/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java @@ -1,7 +1,7 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; +import tools.jackson.core.JsonParser; +import tools.jackson.databind.DeserializationContext; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; diff --git a/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java b/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java index 186bc51948..0fa1dd177b 100644 --- a/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java +++ b/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java @@ -1,8 +1,8 @@ package com.twilio.converter; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; +import tools.jackson.core.JsonParser; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.DeserializationContext; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; diff --git a/src/test/java/com/twilio/exception/ApiExceptionTest.java b/src/test/java/com/twilio/exception/ApiExceptionTest.java index 53f97dcb0a..680f049965 100644 --- a/src/test/java/com/twilio/exception/ApiExceptionTest.java +++ b/src/test/java/com/twilio/exception/ApiExceptionTest.java @@ -3,7 +3,7 @@ import java.io.ByteArrayInputStream; import java.util.Collections; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/twilio/exception/RestStandardExceptionTest.java b/src/test/java/com/twilio/exception/RestStandardExceptionTest.java index da170f4ce2..9f1129d9c1 100644 --- a/src/test/java/com/twilio/exception/RestStandardExceptionTest.java +++ b/src/test/java/com/twilio/exception/RestStandardExceptionTest.java @@ -2,7 +2,7 @@ import java.io.ByteArrayInputStream; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/com/twilio/http/TwilioRestClientTest.java b/src/test/java/com/twilio/http/TwilioRestClientTest.java index 9c4a758160..f4ef700885 100644 --- a/src/test/java/com/twilio/http/TwilioRestClientTest.java +++ b/src/test/java/com/twilio/http/TwilioRestClientTest.java @@ -6,8 +6,8 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.datatype.jsr310.JavaTimeModule; import com.twilio.auth_strategy.BasicAuthStrategy; import com.twilio.auth_strategy.NoAuthStrategy; import com.twilio.rest.Domains; diff --git a/src/test/java/com/twilio/jwt/accesstoken/AccessTokenTest.java b/src/test/java/com/twilio/jwt/accesstoken/AccessTokenTest.java index f829590422..9535117862 100644 --- a/src/test/java/com/twilio/jwt/accesstoken/AccessTokenTest.java +++ b/src/test/java/com/twilio/jwt/accesstoken/AccessTokenTest.java @@ -1,6 +1,6 @@ package com.twilio.jwt.accesstoken; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.jwt.Jwt; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; diff --git a/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java b/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java index eebc6634e9..d4c2b8cb5a 100644 --- a/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java +++ b/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java @@ -1,6 +1,6 @@ package com.twilio.jwt.validation; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import com.twilio.http.ValidationInterceptor; import com.twilio.jwt.Jwt; import io.jsonwebtoken.Claims; diff --git a/src/test/java/com/twilio/type/TypeTest.java b/src/test/java/com/twilio/type/TypeTest.java index 02e08fa5c1..abcfc0e09c 100644 --- a/src/test/java/com/twilio/type/TypeTest.java +++ b/src/test/java/com/twilio/type/TypeTest.java @@ -1,8 +1,8 @@ package com.twilio.type; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; @@ -13,7 +13,7 @@ public T fromJson(String json, Class clazz) throws IOException { return mapper.readValue(json, clazz); } - public String toJson(Object object) throws JsonProcessingException { + public String toJson(Object object) throws JacksonException { return mapper.writeValueAsString(object); } From 1b72bbb98c981523ef9d5dd77dbc0ab552fe0a17 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:44:53 +0000 Subject: [PATCH 3/5] Fix remaining compilation errors for Jackson 3 migration Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com> --- src/main/java/com/twilio/base/Page.java | 31 +++++++------------ .../com/twilio/base/TokenPaginationPage.java | 27 ++++++---------- .../java/com/twilio/converter/Converter.java | 6 +--- .../com/twilio/exception/RestException.java | 2 -- .../exception/RestStandardException.java | 2 -- .../rest/accounts/v1/AuthTokenPromotion.java | 6 ---- .../twilio/rest/accounts/v1/BulkConsents.java | 6 ---- .../twilio/rest/accounts/v1/BulkContacts.java | 6 ---- .../accounts/v1/MessagingGeopermissions.java | 6 ---- .../com/twilio/rest/accounts/v1/Safelist.java | 6 ---- .../rest/accounts/v1/SecondaryAuthToken.java | 6 ---- .../rest/accounts/v1/credential/Aws.java | 6 ---- .../accounts/v1/credential/PublicKey.java | 6 ---- .../com/twilio/rest/api/v2010/Account.java | 6 ---- .../rest/api/v2010/account/Address.java | 6 ---- .../rest/api/v2010/account/Application.java | 6 ---- .../v2010/account/AuthorizedConnectApp.java | 6 ---- .../account/AvailablePhoneNumberCountry.java | 6 ---- .../rest/api/v2010/account/Balance.java | 6 ---- .../twilio/rest/api/v2010/account/Call.java | 6 ---- .../rest/api/v2010/account/Conference.java | 6 ---- .../rest/api/v2010/account/ConnectApp.java | 6 ---- .../v2010/account/IncomingPhoneNumber.java | 6 ---- .../twilio/rest/api/v2010/account/Key.java | 6 ---- .../rest/api/v2010/account/Message.java | 6 ---- .../twilio/rest/api/v2010/account/NewKey.java | 6 ---- .../rest/api/v2010/account/NewSigningKey.java | 6 ---- .../rest/api/v2010/account/Notification.java | 6 ---- .../api/v2010/account/OutgoingCallerId.java | 6 ---- .../twilio/rest/api/v2010/account/Queue.java | 6 ---- .../rest/api/v2010/account/Recording.java | 6 ---- .../rest/api/v2010/account/ShortCode.java | 6 ---- .../rest/api/v2010/account/SigningKey.java | 6 ---- .../twilio/rest/api/v2010/account/Token.java | 6 ---- .../rest/api/v2010/account/Transcription.java | 6 ---- .../api/v2010/account/ValidationRequest.java | 6 ---- .../account/address/DependentPhoneNumber.java | 6 ---- .../availablephonenumbercountry/Local.java | 6 ---- .../MachineToMachine.java | 6 ---- .../availablephonenumbercountry/Mobile.java | 6 ---- .../availablephonenumbercountry/National.java | 6 ---- .../SharedCost.java | 6 ---- .../availablephonenumbercountry/TollFree.java | 6 ---- .../availablephonenumbercountry/Voip.java | 6 ---- .../rest/api/v2010/account/call/Event.java | 6 ---- .../api/v2010/account/call/Notification.java | 6 ---- .../rest/api/v2010/account/call/Payment.java | 6 ---- .../api/v2010/account/call/Recording.java | 6 ---- .../rest/api/v2010/account/call/Siprec.java | 6 ---- .../rest/api/v2010/account/call/Stream.java | 6 ---- .../api/v2010/account/call/Transcription.java | 6 ---- .../account/call/UserDefinedMessage.java | 6 ---- .../call/UserDefinedMessageSubscription.java | 6 ---- .../v2010/account/conference/Participant.java | 6 ---- .../v2010/account/conference/Recording.java | 6 ---- .../incomingphonenumber/AssignedAddOn.java | 6 ---- .../account/incomingphonenumber/Local.java | 6 ---- .../account/incomingphonenumber/Mobile.java | 6 ---- .../account/incomingphonenumber/TollFree.java | 6 ---- .../assignedaddon/AssignedAddOnExtension.java | 6 ---- .../api/v2010/account/message/Feedback.java | 6 ---- .../rest/api/v2010/account/message/Media.java | 6 ---- .../rest/api/v2010/account/queue/Member.java | 6 ---- .../v2010/account/recording/AddOnResult.java | 6 ---- .../account/recording/Transcription.java | 6 ---- .../recording/addonresult/Payload.java | 6 ---- .../recording/addonresult/payload/Data.java | 6 ---- .../api/v2010/account/sip/CredentialList.java | 6 ---- .../rest/api/v2010/account/sip/Domain.java | 6 ---- .../account/sip/IpAccessControlList.java | 6 ---- .../sip/credentiallist/Credential.java | 6 ---- .../sip/domain/CredentialListMapping.java | 6 ---- .../domain/IpAccessControlListMapping.java | 6 ---- .../AuthCallsCredentialListMapping.java | 6 ---- .../AuthCallsIpAccessControlListMapping.java | 6 ---- ...uthRegistrationsCredentialListMapping.java | 6 ---- .../sip/ipaccesscontrollist/IpAddress.java | 6 ---- .../rest/api/v2010/account/usage/Record.java | 6 ---- .../rest/api/v2010/account/usage/Trigger.java | 6 ---- .../v2010/account/usage/record/AllTime.java | 6 ---- .../api/v2010/account/usage/record/Daily.java | 6 ---- .../v2010/account/usage/record/LastMonth.java | 6 ---- .../v2010/account/usage/record/Monthly.java | 6 ---- .../v2010/account/usage/record/ThisMonth.java | 6 ---- .../api/v2010/account/usage/record/Today.java | 6 ---- .../v2010/account/usage/record/Yearly.java | 6 ---- .../v2010/account/usage/record/Yesterday.java | 6 ---- .../twilio/rest/assistants/v1/Assistant.java | 6 ---- .../twilio/rest/assistants/v1/Knowledge.java | 6 ---- .../com/twilio/rest/assistants/v1/Policy.java | 6 ---- .../twilio/rest/assistants/v1/Session.java | 6 ---- .../com/twilio/rest/assistants/v1/Tool.java | 6 ---- .../v1/assistant/AssistantsKnowledge.java | 6 ---- .../v1/assistant/AssistantsTool.java | 6 ---- .../assistants/v1/assistant/Feedback.java | 6 ---- .../rest/assistants/v1/assistant/Message.java | 6 ---- .../rest/assistants/v1/knowledge/Chunk.java | 6 ---- .../v1/knowledge/KnowledgeStatus.java | 6 ---- .../rest/assistants/v1/session/Message.java | 6 ---- .../twilio/rest/bulkexports/v1/Export.java | 6 ---- .../bulkexports/v1/ExportConfiguration.java | 6 ---- .../rest/bulkexports/v1/export/Day.java | 6 ---- .../v1/export/ExportCustomJob.java | 6 ---- .../rest/bulkexports/v1/export/Job.java | 6 ---- .../com/twilio/rest/chat/v1/Credential.java | 6 ---- .../java/com/twilio/rest/chat/v1/Service.java | 6 ---- .../twilio/rest/chat/v1/service/Channel.java | 6 ---- .../com/twilio/rest/chat/v1/service/Role.java | 6 ---- .../com/twilio/rest/chat/v1/service/User.java | 6 ---- .../rest/chat/v1/service/channel/Invite.java | 6 ---- .../rest/chat/v1/service/channel/Member.java | 6 ---- .../rest/chat/v1/service/channel/Message.java | 6 ---- .../chat/v1/service/user/UserChannel.java | 6 ---- .../com/twilio/rest/chat/v2/Credential.java | 6 ---- .../java/com/twilio/rest/chat/v2/Service.java | 6 ---- .../twilio/rest/chat/v2/service/Binding.java | 6 ---- .../twilio/rest/chat/v2/service/Channel.java | 6 ---- .../com/twilio/rest/chat/v2/service/Role.java | 6 ---- .../com/twilio/rest/chat/v2/service/User.java | 6 ---- .../rest/chat/v2/service/channel/Invite.java | 6 ---- .../rest/chat/v2/service/channel/Member.java | 6 ---- .../rest/chat/v2/service/channel/Message.java | 6 ---- .../rest/chat/v2/service/channel/Webhook.java | 6 ---- .../chat/v2/service/user/UserBinding.java | 6 ---- .../chat/v2/service/user/UserChannel.java | 6 ---- .../java/com/twilio/rest/chat/v3/Channel.java | 6 ---- .../com/twilio/rest/content/v1/Content.java | 6 ---- .../rest/content/v1/ContentAndApprovals.java | 6 ---- .../twilio/rest/content/v1/LegacyContent.java | 6 ---- .../content/v1/content/ApprovalCreate.java | 6 ---- .../content/v1/content/ApprovalFetch.java | 6 ---- .../com/twilio/rest/content/v2/Content.java | 6 ---- .../rest/content/v2/ContentAndApprovals.java | 6 ---- .../v1/AddressConfiguration.java | 6 ---- .../rest/conversations/v1/Configuration.java | 6 ---- .../rest/conversations/v1/Conversation.java | 6 ---- .../v1/ConversationWithParticipants.java | 6 ---- .../rest/conversations/v1/Credential.java | 6 ---- .../v1/ParticipantConversation.java | 6 ---- .../twilio/rest/conversations/v1/Role.java | 6 ---- .../twilio/rest/conversations/v1/Service.java | 6 ---- .../twilio/rest/conversations/v1/User.java | 6 ---- .../v1/configuration/Webhook.java | 6 ---- .../v1/conversation/Message.java | 6 ---- .../v1/conversation/Participant.java | 6 ---- .../v1/conversation/Webhook.java | 6 ---- .../conversation/message/DeliveryReceipt.java | 6 ---- .../conversations/v1/service/Binding.java | 6 ---- .../v1/service/Configuration.java | 6 ---- .../v1/service/Conversation.java | 6 ---- .../service/ConversationWithParticipants.java | 6 ---- .../v1/service/ParticipantConversation.java | 6 ---- .../rest/conversations/v1/service/Role.java | 6 ---- .../rest/conversations/v1/service/User.java | 6 ---- .../service/configuration/Notification.java | 6 ---- .../v1/service/configuration/Webhook.java | 6 ---- .../v1/service/conversation/Message.java | 6 ---- .../v1/service/conversation/Participant.java | 6 ---- .../v1/service/conversation/Webhook.java | 6 ---- .../conversation/message/DeliveryReceipt.java | 6 ---- .../v1/service/user/UserConversation.java | 6 ---- .../v1/user/UserConversation.java | 6 ---- .../com/twilio/rest/events/v1/EventType.java | 6 ---- .../com/twilio/rest/events/v1/Schema.java | 6 ---- .../java/com/twilio/rest/events/v1/Sink.java | 6 ---- .../twilio/rest/events/v1/Subscription.java | 6 ---- .../rest/events/v1/schema/SchemaVersion.java | 6 ---- .../twilio/rest/events/v1/sink/SinkTest.java | 6 ---- .../rest/events/v1/sink/SinkValidate.java | 6 ---- .../v1/subscription/SubscribedEvent.java | 6 ---- .../twilio/rest/flexapi/v1/Assessments.java | 6 ---- .../com/twilio/rest/flexapi/v1/Channel.java | 6 ---- .../twilio/rest/flexapi/v1/Configuration.java | 6 ---- .../rest/flexapi/v1/CreateFlexInstance.java | 6 ---- .../com/twilio/rest/flexapi/v1/FlexFlow.java | 6 ---- .../v1/InsightsAssessmentsComment.java | 6 ---- .../flexapi/v1/InsightsConversations.java | 6 ---- .../flexapi/v1/InsightsQuestionnaires.java | 6 ---- .../v1/InsightsQuestionnairesCategory.java | 6 ---- .../v1/InsightsQuestionnairesQuestion.java | 6 ---- .../rest/flexapi/v1/InsightsSegments.java | 6 ---- .../rest/flexapi/v1/InsightsSession.java | 6 ---- .../v1/InsightsSettingsAnswerSets.java | 6 ---- .../flexapi/v1/InsightsSettingsComment.java | 6 ---- .../rest/flexapi/v1/InsightsUserRoles.java | 6 ---- .../twilio/rest/flexapi/v1/Interaction.java | 6 ---- .../com/twilio/rest/flexapi/v1/Plugin.java | 6 ---- .../twilio/rest/flexapi/v1/PluginArchive.java | 6 ---- .../rest/flexapi/v1/PluginConfiguration.java | 6 ---- .../v1/PluginConfigurationArchive.java | 6 ---- .../twilio/rest/flexapi/v1/PluginRelease.java | 6 ---- .../rest/flexapi/v1/PluginVersionArchive.java | 6 ---- .../rest/flexapi/v1/ProvisioningStatus.java | 6 ---- .../twilio/rest/flexapi/v1/WebChannel.java | 6 ---- .../v1/interaction/InteractionChannel.java | 6 ---- .../InteractionChannelInvite.java | 6 ---- .../InteractionChannelParticipant.java | 6 ---- .../InteractionTransfer.java | 6 ---- .../flexapi/v1/plugin/PluginVersions.java | 6 ---- .../pluginconfiguration/ConfiguredPlugin.java | 6 ---- .../com/twilio/rest/flexapi/v2/FlexUser.java | 6 ---- .../twilio/rest/flexapi/v2/WebChannels.java | 6 ---- .../com/twilio/rest/frontlineapi/v1/User.java | 6 ---- .../java/com/twilio/rest/iam/v1/ApiKey.java | 6 ---- .../com/twilio/rest/iam/v1/GetApiKeys.java | 6 ---- .../com/twilio/rest/iam/v1/NewApiKey.java | 6 ---- .../java/com/twilio/rest/iam/v1/OAuthApp.java | 6 ---- .../java/com/twilio/rest/iam/v1/Token.java | 6 ---- .../com/twilio/rest/insights/v1/Call.java | 6 ---- .../rest/insights/v1/CallSummaries.java | 6 ---- .../twilio/rest/insights/v1/Conference.java | 6 ---- .../com/twilio/rest/insights/v1/Room.java | 6 ---- .../com/twilio/rest/insights/v1/Setting.java | 6 ---- .../rest/insights/v1/call/Annotation.java | 6 ---- .../rest/insights/v1/call/CallSummary.java | 6 ---- .../twilio/rest/insights/v1/call/Event.java | 6 ---- .../twilio/rest/insights/v1/call/Metric.java | 6 ---- .../v1/conference/ConferenceParticipant.java | 6 ---- .../rest/insights/v1/room/Participant.java | 6 ---- .../rest/intelligence/v2/CustomOperator.java | 6 ---- .../twilio/rest/intelligence/v2/Operator.java | 6 ---- .../intelligence/v2/OperatorAttachment.java | 6 ---- .../intelligence/v2/OperatorAttachments.java | 6 ---- .../rest/intelligence/v2/OperatorType.java | 6 ---- .../intelligence/v2/PrebuiltOperator.java | 6 ---- .../twilio/rest/intelligence/v2/Service.java | 6 ---- .../rest/intelligence/v2/Transcript.java | 6 ---- .../transcript/EncryptedOperatorResults.java | 6 ---- .../v2/transcript/EncryptedSentences.java | 6 ---- .../intelligence/v2/transcript/Media.java | 6 ---- .../v2/transcript/OperatorResult.java | 6 ---- .../intelligence/v2/transcript/Sentence.java | 6 ---- .../rest/ipmessaging/v1/Credential.java | 6 ---- .../twilio/rest/ipmessaging/v1/Service.java | 6 ---- .../rest/ipmessaging/v1/service/Channel.java | 6 ---- .../rest/ipmessaging/v1/service/Role.java | 6 ---- .../rest/ipmessaging/v1/service/User.java | 6 ---- .../v1/service/channel/Invite.java | 6 ---- .../v1/service/channel/Member.java | 6 ---- .../v1/service/channel/Message.java | 6 ---- .../v1/service/user/UserChannel.java | 6 ---- .../rest/ipmessaging/v2/Credential.java | 6 ---- .../twilio/rest/ipmessaging/v2/Service.java | 6 ---- .../rest/ipmessaging/v2/service/Binding.java | 6 ---- .../rest/ipmessaging/v2/service/Channel.java | 6 ---- .../rest/ipmessaging/v2/service/Role.java | 6 ---- .../rest/ipmessaging/v2/service/User.java | 6 ---- .../v2/service/channel/Invite.java | 6 ---- .../v2/service/channel/Member.java | 6 ---- .../v2/service/channel/Message.java | 6 ---- .../v2/service/channel/Webhook.java | 6 ---- .../v2/service/user/UserBinding.java | 6 ---- .../v2/service/user/UserChannel.java | 6 ---- .../twilio/rest/knowledge/v1/Knowledge.java | 6 ---- .../rest/knowledge/v1/knowledge/Chunk.java | 6 ---- .../v1/knowledge/KnowledgeStatus.java | 6 ---- .../twilio/rest/lookups/v1/PhoneNumber.java | 6 ---- .../com/twilio/rest/lookups/v2/Bucket.java | 6 ---- .../rest/lookups/v2/LookupOverride.java | 6 ---- .../twilio/rest/lookups/v2/PhoneNumber.java | 6 ---- .../com/twilio/rest/lookups/v2/Query.java | 6 ---- .../com/twilio/rest/lookups/v2/RateLimit.java | 6 ---- .../rest/marketplace/v1/AvailableAddOn.java | 6 ---- .../rest/marketplace/v1/InstalledAddOn.java | 6 ---- .../rest/marketplace/v1/ModuleData.java | 6 ---- .../marketplace/v1/ModuleDataManagement.java | 6 ---- .../marketplace/v1/ReferralConversion.java | 6 ---- .../AvailableAddOnExtension.java | 6 ---- .../InstalledAddOnExtension.java | 6 ---- .../installedaddon/InstalledAddOnUsage.java | 6 ---- .../rest/messaging/v1/BrandRegistration.java | 6 ---- .../rest/messaging/v1/Deactivations.java | 6 ---- .../twilio/rest/messaging/v1/DomainCerts.java | 6 ---- .../rest/messaging/v1/DomainConfig.java | 6 ---- .../v1/DomainConfigMessagingService.java | 6 ---- .../rest/messaging/v1/DomainValidateDn.java | 6 ---- .../rest/messaging/v1/ExternalCampaign.java | 6 ---- .../v1/LinkshorteningMessagingService.java | 6 ---- ...ningMessagingServiceDomainAssociation.java | 6 ---- .../rest/messaging/v1/RequestManagedCert.java | 6 ---- .../com/twilio/rest/messaging/v1/Service.java | 6 ---- .../messaging/v1/TollfreeVerification.java | 6 ---- .../com/twilio/rest/messaging/v1/Usecase.java | 6 ---- .../BrandRegistrationOtp.java | 6 ---- .../v1/brandregistration/BrandVetting.java | 6 ---- .../messaging/v1/service/AlphaSender.java | 6 ---- .../messaging/v1/service/ChannelSender.java | 6 ---- .../v1/service/DestinationAlphaSender.java | 6 ---- .../messaging/v1/service/PhoneNumber.java | 6 ---- .../rest/messaging/v1/service/ShortCode.java | 6 ---- .../messaging/v1/service/UsAppToPerson.java | 6 ---- .../v1/service/UsAppToPersonUsecase.java | 6 ---- .../rest/messaging/v2/ChannelsSender.java | 6 ---- .../twilio/rest/messaging/v2/DomainCerts.java | 6 ---- .../rest/messaging/v2/TypingIndicator.java | 6 ---- .../com/twilio/rest/monitor/v1/Alert.java | 6 ---- .../com/twilio/rest/monitor/v1/Event.java | 6 ---- .../com/twilio/rest/notify/v1/Credential.java | 6 ---- .../com/twilio/rest/notify/v1/Service.java | 6 ---- .../rest/notify/v1/service/Binding.java | 6 ---- .../rest/notify/v1/service/Notification.java | 6 ---- .../rest/numbers/v1/BulkEligibility.java | 6 ---- .../twilio/rest/numbers/v1/Eligibility.java | 6 ---- .../rest/numbers/v1/PortingAllPortIn.java | 6 ---- .../twilio/rest/numbers/v1/PortingPortIn.java | 6 ---- .../numbers/v1/PortingPortInPhoneNumber.java | 6 ---- .../rest/numbers/v1/PortingPortability.java | 6 ---- .../v1/PortingWebhookConfiguration.java | 6 ---- .../v1/PortingWebhookConfigurationDelete.java | 6 ---- .../v1/SigningRequestConfiguration.java | 6 ---- .../com/twilio/rest/numbers/v1/Webhook.java | 6 ---- .../twilio/rest/numbers/v2/Application.java | 6 ---- .../numbers/v2/AuthorizationDocument.java | 6 ---- .../numbers/v2/BulkHostedNumberOrder.java | 6 ---- .../twilio/rest/numbers/v2/BundleClone.java | 6 ---- .../rest/numbers/v2/HostedNumberOrder.java | 6 ---- .../DependentHostedNumberOrder.java | 6 ---- .../v2/regulatorycompliance/Bundle.java | 6 ---- .../v2/regulatorycompliance/EndUser.java | 6 ---- .../v2/regulatorycompliance/EndUserType.java | 6 ---- .../v2/regulatorycompliance/Regulation.java | 6 ---- .../SupportingDocument.java | 6 ---- .../SupportingDocumentType.java | 6 ---- .../bundle/BundleCopy.java | 6 ---- .../bundle/Evaluation.java | 6 ---- .../bundle/ItemAssignment.java | 6 ---- .../bundle/ReplaceItems.java | 6 ---- .../rest/numbers/v3/HostedNumberOrder.java | 6 ---- .../com/twilio/rest/oauth/v1/Authorize.java | 6 ---- .../java/com/twilio/rest/oauth/v1/Token.java | 6 ---- .../com/twilio/rest/oauth/v2/Authorize.java | 6 ---- .../java/com/twilio/rest/oauth/v2/Token.java | 6 ---- .../hostedNumbers/AuthorizationDocument.java | 6 ---- .../hostedNumbers/HostedNumberOrder.java | 6 ---- .../DependentHostedNumberOrder.java | 6 ---- .../preview/marketplace/AvailableAddOn.java | 6 ---- .../preview/marketplace/InstalledAddOn.java | 6 ---- .../AvailableAddOnExtension.java | 6 ---- .../InstalledAddOnExtension.java | 6 ---- .../twilio/rest/preview/wireless/Command.java | 6 ---- .../rest/preview/wireless/RatePlan.java | 6 ---- .../com/twilio/rest/preview/wireless/Sim.java | 6 ---- .../rest/preview/wireless/sim/Usage.java | 6 ---- .../previewiam/organizations/Account.java | 6 ---- .../organizations/RoleAssignment.java | 6 ---- .../rest/previewiam/organizations/User.java | 6 ---- .../twilio/rest/previewiam/v1/Authorize.java | 6 ---- .../com/twilio/rest/previewiam/v1/Token.java | 6 ---- .../rest/pricing/v1/messaging/Country.java | 6 ---- .../rest/pricing/v1/phonenumber/Country.java | 6 ---- .../twilio/rest/pricing/v1/voice/Country.java | 6 ---- .../twilio/rest/pricing/v1/voice/Number.java | 6 ---- .../com/twilio/rest/pricing/v2/Country.java | 6 ---- .../com/twilio/rest/pricing/v2/Number.java | 6 ---- .../twilio/rest/pricing/v2/voice/Country.java | 6 ---- .../twilio/rest/pricing/v2/voice/Number.java | 6 ---- .../com/twilio/rest/proxy/v1/Service.java | 6 ---- .../rest/proxy/v1/service/PhoneNumber.java | 6 ---- .../twilio/rest/proxy/v1/service/Session.java | 6 ---- .../proxy/v1/service/session/Interaction.java | 6 ---- .../proxy/v1/service/session/Participant.java | 6 ---- .../participant/MessageInteraction.java | 6 ---- .../twilio/rest/routes/v2/PhoneNumber.java | 6 ---- .../com/twilio/rest/routes/v2/SipDomain.java | 6 ---- .../java/com/twilio/rest/routes/v2/Trunk.java | 6 ---- .../twilio/rest/serverless/v1/Service.java | 6 ---- .../rest/serverless/v1/service/Asset.java | 6 ---- .../rest/serverless/v1/service/Build.java | 6 ---- .../serverless/v1/service/Environment.java | 6 ---- .../rest/serverless/v1/service/Function.java | 6 ---- .../v1/service/asset/AssetVersion.java | 6 ---- .../v1/service/build/BuildStatus.java | 6 ---- .../v1/service/environment/Deployment.java | 6 ---- .../v1/service/environment/Log.java | 6 ---- .../v1/service/environment/Variable.java | 6 ---- .../v1/service/function/FunctionVersion.java | 6 ---- .../FunctionVersionContent.java | 6 ---- .../java/com/twilio/rest/studio/v1/Flow.java | 6 ---- .../rest/studio/v1/flow/Engagement.java | 6 ---- .../twilio/rest/studio/v1/flow/Execution.java | 6 ---- .../v1/flow/engagement/EngagementContext.java | 6 ---- .../rest/studio/v1/flow/engagement/Step.java | 6 ---- .../v1/flow/engagement/step/StepContext.java | 6 ---- .../v1/flow/execution/ExecutionContext.java | 6 ---- .../v1/flow/execution/ExecutionStep.java | 6 ---- .../executionstep/ExecutionStepContext.java | 6 ---- .../java/com/twilio/rest/studio/v2/Flow.java | 6 ---- .../twilio/rest/studio/v2/FlowValidate.java | 6 ---- .../twilio/rest/studio/v2/flow/Execution.java | 6 ---- .../rest/studio/v2/flow/FlowRevision.java | 6 ---- .../rest/studio/v2/flow/FlowTestUser.java | 6 ---- .../v2/flow/execution/ExecutionContext.java | 6 ---- .../v2/flow/execution/ExecutionStep.java | 6 ---- .../executionstep/ExecutionStepContext.java | 6 ---- .../twilio/rest/supersim/v1/EsimProfile.java | 6 ---- .../com/twilio/rest/supersim/v1/Fleet.java | 6 ---- .../twilio/rest/supersim/v1/IpCommand.java | 6 ---- .../com/twilio/rest/supersim/v1/Network.java | 6 ---- .../supersim/v1/NetworkAccessProfile.java | 6 ---- .../rest/supersim/v1/SettingsUpdate.java | 6 ---- .../java/com/twilio/rest/supersim/v1/Sim.java | 6 ---- .../twilio/rest/supersim/v1/SmsCommand.java | 6 ---- .../twilio/rest/supersim/v1/UsageRecord.java | 6 ---- .../NetworkAccessProfileNetwork.java | 6 ---- .../rest/supersim/v1/sim/BillingPeriod.java | 6 ---- .../rest/supersim/v1/sim/SimIpAddress.java | 6 ---- .../java/com/twilio/rest/sync/v1/Service.java | 6 ---- .../twilio/rest/sync/v1/service/Document.java | 6 ---- .../twilio/rest/sync/v1/service/SyncList.java | 6 ---- .../twilio/rest/sync/v1/service/SyncMap.java | 6 ---- .../rest/sync/v1/service/SyncStream.java | 6 ---- .../service/document/DocumentPermission.java | 6 ---- .../v1/service/synclist/SyncListItem.java | 6 ---- .../service/synclist/SyncListPermission.java | 6 ---- .../sync/v1/service/syncmap/SyncMapItem.java | 6 ---- .../v1/service/syncmap/SyncMapPermission.java | 6 ---- .../v1/service/syncstream/StreamMessage.java | 6 ---- .../twilio/rest/taskrouter/v1/Workspace.java | 6 ---- .../taskrouter/v1/workspace/Activity.java | 6 ---- .../rest/taskrouter/v1/workspace/Event.java | 6 ---- .../rest/taskrouter/v1/workspace/Task.java | 6 ---- .../taskrouter/v1/workspace/TaskChannel.java | 6 ---- .../taskrouter/v1/workspace/TaskQueue.java | 6 ---- .../rest/taskrouter/v1/workspace/Worker.java | 6 ---- .../taskrouter/v1/workspace/Workflow.java | 6 ---- .../WorkspaceCumulativeStatistics.java | 6 ---- .../WorkspaceRealTimeStatistics.java | 6 ---- .../v1/workspace/WorkspaceStatistics.java | 6 ---- .../v1/workspace/task/Reservation.java | 6 ---- .../TaskQueueBulkRealTimeStatistics.java | 6 ---- .../TaskQueueCumulativeStatistics.java | 6 ---- .../TaskQueueRealTimeStatistics.java | 6 ---- .../taskqueue/TaskQueueStatistics.java | 6 ---- .../taskqueue/TaskQueuesStatistics.java | 6 ---- .../v1/workspace/worker/Reservation.java | 6 ---- .../v1/workspace/worker/WorkerChannel.java | 6 ---- .../v1/workspace/worker/WorkerStatistics.java | 6 ---- .../worker/WorkersCumulativeStatistics.java | 6 ---- .../worker/WorkersRealTimeStatistics.java | 6 ---- .../workspace/worker/WorkersStatistics.java | 6 ---- .../WorkflowCumulativeStatistics.java | 6 ---- .../workflow/WorkflowRealTimeStatistics.java | 6 ---- .../workflow/WorkflowStatistics.java | 6 ---- .../com/twilio/rest/trunking/v1/Trunk.java | 6 ---- .../trunking/v1/trunk/CredentialList.java | 6 ---- .../v1/trunk/IpAccessControlList.java | 6 ---- .../trunking/v1/trunk/OriginationUrl.java | 6 ---- .../rest/trunking/v1/trunk/PhoneNumber.java | 6 ---- .../rest/trunking/v1/trunk/Recording.java | 6 ---- .../rest/trusthub/v1/ComplianceInquiries.java | 6 ---- .../v1/ComplianceRegistrationInquiries.java | 6 ---- .../v1/ComplianceTollfreeInquiries.java | 6 ---- .../rest/trusthub/v1/CustomerProfiles.java | 6 ---- .../com/twilio/rest/trusthub/v1/EndUser.java | 6 ---- .../twilio/rest/trusthub/v1/EndUserType.java | 6 ---- .../com/twilio/rest/trusthub/v1/Policies.java | 6 ---- .../rest/trusthub/v1/SupportingDocument.java | 6 ---- .../trusthub/v1/SupportingDocumentType.java | 6 ---- .../rest/trusthub/v1/TrustProducts.java | 6 ---- ...omerProfilesChannelEndpointAssignment.java | 6 ---- .../CustomerProfilesEntityAssignments.java | 6 ---- .../CustomerProfilesEvaluations.java | 6 ---- ...rustProductsChannelEndpointAssignment.java | 6 ---- .../TrustProductsEntityAssignments.java | 6 ---- .../TrustProductsEvaluations.java | 6 ---- .../java/com/twilio/rest/verify/v2/Form.java | 6 ---- .../com/twilio/rest/verify/v2/Safelist.java | 6 ---- .../com/twilio/rest/verify/v2/Service.java | 6 ---- .../com/twilio/rest/verify/v2/Template.java | 6 ---- .../rest/verify/v2/VerificationAttempt.java | 6 ---- .../v2/VerificationAttemptsSummary.java | 6 ---- .../rest/verify/v2/service/AccessToken.java | 6 ---- .../verify/v2/service/ApproveChallenge.java | 6 ---- .../twilio/rest/verify/v2/service/Entity.java | 6 ---- .../v2/service/MessagingConfiguration.java | 6 ---- .../rest/verify/v2/service/NewChallenge.java | 6 ---- .../rest/verify/v2/service/NewFactor.java | 6 ---- .../verify/v2/service/NewVerifyFactor.java | 6 ---- .../rest/verify/v2/service/RateLimit.java | 6 ---- .../rest/verify/v2/service/Verification.java | 6 ---- .../verify/v2/service/VerificationCheck.java | 6 ---- .../rest/verify/v2/service/Webhook.java | 6 ---- .../verify/v2/service/entity/Challenge.java | 6 ---- .../rest/verify/v2/service/entity/Factor.java | 6 ---- .../verify/v2/service/entity/NewFactor.java | 6 ---- .../entity/challenge/Notification.java | 6 ---- .../verify/v2/service/ratelimit/Bucket.java | 6 ---- .../com/twilio/rest/video/v1/Composition.java | 6 ---- .../twilio/rest/video/v1/CompositionHook.java | 6 ---- .../rest/video/v1/CompositionSettings.java | 6 ---- .../com/twilio/rest/video/v1/Recording.java | 6 ---- .../rest/video/v1/RecordingSettings.java | 6 ---- .../java/com/twilio/rest/video/v1/Room.java | 6 ---- .../rest/video/v1/room/Participant.java | 6 ---- .../rest/video/v1/room/RecordingRules.java | 6 ---- .../rest/video/v1/room/RoomRecording.java | 6 ---- .../rest/video/v1/room/Transcriptions.java | 6 ---- .../video/v1/room/participant/Anonymize.java | 6 ---- .../v1/room/participant/PublishedTrack.java | 6 ---- .../v1/room/participant/SubscribeRules.java | 6 ---- .../v1/room/participant/SubscribedTrack.java | 6 ---- .../twilio/rest/voice/v1/ArchivedCall.java | 6 ---- .../com/twilio/rest/voice/v1/ByocTrunk.java | 6 ---- .../rest/voice/v1/ConnectionPolicy.java | 6 ---- .../com/twilio/rest/voice/v1/IpRecord.java | 6 ---- .../twilio/rest/voice/v1/SourceIpMapping.java | 6 ---- .../ConnectionPolicyTarget.java | 6 ---- .../dialingpermissions/BulkCountryUpdate.java | 6 ---- .../voice/v1/dialingpermissions/Country.java | 6 ---- .../voice/v1/dialingpermissions/Settings.java | 6 ---- .../country/HighriskSpecialPrefix.java | 6 ---- .../com/twilio/rest/wireless/v1/Command.java | 6 ---- .../com/twilio/rest/wireless/v1/RatePlan.java | 6 ---- .../java/com/twilio/rest/wireless/v1/Sim.java | 6 ---- .../twilio/rest/wireless/v1/UsageRecord.java | 6 ---- .../rest/wireless/v1/sim/DataSession.java | 6 ---- .../rest/wireless/v1/sim/UsageRecord.java | 6 ---- src/main/java/com/twilio/twiml/TwiML.java | 6 ++-- 518 files changed, 26 insertions(+), 3120 deletions(-) diff --git a/src/main/java/com/twilio/base/Page.java b/src/main/java/com/twilio/base/Page.java index 51efc9d5a7..7d94e8da07 100644 --- a/src/main/java/com/twilio/base/Page.java +++ b/src/main/java/com/twilio/base/Page.java @@ -124,25 +124,18 @@ public boolean hasNextPage() { * @return a page of records of type T */ public static Page fromJson(String recordKey, String json, Class recordType, ObjectMapper mapper) { - try { - List results = new ArrayList<>(); - JsonNode root = mapper.readTree(json); - JsonNode records = root.get(recordKey); - for (final JsonNode record : records) { - results.add(mapper.readValue(record.toString(), recordType)); - } - - JsonNode uriNode = root.get("uri"); - if (uriNode != null) { - return buildPage(root, results); - } else { - return buildNextGenPage(root, results); - } - - } catch (final IOException e) { - throw new ApiConnectionException( - "Unable to deserialize response: " + e.getMessage() + "\nJSON: " + json, e - ); + List results = new ArrayList<>(); + JsonNode root = mapper.readTree(json); + JsonNode records = root.get(recordKey); + for (final JsonNode record : records) { + results.add(mapper.readValue(record.toString(), recordType)); + } + + JsonNode uriNode = root.get("uri"); + if (uriNode != null) { + return buildPage(root, results); + } else { + return buildNextGenPage(root, results); } } diff --git a/src/main/java/com/twilio/base/TokenPaginationPage.java b/src/main/java/com/twilio/base/TokenPaginationPage.java index 46f100ce0a..2668e8dab3 100644 --- a/src/main/java/com/twilio/base/TokenPaginationPage.java +++ b/src/main/java/com/twilio/base/TokenPaginationPage.java @@ -86,26 +86,19 @@ public boolean hasNextPage() { * @return a page of records of type T */ public static TokenPaginationPage fromJson(String recordKey, String json, Class recordType, ObjectMapper mapper) { + List results = new ArrayList<>(); + JsonNode root = mapper.readTree(json); try { - List results = new ArrayList<>(); - JsonNode root = mapper.readTree(json); - try { - JsonNode meta = root.get("meta"); - String key = meta.get("key").asText(); - JsonNode records = root.get(key); - for (final JsonNode record : records) { - results.add(mapper.readValue(record.toString(), recordType)); - } - - return buildPage(meta, results); - } catch (NullPointerException e) { - throw new ApiException("Key not found", e); + JsonNode meta = root.get("meta"); + String key = meta.get("key").asText(); + JsonNode records = root.get(key); + for (final JsonNode record : records) { + results.add(mapper.readValue(record.toString(), recordType)); } - } catch (final IOException e) { - throw new ApiConnectionException( - "Unable to deserialize response: " + e.getMessage() + "\nJSON: " + json, e - ); + return buildPage(meta, results); + } catch (NullPointerException e) { + throw new ApiException("Key not found", e); } } diff --git a/src/main/java/com/twilio/converter/Converter.java b/src/main/java/com/twilio/converter/Converter.java index 752cf7e82f..8767cb699c 100644 --- a/src/main/java/com/twilio/converter/Converter.java +++ b/src/main/java/com/twilio/converter/Converter.java @@ -81,11 +81,7 @@ public static String mapToJson(final Map map) { * @return HashMap read */ public static Map jsonToMap(final String json) { - try { - return MAPPER.readValue(json, HashMap.class); - } catch (IOException e) { - return null; - } + return MAPPER.readValue(json, HashMap.class); } } diff --git a/src/main/java/com/twilio/exception/RestException.java b/src/main/java/com/twilio/exception/RestException.java index 88e1741076..aff6761bb2 100644 --- a/src/main/java/com/twilio/exception/RestException.java +++ b/src/main/java/com/twilio/exception/RestException.java @@ -55,8 +55,6 @@ public static RestException fromJson(final InputStream json, final ObjectMapper return objectMapper.readValue(json, RestException.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/exception/RestStandardException.java b/src/main/java/com/twilio/exception/RestStandardException.java index da623d9277..4fc843c698 100644 --- a/src/main/java/com/twilio/exception/RestStandardException.java +++ b/src/main/java/com/twilio/exception/RestStandardException.java @@ -105,8 +105,6 @@ public static RestStandardException fromJson(final InputStream json, final Objec return objectMapper.readValue(json, RestStandardException.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java index 319abde1e3..63697f17e4 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java +++ b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java @@ -58,8 +58,6 @@ public static AuthTokenPromotion fromJson( return objectMapper.readValue(json, AuthTokenPromotion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static AuthTokenPromotion fromJson( return objectMapper.readValue(json, AuthTokenPromotion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java index 7a8d7de7ce..89bf0a6248 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java @@ -56,8 +56,6 @@ public static BulkConsents fromJson( return objectMapper.readValue(json, BulkConsents.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static BulkConsents fromJson( return objectMapper.readValue(json, BulkConsents.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java index e14975741c..9acfa0b587 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java @@ -56,8 +56,6 @@ public static BulkContacts fromJson( return objectMapper.readValue(json, BulkContacts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static BulkContacts fromJson( return objectMapper.readValue(json, BulkContacts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java index 7af9e84eed..8323808cb0 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java +++ b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java @@ -62,8 +62,6 @@ public static MessagingGeopermissions fromJson( return objectMapper.readValue(json, MessagingGeopermissions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static MessagingGeopermissions fromJson( return objectMapper.readValue(json, MessagingGeopermissions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/Safelist.java b/src/main/java/com/twilio/rest/accounts/v1/Safelist.java index 359b4065e0..2a9c60babe 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/Safelist.java +++ b/src/main/java/com/twilio/rest/accounts/v1/Safelist.java @@ -63,8 +63,6 @@ public static Safelist fromJson( return objectMapper.readValue(json, Safelist.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Safelist fromJson( return objectMapper.readValue(json, Safelist.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java index cbdb4e00e0..08f1561c0e 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java +++ b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthToken.java @@ -62,8 +62,6 @@ public static SecondaryAuthToken fromJson( return objectMapper.readValue(json, SecondaryAuthToken.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static SecondaryAuthToken fromJson( return objectMapper.readValue(json, SecondaryAuthToken.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java b/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java index 64ff0ed6ab..b075ab2b3f 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java +++ b/src/main/java/com/twilio/rest/accounts/v1/credential/Aws.java @@ -74,8 +74,6 @@ public static Aws fromJson( return objectMapper.readValue(json, Aws.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static Aws fromJson( return objectMapper.readValue(json, Aws.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java b/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java index c231aafce7..a6e1ea6052 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java +++ b/src/main/java/com/twilio/rest/accounts/v1/credential/PublicKey.java @@ -74,8 +74,6 @@ public static PublicKey fromJson( return objectMapper.readValue(json, PublicKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static PublicKey fromJson( return objectMapper.readValue(json, PublicKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/Account.java b/src/main/java/com/twilio/rest/api/v2010/Account.java index 0c5530e07a..8a5b898196 100644 --- a/src/main/java/com/twilio/rest/api/v2010/Account.java +++ b/src/main/java/com/twilio/rest/api/v2010/Account.java @@ -120,8 +120,6 @@ public static Account fromJson( return objectMapper.readValue(json, Account.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +140,6 @@ public static Account fromJson( return objectMapper.readValue(json, Account.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -154,8 +150,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Address.java b/src/main/java/com/twilio/rest/api/v2010/account/Address.java index 9dcbfb6941..3d451fff84 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Address.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Address.java @@ -132,8 +132,6 @@ public static Address fromJson( return objectMapper.readValue(json, Address.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -154,8 +152,6 @@ public static Address fromJson( return objectMapper.readValue(json, Address.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -166,8 +162,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Application.java b/src/main/java/com/twilio/rest/api/v2010/account/Application.java index 6c8c54c728..334a13248f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Application.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Application.java @@ -104,8 +104,6 @@ public static Application fromJson( return objectMapper.readValue(json, Application.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static Application fromJson( return objectMapper.readValue(json, Application.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java index fd8961148c..6163e6cfc0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectApp.java @@ -125,8 +125,6 @@ public static AuthorizedConnectApp fromJson( return objectMapper.readValue(json, AuthorizedConnectApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +145,6 @@ public static AuthorizedConnectApp fromJson( return objectMapper.readValue(json, AuthorizedConnectApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +155,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java index 1f2e471f0d..27853d636b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountry.java @@ -82,8 +82,6 @@ public static AvailablePhoneNumberCountry fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static AvailablePhoneNumberCountry fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Balance.java b/src/main/java/com/twilio/rest/api/v2010/account/Balance.java index a9b8b77c5d..f16aa1a8d6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Balance.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Balance.java @@ -59,8 +59,6 @@ public static Balance fromJson( return objectMapper.readValue(json, Balance.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static Balance fromJson( return objectMapper.readValue(json, Balance.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Call.java b/src/main/java/com/twilio/rest/api/v2010/account/Call.java index 7610c612dd..96dc7b899f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Call.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Call.java @@ -195,8 +195,6 @@ public static Call fromJson( return objectMapper.readValue(json, Call.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -217,8 +215,6 @@ public static Call fromJson( return objectMapper.readValue(json, Call.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -229,8 +225,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Conference.java b/src/main/java/com/twilio/rest/api/v2010/account/Conference.java index c3479c7022..2b2646b26c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Conference.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Conference.java @@ -155,8 +155,6 @@ public static Conference fromJson( return objectMapper.readValue(json, Conference.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -177,8 +175,6 @@ public static Conference fromJson( return objectMapper.readValue(json, Conference.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +185,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java index 258ee03193..8d5edc8f8a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectApp.java @@ -139,8 +139,6 @@ public static ConnectApp fromJson( return objectMapper.readValue(json, ConnectApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -161,8 +159,6 @@ public static ConnectApp fromJson( return objectMapper.readValue(json, ConnectApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -173,8 +169,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java index a7adb2c160..80bd54b704 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java @@ -213,8 +213,6 @@ public static IncomingPhoneNumber fromJson( return objectMapper.readValue(json, IncomingPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -235,8 +233,6 @@ public static IncomingPhoneNumber fromJson( return objectMapper.readValue(json, IncomingPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -247,8 +243,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Key.java b/src/main/java/com/twilio/rest/api/v2010/account/Key.java index 72ed085c31..90d8096819 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Key.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Key.java @@ -94,8 +94,6 @@ public static Key fromJson( return objectMapper.readValue(json, Key.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +114,6 @@ public static Key fromJson( return objectMapper.readValue(json, Key.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +124,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Message.java b/src/main/java/com/twilio/rest/api/v2010/account/Message.java index 5c92872841..57d884fe0c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Message.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Message.java @@ -347,8 +347,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -369,8 +367,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -381,8 +377,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java b/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java index 1942edf7c9..dbcd822d6c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewKey.java @@ -61,8 +61,6 @@ public static NewKey fromJson( return objectMapper.readValue(json, NewKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static NewKey fromJson( return objectMapper.readValue(json, NewKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java index 7043ca2191..c07382a85f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKey.java @@ -61,8 +61,6 @@ public static NewSigningKey fromJson( return objectMapper.readValue(json, NewSigningKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static NewSigningKey fromJson( return objectMapper.readValue(json, NewSigningKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Notification.java b/src/main/java/com/twilio/rest/api/v2010/account/Notification.java index afbc5893d5..8baf06d946 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Notification.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Notification.java @@ -74,8 +74,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java index 48e177e768..aad7b5cd75 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerId.java @@ -94,8 +94,6 @@ public static OutgoingCallerId fromJson( return objectMapper.readValue(json, OutgoingCallerId.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +114,6 @@ public static OutgoingCallerId fromJson( return objectMapper.readValue(json, OutgoingCallerId.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +124,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Queue.java b/src/main/java/com/twilio/rest/api/v2010/account/Queue.java index 945a93c28d..6e467f284d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Queue.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Queue.java @@ -105,8 +105,6 @@ public static Queue fromJson( return objectMapper.readValue(json, Queue.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +125,6 @@ public static Queue fromJson( return objectMapper.readValue(json, Queue.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -139,8 +135,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/Recording.java index d46a3d473c..33e4d2e2bb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Recording.java @@ -136,8 +136,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -158,8 +156,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -170,8 +166,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java b/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java index 0b4d30895f..d417ede87f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ShortCode.java @@ -85,8 +85,6 @@ public static ShortCode fromJson( return objectMapper.readValue(json, ShortCode.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static ShortCode fromJson( return objectMapper.readValue(json, ShortCode.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java index 8612907ed2..e461f56901 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKey.java @@ -94,8 +94,6 @@ public static SigningKey fromJson( return objectMapper.readValue(json, SigningKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +114,6 @@ public static SigningKey fromJson( return objectMapper.readValue(json, SigningKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +124,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Token.java b/src/main/java/com/twilio/rest/api/v2010/account/Token.java index 62429f4975..dc4b98ac0d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Token.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Token.java @@ -63,8 +63,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java index e0af855b2d..2d14773dd6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/Transcription.java @@ -107,8 +107,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +127,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -141,8 +137,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java index 9bab6cc5d2..93850ab8fb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequest.java @@ -64,8 +64,6 @@ public static ValidationRequest fromJson( return objectMapper.readValue(json, ValidationRequest.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static ValidationRequest fromJson( return objectMapper.readValue(json, ValidationRequest.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java index 2fdb144ffd..0d5d8ecf3e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java @@ -111,8 +111,6 @@ public static DependentPhoneNumber fromJson( return objectMapper.readValue(json, DependentPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +131,6 @@ public static DependentPhoneNumber fromJson( return objectMapper.readValue(json, DependentPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -145,8 +141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java index 6dbf6e4045..2b5c5ad3b3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Local.java @@ -64,8 +64,6 @@ public static Local fromJson( return objectMapper.readValue(json, Local.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Local fromJson( return objectMapper.readValue(json, Local.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java index 8b70c8534b..7749732a06 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachine.java @@ -64,8 +64,6 @@ public static MachineToMachine fromJson( return objectMapper.readValue(json, MachineToMachine.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static MachineToMachine fromJson( return objectMapper.readValue(json, MachineToMachine.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java index 3245e949f7..cfecfe788d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Mobile.java @@ -64,8 +64,6 @@ public static Mobile fromJson( return objectMapper.readValue(json, Mobile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Mobile fromJson( return objectMapper.readValue(json, Mobile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java index 6b0f0ec7dc..3ff51ceff8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/National.java @@ -64,8 +64,6 @@ public static National fromJson( return objectMapper.readValue(json, National.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static National fromJson( return objectMapper.readValue(json, National.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java index 3800876fd5..ac9670a6db 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCost.java @@ -64,8 +64,6 @@ public static SharedCost fromJson( return objectMapper.readValue(json, SharedCost.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static SharedCost fromJson( return objectMapper.readValue(json, SharedCost.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java index 4005c8fa3a..5cb946c2fb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFree.java @@ -64,8 +64,6 @@ public static TollFree fromJson( return objectMapper.readValue(json, TollFree.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static TollFree fromJson( return objectMapper.readValue(json, TollFree.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java index 0b5fe6fb40..8ce6c44558 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/Voip.java @@ -64,8 +64,6 @@ public static Voip fromJson( return objectMapper.readValue(json, Voip.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Voip fromJson( return objectMapper.readValue(json, Voip.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java index d770f39fcd..2921950dc4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Event.java @@ -62,8 +62,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java index bfaf9c8e4c..405967b3a4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Notification.java @@ -81,8 +81,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java index a5538c61ef..5e3ad6b485 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Payment.java @@ -213,8 +213,6 @@ public static Payment fromJson( return objectMapper.readValue(json, Payment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -235,8 +233,6 @@ public static Payment fromJson( return objectMapper.readValue(json, Payment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -247,8 +243,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java index c302384279..d7229436dd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Recording.java @@ -179,8 +179,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -201,8 +199,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -213,8 +209,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java index 141bdd3c01..da5a1cab63 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Siprec.java @@ -142,8 +142,6 @@ public static Siprec fromJson( return objectMapper.readValue(json, Siprec.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -164,8 +162,6 @@ public static Siprec fromJson( return objectMapper.readValue(json, Siprec.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -176,8 +172,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java index 314569bad4..d010aab76b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Stream.java @@ -147,8 +147,6 @@ public static Stream fromJson( return objectMapper.readValue(json, Stream.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +167,6 @@ public static Stream fromJson( return objectMapper.readValue(json, Stream.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -181,8 +177,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java index 6b2c672fc9..b01478cb13 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/Transcription.java @@ -147,8 +147,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +167,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -181,8 +177,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java index c6157b7e96..1a4a58d859 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessage.java @@ -72,8 +72,6 @@ public static UserDefinedMessage fromJson( return objectMapper.readValue(json, UserDefinedMessage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +92,6 @@ public static UserDefinedMessage fromJson( return objectMapper.readValue(json, UserDefinedMessage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +102,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java index 9d635464a3..f5ceb963fd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscription.java @@ -95,8 +95,6 @@ public static UserDefinedMessageSubscription fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static UserDefinedMessageSubscription fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java index 00a4a9928b..47ff3d4bcd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/Participant.java @@ -168,8 +168,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -190,8 +188,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -202,8 +198,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java index e5e0784b31..c29ea9e756 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/Recording.java @@ -167,8 +167,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +187,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -201,8 +197,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java index 1851ef6d47..7c7f164603 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOn.java @@ -122,8 +122,6 @@ public static AssignedAddOn fromJson( return objectMapper.readValue(json, AssignedAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +142,6 @@ public static AssignedAddOn fromJson( return objectMapper.readValue(json, AssignedAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -156,8 +152,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java index dc7d8c8d4d..478777ecb6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java @@ -167,8 +167,6 @@ public static Local fromJson( return objectMapper.readValue(json, Local.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +187,6 @@ public static Local fromJson( return objectMapper.readValue(json, Local.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -201,8 +197,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java index b63dd8cdb1..6699ecaf2f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Mobile.java @@ -167,8 +167,6 @@ public static Mobile fromJson( return objectMapper.readValue(json, Mobile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +187,6 @@ public static Mobile fromJson( return objectMapper.readValue(json, Mobile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -201,8 +197,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java index d57b6244c4..f32506bdd6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFree.java @@ -167,8 +167,6 @@ public static TollFree fromJson( return objectMapper.readValue(json, TollFree.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +187,6 @@ public static TollFree fromJson( return objectMapper.readValue(json, TollFree.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -201,8 +197,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java index e423be7ca8..c0545ad20b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtension.java @@ -99,8 +99,6 @@ public static AssignedAddOnExtension fromJson( return objectMapper.readValue(json, AssignedAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +119,6 @@ public static AssignedAddOnExtension fromJson( return objectMapper.readValue(json, AssignedAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +129,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java b/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java index c9a9177853..4dc12435fa 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/Feedback.java @@ -85,8 +85,6 @@ public static Feedback fromJson( return objectMapper.readValue(json, Feedback.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Feedback fromJson( return objectMapper.readValue(json, Feedback.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java b/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java index 6ca6fa8229..bee652b240 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/Media.java @@ -94,8 +94,6 @@ public static Media fromJson( return objectMapper.readValue(json, Media.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +114,6 @@ public static Media fromJson( return objectMapper.readValue(json, Media.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +124,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java b/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java index 1b369ee5d0..2f662bdc0c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/queue/Member.java @@ -102,8 +102,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java index ecc3334cfd..49e234901a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResult.java @@ -130,8 +130,6 @@ public static AddOnResult fromJson( return objectMapper.readValue(json, AddOnResult.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -152,8 +150,6 @@ public static AddOnResult fromJson( return objectMapper.readValue(json, AddOnResult.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -164,8 +160,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java index 17594685ec..9318094f87 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/Transcription.java @@ -126,8 +126,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +146,6 @@ public static Transcription fromJson( return objectMapper.readValue(json, Transcription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +156,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java index cb19e6ffe0..91f5d22887 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/Payload.java @@ -125,8 +125,6 @@ public static Payload fromJson( return objectMapper.readValue(json, Payload.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +145,6 @@ public static Payload fromJson( return objectMapper.readValue(json, Payload.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +155,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java index 4df6d0c2b1..9d0a971ad0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/Data.java @@ -78,8 +78,6 @@ public static Data fromJson( return objectMapper.readValue(json, Data.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +98,6 @@ public static Data fromJson( return objectMapper.readValue(json, Data.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +108,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java index 037a3400be..6fa4a8363b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialList.java @@ -110,8 +110,6 @@ public static CredentialList fromJson( return objectMapper.readValue(json, CredentialList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +130,6 @@ public static CredentialList fromJson( return objectMapper.readValue(json, CredentialList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +140,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java index b9997f6f38..f2fe5a4f51 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/Domain.java @@ -108,8 +108,6 @@ public static Domain fromJson( return objectMapper.readValue(json, Domain.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static Domain fromJson( return objectMapper.readValue(json, Domain.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java index f6a68f6712..536ca38b8c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlList.java @@ -118,8 +118,6 @@ public static IpAccessControlList fromJson( return objectMapper.readValue(json, IpAccessControlList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -140,8 +138,6 @@ public static IpAccessControlList fromJson( return objectMapper.readValue(json, IpAccessControlList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -152,8 +148,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java index 9195208ca1..b771c69498 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/Credential.java @@ -143,8 +143,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -165,8 +163,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -177,8 +173,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java index b2cda4bd8b..33ddc0e467 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMapping.java @@ -126,8 +126,6 @@ public static CredentialListMapping fromJson( return objectMapper.readValue(json, CredentialListMapping.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +146,6 @@ public static CredentialListMapping fromJson( return objectMapper.readValue(json, CredentialListMapping.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +156,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java index 30fbc8750d..f99298a483 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMapping.java @@ -132,8 +132,6 @@ public static IpAccessControlListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -157,8 +155,6 @@ public static IpAccessControlListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +165,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java index 9864b8d089..7b5977c513 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMapping.java @@ -138,8 +138,6 @@ public static AuthCallsCredentialListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -163,8 +161,6 @@ public static AuthCallsCredentialListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -175,8 +171,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java index 6292dd09c2..1bb9a19110 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMapping.java @@ -138,8 +138,6 @@ public static AuthCallsIpAccessControlListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -163,8 +161,6 @@ public static AuthCallsIpAccessControlListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -175,8 +171,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java index 782c025277..7c9ed48899 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMapping.java @@ -138,8 +138,6 @@ public static AuthRegistrationsCredentialListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -163,8 +161,6 @@ public static AuthRegistrationsCredentialListMapping fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -175,8 +171,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java index 52dc3b7265..d388d6c647 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddress.java @@ -149,8 +149,6 @@ public static IpAddress fromJson( return objectMapper.readValue(json, IpAddress.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -171,8 +169,6 @@ public static IpAddress fromJson( return objectMapper.readValue(json, IpAddress.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -183,8 +179,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java index 51bc65f4ef..28a270ddf7 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java @@ -64,8 +64,6 @@ public static Record fromJson( return objectMapper.readValue(json, Record.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Record fromJson( return objectMapper.readValue(json, Record.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java index b856e845be..6a45a0f873 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java @@ -162,8 +162,6 @@ public static Trigger fromJson( return objectMapper.readValue(json, Trigger.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -184,8 +182,6 @@ public static Trigger fromJson( return objectMapper.readValue(json, Trigger.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -196,8 +192,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java index 27484eceef..e341576ca3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java @@ -64,8 +64,6 @@ public static AllTime fromJson( return objectMapper.readValue(json, AllTime.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static AllTime fromJson( return objectMapper.readValue(json, AllTime.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java index b8d57f8881..0661f2968d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java @@ -64,8 +64,6 @@ public static Daily fromJson( return objectMapper.readValue(json, Daily.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Daily fromJson( return objectMapper.readValue(json, Daily.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java index 18be25a75d..fe9e4faad1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java @@ -64,8 +64,6 @@ public static LastMonth fromJson( return objectMapper.readValue(json, LastMonth.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static LastMonth fromJson( return objectMapper.readValue(json, LastMonth.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java index 9548ea45f5..15600cf5d0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java @@ -64,8 +64,6 @@ public static Monthly fromJson( return objectMapper.readValue(json, Monthly.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Monthly fromJson( return objectMapper.readValue(json, Monthly.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java index db9144e7b8..d08c36b112 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java @@ -64,8 +64,6 @@ public static ThisMonth fromJson( return objectMapper.readValue(json, ThisMonth.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static ThisMonth fromJson( return objectMapper.readValue(json, ThisMonth.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java index 33905bd508..b15e227985 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java @@ -64,8 +64,6 @@ public static Today fromJson( return objectMapper.readValue(json, Today.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Today fromJson( return objectMapper.readValue(json, Today.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java index dc20914257..e16facc106 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java @@ -64,8 +64,6 @@ public static Yearly fromJson( return objectMapper.readValue(json, Yearly.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Yearly fromJson( return objectMapper.readValue(json, Yearly.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java index 982b751cb3..d832551a00 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java @@ -64,8 +64,6 @@ public static Yesterday fromJson( return objectMapper.readValue(json, Yesterday.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Yesterday fromJson( return objectMapper.readValue(json, Yesterday.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java index 520bfaf74f..e161c1701d 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java @@ -1067,8 +1067,6 @@ public static Assistant fromJson( return objectMapper.readValue(json, Assistant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1089,8 +1087,6 @@ public static Assistant fromJson( return objectMapper.readValue(json, Assistant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1101,8 +1097,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java index e5716ec2da..0b72ae5bd4 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java @@ -570,8 +570,6 @@ public static Knowledge fromJson( return objectMapper.readValue(json, Knowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -592,8 +590,6 @@ public static Knowledge fromJson( return objectMapper.readValue(json, Knowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -604,8 +600,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/Policy.java b/src/main/java/com/twilio/rest/assistants/v1/Policy.java index a141e2f01f..932ea272eb 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Policy.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Policy.java @@ -57,8 +57,6 @@ public static Policy fromJson( return objectMapper.readValue(json, Policy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Policy fromJson( return objectMapper.readValue(json, Policy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/Session.java b/src/main/java/com/twilio/rest/assistants/v1/Session.java index 3e5cfe28fa..d74895d664 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Session.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Session.java @@ -61,8 +61,6 @@ public static Session fromJson( return objectMapper.readValue(json, Session.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static Session fromJson( return objectMapper.readValue(json, Session.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/Tool.java b/src/main/java/com/twilio/rest/assistants/v1/Tool.java index 805ebb1836..d012a4fbdd 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Tool.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Tool.java @@ -804,8 +804,6 @@ public static Tool fromJson( return objectMapper.readValue(json, Tool.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -826,8 +824,6 @@ public static Tool fromJson( return objectMapper.readValue(json, Tool.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -838,8 +834,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java index 77b58d459b..59cef8b7a3 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java @@ -73,8 +73,6 @@ public static AssistantsKnowledge fromJson( return objectMapper.readValue(json, AssistantsKnowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +93,6 @@ public static AssistantsKnowledge fromJson( return objectMapper.readValue(json, AssistantsKnowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +103,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java index 0143f2ee08..08686c9e62 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java @@ -71,8 +71,6 @@ public static AssistantsTool fromJson( return objectMapper.readValue(json, AssistantsTool.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +91,6 @@ public static AssistantsTool fromJson( return objectMapper.readValue(json, AssistantsTool.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -105,8 +101,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java index 4a2acee2d0..8e48569c01 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java @@ -190,8 +190,6 @@ public static Feedback fromJson( return objectMapper.readValue(json, Feedback.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -212,8 +210,6 @@ public static Feedback fromJson( return objectMapper.readValue(json, Feedback.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -224,8 +220,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java index f138505c64..e899d93c26 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java +++ b/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java @@ -204,8 +204,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -226,8 +224,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -238,8 +234,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java index 83796e6cc8..25942793be 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java +++ b/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java @@ -57,8 +57,6 @@ public static Chunk fromJson( return objectMapper.readValue(json, Chunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Chunk fromJson( return objectMapper.readValue(json, Chunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java index 85df05f203..0334fa3fed 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java +++ b/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java @@ -57,8 +57,6 @@ public static KnowledgeStatus fromJson( return objectMapper.readValue(json, KnowledgeStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static KnowledgeStatus fromJson( return objectMapper.readValue(json, KnowledgeStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java b/src/main/java/com/twilio/rest/assistants/v1/session/Message.java index 9fe492aa0b..1c63be7337 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java +++ b/src/main/java/com/twilio/rest/assistants/v1/session/Message.java @@ -57,8 +57,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/Export.java b/src/main/java/com/twilio/rest/bulkexports/v1/Export.java index 71d0adea30..ecac491af6 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/Export.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/Export.java @@ -57,8 +57,6 @@ public static Export fromJson( return objectMapper.readValue(json, Export.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Export fromJson( return objectMapper.readValue(json, Export.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java index fd37512456..00e58dc047 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfiguration.java @@ -64,8 +64,6 @@ public static ExportConfiguration fromJson( return objectMapper.readValue(json, ExportConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static ExportConfiguration fromJson( return objectMapper.readValue(json, ExportConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java index 9d702aef91..495c9b23a8 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/Day.java @@ -63,8 +63,6 @@ public static Day fromJson( return objectMapper.readValue(json, Day.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Day fromJson( return objectMapper.readValue(json, Day.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java index e6a371cabd..f81ee2bd61 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java @@ -70,8 +70,6 @@ public static ExportCustomJob fromJson( return objectMapper.readValue(json, ExportCustomJob.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static ExportCustomJob fromJson( return objectMapper.readValue(json, ExportCustomJob.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java index 687a70d418..7f59427a2a 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java @@ -61,8 +61,6 @@ public static Job fromJson( return objectMapper.readValue(json, Job.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static Job fromJson( return objectMapper.readValue(json, Job.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/Credential.java b/src/main/java/com/twilio/rest/chat/v1/Credential.java index 586cc57363..8580018fc5 100644 --- a/src/main/java/com/twilio/rest/chat/v1/Credential.java +++ b/src/main/java/com/twilio/rest/chat/v1/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/Service.java b/src/main/java/com/twilio/rest/chat/v1/Service.java index 41cf8c3a62..45c5b578f7 100644 --- a/src/main/java/com/twilio/rest/chat/v1/Service.java +++ b/src/main/java/com/twilio/rest/chat/v1/Service.java @@ -76,8 +76,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/Channel.java b/src/main/java/com/twilio/rest/chat/v1/service/Channel.java index cac1ba24fd..16917ab7c8 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/Channel.java @@ -105,8 +105,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +125,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -139,8 +135,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/Role.java b/src/main/java/com/twilio/rest/chat/v1/service/Role.java index 482be8f1eb..46be4616c1 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/Role.java @@ -111,8 +111,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +131,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -145,8 +141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/User.java b/src/main/java/com/twilio/rest/chat/v1/service/User.java index eafe58b2a4..52f7292b8f 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/User.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/User.java @@ -87,8 +87,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java index 9f3370c265..7093022ffa 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Invite.java @@ -85,8 +85,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java index 32cb4ce422..4686a2b856 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Member.java @@ -93,8 +93,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +113,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +123,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java index d6f6c5ab8c..dab38e4cc5 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/Message.java @@ -114,8 +114,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +134,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +144,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java index d09a1d3f3b..4e7016a768 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannel.java @@ -81,8 +81,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/Credential.java b/src/main/java/com/twilio/rest/chat/v2/Credential.java index 93de53aeeb..27d831e384 100644 --- a/src/main/java/com/twilio/rest/chat/v2/Credential.java +++ b/src/main/java/com/twilio/rest/chat/v2/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/Service.java b/src/main/java/com/twilio/rest/chat/v2/Service.java index 3d6d7cb641..b45f172424 100644 --- a/src/main/java/com/twilio/rest/chat/v2/Service.java +++ b/src/main/java/com/twilio/rest/chat/v2/Service.java @@ -76,8 +76,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Binding.java b/src/main/java/com/twilio/rest/chat/v2/service/Binding.java index 6edba3873a..ff51770832 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Binding.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Binding.java @@ -96,8 +96,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Channel.java b/src/main/java/com/twilio/rest/chat/v2/service/Channel.java index 038828297e..a5c2feb9a0 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Channel.java @@ -125,8 +125,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +145,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +155,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/Role.java b/src/main/java/com/twilio/rest/chat/v2/service/Role.java index f2b1c1bebc..bc4ce606a0 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/Role.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/Role.java @@ -111,8 +111,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +131,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -145,8 +141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/User.java b/src/main/java/com/twilio/rest/chat/v2/service/User.java index b32f0ba25c..978a171269 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/User.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/User.java @@ -108,8 +108,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java index c3f67f4487..7b58385165 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Invite.java @@ -85,8 +85,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java index ce07c30d40..8c3841eac2 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Member.java @@ -114,8 +114,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +134,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +144,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java index 4bdc5b8e15..feef7f9520 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Message.java @@ -133,8 +133,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -155,8 +153,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -167,8 +163,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java index eec5c737ea..fad04d756d 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/Webhook.java @@ -135,8 +135,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -157,8 +155,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +165,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java index a1e910f388..8233aa3fee 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBinding.java @@ -100,8 +100,6 @@ public static UserBinding fromJson( return objectMapper.readValue(json, UserBinding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static UserBinding fromJson( return objectMapper.readValue(json, UserBinding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java index 0539c1dabf..afca09a3e7 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannel.java @@ -158,8 +158,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -180,8 +178,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -192,8 +188,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/chat/v3/Channel.java b/src/main/java/com/twilio/rest/chat/v3/Channel.java index eef1f1a1d0..332d5e7e00 100644 --- a/src/main/java/com/twilio/rest/chat/v3/Channel.java +++ b/src/main/java/com/twilio/rest/chat/v3/Channel.java @@ -102,8 +102,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v1/Content.java b/src/main/java/com/twilio/rest/content/v1/Content.java index 4de76424b2..4ba6eb29be 100644 --- a/src/main/java/com/twilio/rest/content/v1/Content.java +++ b/src/main/java/com/twilio/rest/content/v1/Content.java @@ -3494,8 +3494,6 @@ public static Content fromJson( return objectMapper.readValue(json, Content.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -3516,8 +3514,6 @@ public static Content fromJson( return objectMapper.readValue(json, Content.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -3528,8 +3524,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java b/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java index c95d880518..667116f39c 100644 --- a/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java +++ b/src/main/java/com/twilio/rest/content/v1/ContentAndApprovals.java @@ -57,8 +57,6 @@ public static ContentAndApprovals fromJson( return objectMapper.readValue(json, ContentAndApprovals.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static ContentAndApprovals fromJson( return objectMapper.readValue(json, ContentAndApprovals.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v1/LegacyContent.java b/src/main/java/com/twilio/rest/content/v1/LegacyContent.java index ee6eae0ac8..c1dbbc51a8 100644 --- a/src/main/java/com/twilio/rest/content/v1/LegacyContent.java +++ b/src/main/java/com/twilio/rest/content/v1/LegacyContent.java @@ -58,8 +58,6 @@ public static LegacyContent fromJson( return objectMapper.readValue(json, LegacyContent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static LegacyContent fromJson( return objectMapper.readValue(json, LegacyContent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java index 4c9659eb1d..4651c4dd17 100644 --- a/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java +++ b/src/main/java/com/twilio/rest/content/v1/content/ApprovalCreate.java @@ -145,8 +145,6 @@ public static ApprovalCreate fromJson( return objectMapper.readValue(json, ApprovalCreate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -167,8 +165,6 @@ public static ApprovalCreate fromJson( return objectMapper.readValue(json, ApprovalCreate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -179,8 +175,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java b/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java index fea859badd..5eaa8be64e 100644 --- a/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java +++ b/src/main/java/com/twilio/rest/content/v1/content/ApprovalFetch.java @@ -56,8 +56,6 @@ public static ApprovalFetch fromJson( return objectMapper.readValue(json, ApprovalFetch.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static ApprovalFetch fromJson( return objectMapper.readValue(json, ApprovalFetch.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v2/Content.java b/src/main/java/com/twilio/rest/content/v2/Content.java index fe7ec85205..169400f3eb 100644 --- a/src/main/java/com/twilio/rest/content/v2/Content.java +++ b/src/main/java/com/twilio/rest/content/v2/Content.java @@ -59,8 +59,6 @@ public static Content fromJson( return objectMapper.readValue(json, Content.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static Content fromJson( return objectMapper.readValue(json, Content.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java b/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java index 46b57aea23..9cd44b1dce 100644 --- a/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java +++ b/src/main/java/com/twilio/rest/content/v2/ContentAndApprovals.java @@ -57,8 +57,6 @@ public static ContentAndApprovals fromJson( return objectMapper.readValue(json, ContentAndApprovals.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static ContentAndApprovals fromJson( return objectMapper.readValue(json, ContentAndApprovals.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java index 3e603ecec1..ce9f0d224e 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java @@ -145,8 +145,6 @@ public static AddressConfiguration fromJson( return objectMapper.readValue(json, AddressConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -167,8 +165,6 @@ public static AddressConfiguration fromJson( return objectMapper.readValue(json, AddressConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -179,8 +175,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Configuration.java b/src/main/java/com/twilio/rest/conversations/v1/Configuration.java index 42188fce1d..453419f98e 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Configuration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Configuration.java @@ -61,8 +61,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java index 39627dd1c4..43597338a4 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java @@ -118,8 +118,6 @@ public static Conversation fromJson( return objectMapper.readValue(json, Conversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -140,8 +138,6 @@ public static Conversation fromJson( return objectMapper.readValue(json, Conversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -152,8 +148,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java index cfeffc8bc7..32753340ee 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java @@ -105,8 +105,6 @@ public static ConversationWithParticipants fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static ConversationWithParticipants fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Credential.java b/src/main/java/com/twilio/rest/conversations/v1/Credential.java index aebcc7ca06..55716e7b9d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Credential.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java index 5ecd84b2dc..e90211cafa 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversation.java @@ -80,8 +80,6 @@ public static ParticipantConversation fromJson( return objectMapper.readValue(json, ParticipantConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static ParticipantConversation fromJson( return objectMapper.readValue(json, ParticipantConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Role.java b/src/main/java/com/twilio/rest/conversations/v1/Role.java index ba251c73bf..cf900cf334 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Role.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Role.java @@ -103,8 +103,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +123,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -137,8 +133,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Service.java b/src/main/java/com/twilio/rest/conversations/v1/Service.java index a6844da3a8..30905ab039 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Service.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Service.java @@ -71,8 +71,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +91,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -105,8 +101,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/User.java b/src/main/java/com/twilio/rest/conversations/v1/User.java index e9a4844bd7..4a45dc831c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/User.java +++ b/src/main/java/com/twilio/rest/conversations/v1/User.java @@ -96,8 +96,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java index 3735bfc888..0f50988dad 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/configuration/Webhook.java @@ -102,8 +102,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java index 3a55110d38..e2967f9c17 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Message.java @@ -126,8 +126,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +146,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +156,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java index b757256600..b964154910 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Participant.java @@ -104,8 +104,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java index f2acb2f288..6ca8d086ff 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java @@ -128,8 +128,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -150,8 +148,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -162,8 +158,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java index 9b929040d2..4a4ecafad9 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceipt.java @@ -97,8 +97,6 @@ public static DeliveryReceipt fromJson( return objectMapper.readValue(json, DeliveryReceipt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +117,6 @@ public static DeliveryReceipt fromJson( return objectMapper.readValue(json, DeliveryReceipt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -131,8 +127,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java b/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java index ac2b731509..b7b13e1eb0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Binding.java @@ -96,8 +96,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java b/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java index 221f11491a..a19a9976b6 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Configuration.java @@ -65,8 +65,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java index ab0685497b..65becb253c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Conversation.java @@ -127,8 +127,6 @@ public static Conversation fromJson( return objectMapper.readValue(json, Conversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -149,8 +147,6 @@ public static Conversation fromJson( return objectMapper.readValue(json, Conversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -161,8 +157,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java index 907f00b0a2..4310e13576 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java @@ -107,8 +107,6 @@ public static ConversationWithParticipants fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +130,6 @@ public static ConversationWithParticipants fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +140,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java index b3f14c0dbd..6695937ca6 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversation.java @@ -82,8 +82,6 @@ public static ParticipantConversation fromJson( return objectMapper.readValue(json, ParticipantConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +102,6 @@ public static ParticipantConversation fromJson( return objectMapper.readValue(json, ParticipantConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +112,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/Role.java b/src/main/java/com/twilio/rest/conversations/v1/service/Role.java index 6eb6ad87ce..7b1220fbb0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/Role.java @@ -116,8 +116,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +136,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -150,8 +146,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/User.java b/src/main/java/com/twilio/rest/conversations/v1/service/User.java index f50cea96ab..d620d44d77 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/User.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/User.java @@ -108,8 +108,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java index e50eac5a71..b9a0dc80c0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Notification.java @@ -60,8 +60,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java index 79f22d22a0..6c718ac5bf 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/Webhook.java @@ -82,8 +82,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +102,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +112,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java index 7ce2f4693d..96bf8c9be1 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Message.java @@ -147,8 +147,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +167,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -181,8 +177,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java index d96a98d1dd..461023104e 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Participant.java @@ -125,8 +125,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +145,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +155,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java index c5583ffa75..7685a59135 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java @@ -151,8 +151,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -173,8 +171,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -185,8 +181,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java index 59b50defef..3e1b5a1f2a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceipt.java @@ -104,8 +104,6 @@ public static DeliveryReceipt fromJson( return objectMapper.readValue(json, DeliveryReceipt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static DeliveryReceipt fromJson( return objectMapper.readValue(json, DeliveryReceipt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java index 4088576388..73d7e4256b 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversation.java @@ -140,8 +140,6 @@ public static UserConversation fromJson( return objectMapper.readValue(json, UserConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -162,8 +160,6 @@ public static UserConversation fromJson( return objectMapper.readValue(json, UserConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -174,8 +170,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java index aea88853e7..a3b293e7b0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversation.java @@ -122,8 +122,6 @@ public static UserConversation fromJson( return objectMapper.readValue(json, UserConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +142,6 @@ public static UserConversation fromJson( return objectMapper.readValue(json, UserConversation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -156,8 +152,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/EventType.java b/src/main/java/com/twilio/rest/events/v1/EventType.java index 5009e9ae69..ac0e6a102e 100644 --- a/src/main/java/com/twilio/rest/events/v1/EventType.java +++ b/src/main/java/com/twilio/rest/events/v1/EventType.java @@ -63,8 +63,6 @@ public static EventType fromJson( return objectMapper.readValue(json, EventType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static EventType fromJson( return objectMapper.readValue(json, EventType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/Schema.java b/src/main/java/com/twilio/rest/events/v1/Schema.java index f38e64449b..5d7941de0a 100644 --- a/src/main/java/com/twilio/rest/events/v1/Schema.java +++ b/src/main/java/com/twilio/rest/events/v1/Schema.java @@ -59,8 +59,6 @@ public static Schema fromJson( return objectMapper.readValue(json, Schema.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static Schema fromJson( return objectMapper.readValue(json, Schema.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/Sink.java b/src/main/java/com/twilio/rest/events/v1/Sink.java index 22ff82decc..5b24f865bf 100644 --- a/src/main/java/com/twilio/rest/events/v1/Sink.java +++ b/src/main/java/com/twilio/rest/events/v1/Sink.java @@ -127,8 +127,6 @@ public static Sink fromJson( return objectMapper.readValue(json, Sink.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -149,8 +147,6 @@ public static Sink fromJson( return objectMapper.readValue(json, Sink.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -161,8 +157,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/Subscription.java b/src/main/java/com/twilio/rest/events/v1/Subscription.java index 50c488335a..784050581b 100644 --- a/src/main/java/com/twilio/rest/events/v1/Subscription.java +++ b/src/main/java/com/twilio/rest/events/v1/Subscription.java @@ -80,8 +80,6 @@ public static Subscription fromJson( return objectMapper.readValue(json, Subscription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static Subscription fromJson( return objectMapper.readValue(json, Subscription.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java index 1b3bc8402f..7aab92b7e7 100644 --- a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java +++ b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersion.java @@ -65,8 +65,6 @@ public static SchemaVersion fromJson( return objectMapper.readValue(json, SchemaVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static SchemaVersion fromJson( return objectMapper.readValue(json, SchemaVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java b/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java index 62c0bcfb25..0491eaf0df 100644 --- a/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java +++ b/src/main/java/com/twilio/rest/events/v1/sink/SinkTest.java @@ -55,8 +55,6 @@ public static SinkTest fromJson( return objectMapper.readValue(json, SinkTest.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static SinkTest fromJson( return objectMapper.readValue(json, SinkTest.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java b/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java index d12eec40cc..d5f0ef242e 100644 --- a/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java +++ b/src/main/java/com/twilio/rest/events/v1/sink/SinkValidate.java @@ -58,8 +58,6 @@ public static SinkValidate fromJson( return objectMapper.readValue(json, SinkValidate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static SinkValidate fromJson( return objectMapper.readValue(json, SinkValidate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java index 174177eb7c..48e40c5ffd 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEvent.java @@ -86,8 +86,6 @@ public static SubscribedEvent fromJson( return objectMapper.readValue(json, SubscribedEvent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +106,6 @@ public static SubscribedEvent fromJson( return objectMapper.readValue(json, SubscribedEvent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +116,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java index 4d472c95a2..50946edef1 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java @@ -97,8 +97,6 @@ public static Assessments fromJson( return objectMapper.readValue(json, Assessments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +117,6 @@ public static Assessments fromJson( return objectMapper.readValue(json, Assessments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -131,8 +127,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Channel.java b/src/main/java/com/twilio/rest/flexapi/v1/Channel.java index bcff469831..4fae76c9d9 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Channel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Channel.java @@ -80,8 +80,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java b/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java index f601e24501..e5efb8997d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java @@ -85,8 +85,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Configuration fromJson( return objectMapper.readValue(json, Configuration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java index 29d1662dcc..12c840a85f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/CreateFlexInstance.java @@ -223,8 +223,6 @@ public static CreateFlexInstance fromJson( return objectMapper.readValue(json, CreateFlexInstance.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -245,8 +243,6 @@ public static CreateFlexInstance fromJson( return objectMapper.readValue(json, CreateFlexInstance.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -257,8 +253,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java b/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java index cc14bd7e45..a8e0b36207 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/FlexFlow.java @@ -124,8 +124,6 @@ public static FlexFlow fromJson( return objectMapper.readValue(json, FlexFlow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -146,8 +144,6 @@ public static FlexFlow fromJson( return objectMapper.readValue(json, FlexFlow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -158,8 +154,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java index a8f4222456..3df56dd990 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java @@ -78,8 +78,6 @@ public static InsightsAssessmentsComment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static InsightsAssessmentsComment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java index 794017d2b9..87c2c22bcb 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsConversations.java @@ -56,8 +56,6 @@ public static InsightsConversations fromJson( return objectMapper.readValue(json, InsightsConversations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static InsightsConversations fromJson( return objectMapper.readValue(json, InsightsConversations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java index 8fdc63d817..2499f8ac25 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnaires.java @@ -80,8 +80,6 @@ public static InsightsQuestionnaires fromJson( return objectMapper.readValue(json, InsightsQuestionnaires.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static InsightsQuestionnaires fromJson( return objectMapper.readValue(json, InsightsQuestionnaires.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java index bc5f6fb508..1ff27830b4 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategory.java @@ -78,8 +78,6 @@ public static InsightsQuestionnairesCategory fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static InsightsQuestionnairesCategory fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java index 0541056353..abfdec7309 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestion.java @@ -89,8 +89,6 @@ public static InsightsQuestionnairesQuestion fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +112,6 @@ public static InsightsQuestionnairesQuestion fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +122,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java index e565136de7..1eed299d0e 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSegments.java @@ -56,8 +56,6 @@ public static InsightsSegments fromJson( return objectMapper.readValue(json, InsightsSegments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static InsightsSegments fromJson( return objectMapper.readValue(json, InsightsSegments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java index 888c987eec..4663b6ad91 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSession.java @@ -56,8 +56,6 @@ public static InsightsSession fromJson( return objectMapper.readValue(json, InsightsSession.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static InsightsSession fromJson( return objectMapper.readValue(json, InsightsSession.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java index 78519017bd..ebbac9afda 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSets.java @@ -59,8 +59,6 @@ public static InsightsSettingsAnswerSets fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static InsightsSettingsAnswerSets fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java index 56a507eb7a..be29d939cc 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsComment.java @@ -56,8 +56,6 @@ public static InsightsSettingsComment fromJson( return objectMapper.readValue(json, InsightsSettingsComment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static InsightsSettingsComment fromJson( return objectMapper.readValue(json, InsightsSettingsComment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java index d7dc9e396f..0f03c8f534 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsUserRoles.java @@ -57,8 +57,6 @@ public static InsightsUserRoles fromJson( return objectMapper.readValue(json, InsightsUserRoles.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static InsightsUserRoles fromJson( return objectMapper.readValue(json, InsightsUserRoles.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java index bda6336ef8..6914a63523 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java @@ -65,8 +65,6 @@ public static Interaction fromJson( return objectMapper.readValue(json, Interaction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Interaction fromJson( return objectMapper.readValue(json, Interaction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java b/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java index 60fc755396..7796438c5a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Plugin.java @@ -71,8 +71,6 @@ public static Plugin fromJson( return objectMapper.readValue(json, Plugin.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +91,6 @@ public static Plugin fromJson( return objectMapper.readValue(json, Plugin.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -105,8 +101,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java index cca9ff09f9..194528120e 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginArchive.java @@ -58,8 +58,6 @@ public static PluginArchive fromJson( return objectMapper.readValue(json, PluginArchive.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static PluginArchive fromJson( return objectMapper.readValue(json, PluginArchive.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java index 9207c3ad2d..f2387e6ba5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfiguration.java @@ -67,8 +67,6 @@ public static PluginConfiguration fromJson( return objectMapper.readValue(json, PluginConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +87,6 @@ public static PluginConfiguration fromJson( return objectMapper.readValue(json, PluginConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +97,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java index aa94c0ae75..08a045b990 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchive.java @@ -63,8 +63,6 @@ public static PluginConfigurationArchive fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static PluginConfigurationArchive fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java index 7a1f7c46be..5c2d543e20 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginRelease.java @@ -66,8 +66,6 @@ public static PluginRelease fromJson( return objectMapper.readValue(json, PluginRelease.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static PluginRelease fromJson( return objectMapper.readValue(json, PluginRelease.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java index ef67b97239..0765b9c755 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchive.java @@ -61,8 +61,6 @@ public static PluginVersionArchive fromJson( return objectMapper.readValue(json, PluginVersionArchive.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static PluginVersionArchive fromJson( return objectMapper.readValue(json, PluginVersionArchive.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java index 0792a0c6f4..5835127a30 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java @@ -79,8 +79,6 @@ public static ProvisioningStatus fromJson( return objectMapper.readValue(json, ProvisioningStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +99,6 @@ public static ProvisioningStatus fromJson( return objectMapper.readValue(json, ProvisioningStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +109,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java b/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java index 1a570a9b68..6007b30c83 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/WebChannel.java @@ -104,8 +104,6 @@ public static WebChannel fromJson( return objectMapper.readValue(json, WebChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static WebChannel fromJson( return objectMapper.readValue(json, WebChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java index e637971652..e8399cb593 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannel.java @@ -150,8 +150,6 @@ public static InteractionChannel fromJson( return objectMapper.readValue(json, InteractionChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -172,8 +170,6 @@ public static InteractionChannel fromJson( return objectMapper.readValue(json, InteractionChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -184,8 +180,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java index afbd209fca..720f660154 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java @@ -74,8 +74,6 @@ public static InteractionChannelInvite fromJson( return objectMapper.readValue(json, InteractionChannelInvite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static InteractionChannelInvite fromJson( return objectMapper.readValue(json, InteractionChannelInvite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java index f09e174326..6412c452f5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java @@ -137,8 +137,6 @@ public static InteractionChannelParticipant fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -162,8 +160,6 @@ public static InteractionChannelParticipant fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -174,8 +170,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java index 2ad5137caa..5166643916 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransfer.java @@ -131,8 +131,6 @@ public static InteractionTransfer fromJson( return objectMapper.readValue(json, InteractionTransfer.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -153,8 +151,6 @@ public static InteractionTransfer fromJson( return objectMapper.readValue(json, InteractionTransfer.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -165,8 +161,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java index 076b0ec18a..e3bbb71497 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersions.java @@ -73,8 +73,6 @@ public static PluginVersions fromJson( return objectMapper.readValue(json, PluginVersions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +93,6 @@ public static PluginVersions fromJson( return objectMapper.readValue(json, PluginVersions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +103,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java index e9012cb7e9..e852cff78d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPlugin.java @@ -67,8 +67,6 @@ public static ConfiguredPlugin fromJson( return objectMapper.readValue(json, ConfiguredPlugin.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +87,6 @@ public static ConfiguredPlugin fromJson( return objectMapper.readValue(json, ConfiguredPlugin.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +97,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java b/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java index 22cd8cdae3..916ca239cf 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/FlexUser.java @@ -69,8 +69,6 @@ public static FlexUser fromJson( return objectMapper.readValue(json, FlexUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +89,6 @@ public static FlexUser fromJson( return objectMapper.readValue(json, FlexUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +99,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java b/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java index 7d22f7d70e..90fbf6445d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/WebChannels.java @@ -55,8 +55,6 @@ public static WebChannels fromJson( return objectMapper.readValue(json, WebChannels.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static WebChannels fromJson( return objectMapper.readValue(json, WebChannels.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/frontlineapi/v1/User.java b/src/main/java/com/twilio/rest/frontlineapi/v1/User.java index a998edeaab..72a32861f1 100644 --- a/src/main/java/com/twilio/rest/frontlineapi/v1/User.java +++ b/src/main/java/com/twilio/rest/frontlineapi/v1/User.java @@ -81,8 +81,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/iam/v1/ApiKey.java b/src/main/java/com/twilio/rest/iam/v1/ApiKey.java index 3deecfef72..f675780308 100644 --- a/src/main/java/com/twilio/rest/iam/v1/ApiKey.java +++ b/src/main/java/com/twilio/rest/iam/v1/ApiKey.java @@ -65,8 +65,6 @@ public static ApiKey fromJson( return objectMapper.readValue(json, ApiKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static ApiKey fromJson( return objectMapper.readValue(json, ApiKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java index 8a37ccd5a4..efaf1ba741 100644 --- a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java +++ b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java @@ -58,8 +58,6 @@ public static GetApiKeys fromJson( return objectMapper.readValue(json, GetApiKeys.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static GetApiKeys fromJson( return objectMapper.readValue(json, GetApiKeys.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java b/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java index 1da7897985..175f8a66f9 100644 --- a/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java +++ b/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java @@ -77,8 +77,6 @@ public static NewApiKey fromJson( return objectMapper.readValue(json, NewApiKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +97,6 @@ public static NewApiKey fromJson( return objectMapper.readValue(json, NewApiKey.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -111,8 +107,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java b/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java index 83f6e3a469..d011fb8dcc 100644 --- a/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java +++ b/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java @@ -587,8 +587,6 @@ public static OAuthApp fromJson( return objectMapper.readValue(json, OAuthApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -609,8 +607,6 @@ public static OAuthApp fromJson( return objectMapper.readValue(json, OAuthApp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -621,8 +617,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/iam/v1/Token.java b/src/main/java/com/twilio/rest/iam/v1/Token.java index 45ec593c1a..15979f717b 100644 --- a/src/main/java/com/twilio/rest/iam/v1/Token.java +++ b/src/main/java/com/twilio/rest/iam/v1/Token.java @@ -58,8 +58,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/Call.java b/src/main/java/com/twilio/rest/insights/v1/Call.java index dcf8a5e90b..b9912443da 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Call.java +++ b/src/main/java/com/twilio/rest/insights/v1/Call.java @@ -57,8 +57,6 @@ public static Call fromJson( return objectMapper.readValue(json, Call.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Call fromJson( return objectMapper.readValue(json, Call.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java b/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java index 2b63234930..cc1d8f9ec5 100644 --- a/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java +++ b/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java @@ -199,8 +199,6 @@ public static CallSummaries fromJson( return objectMapper.readValue(json, CallSummaries.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -221,8 +219,6 @@ public static CallSummaries fromJson( return objectMapper.readValue(json, CallSummaries.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -233,8 +229,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/Conference.java b/src/main/java/com/twilio/rest/insights/v1/Conference.java index 7fe6e71b0e..16b1673f6f 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Conference.java +++ b/src/main/java/com/twilio/rest/insights/v1/Conference.java @@ -222,8 +222,6 @@ public static Conference fromJson( return objectMapper.readValue(json, Conference.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -244,8 +242,6 @@ public static Conference fromJson( return objectMapper.readValue(json, Conference.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -256,8 +252,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/Room.java b/src/main/java/com/twilio/rest/insights/v1/Room.java index a1d2e320b5..9e5dd26e4a 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Room.java +++ b/src/main/java/com/twilio/rest/insights/v1/Room.java @@ -270,8 +270,6 @@ public static Room fromJson( return objectMapper.readValue(json, Room.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -292,8 +290,6 @@ public static Room fromJson( return objectMapper.readValue(json, Room.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -304,8 +300,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/Setting.java b/src/main/java/com/twilio/rest/insights/v1/Setting.java index 238bd5fc03..50d96ffa4c 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Setting.java +++ b/src/main/java/com/twilio/rest/insights/v1/Setting.java @@ -60,8 +60,6 @@ public static Setting fromJson( return objectMapper.readValue(json, Setting.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static Setting fromJson( return objectMapper.readValue(json, Setting.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java b/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java index 74117a213c..84552304f6 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Annotation.java @@ -107,8 +107,6 @@ public static Annotation fromJson( return objectMapper.readValue(json, Annotation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +127,6 @@ public static Annotation fromJson( return objectMapper.readValue(json, Annotation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -141,8 +137,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java b/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java index 5eaefacfaa..07b5edb67c 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/CallSummary.java @@ -154,8 +154,6 @@ public static CallSummary fromJson( return objectMapper.readValue(json, CallSummary.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -176,8 +174,6 @@ public static CallSummary fromJson( return objectMapper.readValue(json, CallSummary.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -188,8 +184,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Event.java b/src/main/java/com/twilio/rest/insights/v1/call/Event.java index c35be13a70..2c068e0aad 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Event.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Event.java @@ -102,8 +102,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/call/Metric.java b/src/main/java/com/twilio/rest/insights/v1/call/Metric.java index 4137bd0f58..65c2762600 100644 --- a/src/main/java/com/twilio/rest/insights/v1/call/Metric.java +++ b/src/main/java/com/twilio/rest/insights/v1/call/Metric.java @@ -101,8 +101,6 @@ public static Metric fromJson( return objectMapper.readValue(json, Metric.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -123,8 +121,6 @@ public static Metric fromJson( return objectMapper.readValue(json, Metric.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +131,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java index 0db4d52f4f..e907a346e9 100644 --- a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java +++ b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipant.java @@ -208,8 +208,6 @@ public static ConferenceParticipant fromJson( return objectMapper.readValue(json, ConferenceParticipant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -230,8 +228,6 @@ public static ConferenceParticipant fromJson( return objectMapper.readValue(json, ConferenceParticipant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -242,8 +238,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java index 67e7937715..5014b25a0f 100644 --- a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java +++ b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java @@ -188,8 +188,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -210,8 +208,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -222,8 +218,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java index 8feb39f1e7..89eb13a8cf 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java @@ -107,8 +107,6 @@ public static CustomOperator fromJson( return objectMapper.readValue(json, CustomOperator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +127,6 @@ public static CustomOperator fromJson( return objectMapper.readValue(json, CustomOperator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -141,8 +137,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Operator.java b/src/main/java/com/twilio/rest/intelligence/v2/Operator.java index aa2637f180..2b34d31bf1 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Operator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Operator.java @@ -87,8 +87,6 @@ public static Operator fromJson( return objectMapper.readValue(json, Operator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static Operator fromJson( return objectMapper.readValue(json, Operator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java index c2d36b5e7a..81acf3166f 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachment.java @@ -66,8 +66,6 @@ public static OperatorAttachment fromJson( return objectMapper.readValue(json, OperatorAttachment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static OperatorAttachment fromJson( return objectMapper.readValue(json, OperatorAttachment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java index f2ab63c4ec..2338c3bef5 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachments.java @@ -59,8 +59,6 @@ public static OperatorAttachments fromJson( return objectMapper.readValue(json, OperatorAttachments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static OperatorAttachments fromJson( return objectMapper.readValue(json, OperatorAttachments.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java index d71560bd71..599fd8e1fe 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java @@ -131,8 +131,6 @@ public static OperatorType fromJson( return objectMapper.readValue(json, OperatorType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -153,8 +151,6 @@ public static OperatorType fromJson( return objectMapper.readValue(json, OperatorType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -165,8 +161,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java b/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java index 1fb4732e8a..5a6b9f4d16 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/PrebuiltOperator.java @@ -86,8 +86,6 @@ public static PrebuiltOperator fromJson( return objectMapper.readValue(json, PrebuiltOperator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +106,6 @@ public static PrebuiltOperator fromJson( return objectMapper.readValue(json, PrebuiltOperator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +116,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Service.java b/src/main/java/com/twilio/rest/intelligence/v2/Service.java index 4bab675365..4609dc69de 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Service.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Service.java @@ -98,8 +98,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java index 0bc5776f72..f2be67ead8 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java @@ -100,8 +100,6 @@ public static Transcript fromJson( return objectMapper.readValue(json, Transcript.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static Transcript fromJson( return objectMapper.readValue(json, Transcript.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java index fcbac8e18f..28ca021d37 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResults.java @@ -59,8 +59,6 @@ public static EncryptedOperatorResults fromJson( return objectMapper.readValue(json, EncryptedOperatorResults.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static EncryptedOperatorResults fromJson( return objectMapper.readValue(json, EncryptedOperatorResults.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java index 88d8cc8fb7..93d93ba29f 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentences.java @@ -58,8 +58,6 @@ public static EncryptedSentences fromJson( return objectMapper.readValue(json, EncryptedSentences.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static EncryptedSentences fromJson( return objectMapper.readValue(json, EncryptedSentences.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java index 8abe942c20..9cd1b8bb90 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Media.java @@ -56,8 +56,6 @@ public static Media fromJson( return objectMapper.readValue(json, Media.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Media fromJson( return objectMapper.readValue(json, Media.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java index a2959dbac0..8ad293cfe4 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java @@ -91,8 +91,6 @@ public static OperatorResult fromJson( return objectMapper.readValue(json, OperatorResult.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +111,6 @@ public static OperatorResult fromJson( return objectMapper.readValue(json, OperatorResult.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +121,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java index 00f757e86c..5c013703ad 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/Sentence.java @@ -56,8 +56,6 @@ public static Sentence fromJson( return objectMapper.readValue(json, Sentence.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Sentence fromJson( return objectMapper.readValue(json, Sentence.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java b/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java index 37f63bc6d1..95a81fd77f 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java b/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java index 354806bbf9..dc2074dc08 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/Service.java @@ -76,8 +76,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java index f3144c0e9c..fc4e1321c3 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Channel.java @@ -105,8 +105,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +125,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -139,8 +135,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java index 5adab76005..063528ae90 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java @@ -111,8 +111,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +131,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -145,8 +141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java index b9b2274287..e8a52e6777 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/User.java @@ -87,8 +87,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java index 094c7962a2..4bbeb4af0d 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Invite.java @@ -85,8 +85,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java index fbb048098e..c80c2a8dcb 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Member.java @@ -93,8 +93,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +113,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +123,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java index 0891ef5ccd..7da996334a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/Message.java @@ -114,8 +114,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +134,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +144,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java index 3e697a3843..0cf319e8ac 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannel.java @@ -81,8 +81,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java b/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java index 226d91b214..f2da4e8307 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java b/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java index 1076cbba7c..d48e5be649 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/Service.java @@ -76,8 +76,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java index db7a918454..8e6211f987 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Binding.java @@ -96,8 +96,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java index 818cbdf2c0..b4334dc75a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Channel.java @@ -125,8 +125,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +145,6 @@ public static Channel fromJson( return objectMapper.readValue(json, Channel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +155,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java index 24c42b24e3..af9d2d35f8 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/Role.java @@ -111,8 +111,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +131,6 @@ public static Role fromJson( return objectMapper.readValue(json, Role.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -145,8 +141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java index 738ab04b64..a41d6d6aba 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/User.java @@ -108,8 +108,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java index de1c50494d..a5791b3936 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Invite.java @@ -85,8 +85,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static Invite fromJson( return objectMapper.readValue(json, Invite.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java index 700d76176e..59f8ad4aad 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Member.java @@ -114,8 +114,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +134,6 @@ public static Member fromJson( return objectMapper.readValue(json, Member.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +144,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java index 1cb3768833..6af3a55109 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Message.java @@ -133,8 +133,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -155,8 +153,6 @@ public static Message fromJson( return objectMapper.readValue(json, Message.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -167,8 +163,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java index c9258d0aef..d9c1926405 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/Webhook.java @@ -135,8 +135,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -157,8 +155,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +165,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java index 43fcbb0e8d..2ccbd51626 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBinding.java @@ -100,8 +100,6 @@ public static UserBinding fromJson( return objectMapper.readValue(json, UserBinding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static UserBinding fromJson( return objectMapper.readValue(json, UserBinding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java index b9df86e60b..654ae09e1f 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannel.java @@ -138,8 +138,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +158,6 @@ public static UserChannel fromJson( return objectMapper.readValue(json, UserChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -172,8 +168,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java index a7ce65e9a4..bf8f32e1a6 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java @@ -552,8 +552,6 @@ public static Knowledge fromJson( return objectMapper.readValue(json, Knowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -574,8 +572,6 @@ public static Knowledge fromJson( return objectMapper.readValue(json, Knowledge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -586,8 +582,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java index 6033914bba..16fb155b27 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java @@ -57,8 +57,6 @@ public static Chunk fromJson( return objectMapper.readValue(json, Chunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static Chunk fromJson( return objectMapper.readValue(json, Chunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java index fb5b7e602a..2dcd2c2ddc 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java @@ -57,8 +57,6 @@ public static KnowledgeStatus fromJson( return objectMapper.readValue(json, KnowledgeStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static KnowledgeStatus fromJson( return objectMapper.readValue(json, KnowledgeStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java index f1e44ca0ff..d2a4d2ac4c 100644 --- a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumber.java @@ -56,8 +56,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java index b24f70ad09..0a5e53b79b 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java @@ -158,8 +158,6 @@ public static Bucket fromJson( return objectMapper.readValue(json, Bucket.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -180,8 +178,6 @@ public static Bucket fromJson( return objectMapper.readValue(json, Bucket.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -192,8 +188,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java index 3e343a8152..fa4655c4cc 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java @@ -257,8 +257,6 @@ public static LookupOverride fromJson( return objectMapper.readValue(json, LookupOverride.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -279,8 +277,6 @@ public static LookupOverride fromJson( return objectMapper.readValue(json, LookupOverride.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -291,8 +287,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java index a7e8552e8a..5e8f607326 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java @@ -1316,8 +1316,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1338,8 +1336,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1350,8 +1346,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/Query.java b/src/main/java/com/twilio/rest/lookups/v2/Query.java index e7221c157f..ef2992ab77 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Query.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Query.java @@ -2275,8 +2275,6 @@ public static Query fromJson( return objectMapper.readValue(json, Query.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -2297,8 +2295,6 @@ public static Query fromJson( return objectMapper.readValue(json, Query.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -2309,8 +2305,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java index 98c7920294..ec90bc7a7d 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java +++ b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java @@ -193,8 +193,6 @@ public static RateLimit fromJson( return objectMapper.readValue(json, RateLimit.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -215,8 +213,6 @@ public static RateLimit fromJson( return objectMapper.readValue(json, RateLimit.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -227,8 +223,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java b/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java index 48bdfb4f91..0765c87379 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/AvailableAddOn.java @@ -61,8 +61,6 @@ public static AvailableAddOn fromJson( return objectMapper.readValue(json, AvailableAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static AvailableAddOn fromJson( return objectMapper.readValue(json, AvailableAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java b/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java index 7c7b7587da..ea0d609c43 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/InstalledAddOn.java @@ -81,8 +81,6 @@ public static InstalledAddOn fromJson( return objectMapper.readValue(json, InstalledAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static InstalledAddOn fromJson( return objectMapper.readValue(json, InstalledAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java b/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java index b9d4e60d4e..196b0bc1bb 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ModuleData.java @@ -61,8 +61,6 @@ public static ModuleData fromJson( return objectMapper.readValue(json, ModuleData.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static ModuleData fromJson( return objectMapper.readValue(json, ModuleData.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java b/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java index 9389a89954..2ba5c142a5 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ModuleDataManagement.java @@ -60,8 +60,6 @@ public static ModuleDataManagement fromJson( return objectMapper.readValue(json, ModuleDataManagement.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static ModuleDataManagement fromJson( return objectMapper.readValue(json, ModuleDataManagement.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java index db2adceaec..978b04e6c5 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java @@ -130,8 +130,6 @@ public static ReferralConversion fromJson( return objectMapper.readValue(json, ReferralConversion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -152,8 +150,6 @@ public static ReferralConversion fromJson( return objectMapper.readValue(json, ReferralConversion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -164,8 +160,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java index 73f9b494cf..8295e3c5ef 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtension.java @@ -68,8 +68,6 @@ public static AvailableAddOnExtension fromJson( return objectMapper.readValue(json, AvailableAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +88,6 @@ public static AvailableAddOnExtension fromJson( return objectMapper.readValue(json, AvailableAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +98,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java index 14ab6780ce..81ce936cd2 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtension.java @@ -80,8 +80,6 @@ public static InstalledAddOnExtension fromJson( return objectMapper.readValue(json, InstalledAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static InstalledAddOnExtension fromJson( return objectMapper.readValue(json, InstalledAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java index 78debb7c36..018e895438 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnUsage.java @@ -274,8 +274,6 @@ public static InstalledAddOnUsage fromJson( return objectMapper.readValue(json, InstalledAddOnUsage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -296,8 +294,6 @@ public static InstalledAddOnUsage fromJson( return objectMapper.readValue(json, InstalledAddOnUsage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -308,8 +304,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java b/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java index 810d15f18b..4379372726 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java +++ b/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java @@ -177,8 +177,6 @@ public static BrandRegistration fromJson( return objectMapper.readValue(json, BrandRegistration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -199,8 +197,6 @@ public static BrandRegistration fromJson( return objectMapper.readValue(json, BrandRegistration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -211,8 +207,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java b/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java index 432723d79f..b73f3dedba 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java @@ -56,8 +56,6 @@ public static Deactivations fromJson( return objectMapper.readValue(json, Deactivations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Deactivations fromJson( return objectMapper.readValue(json, Deactivations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java b/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java index 24f5ad4320..a71d9edacb 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainCerts.java @@ -69,8 +69,6 @@ public static DomainCerts fromJson( return objectMapper.readValue(json, DomainCerts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +89,6 @@ public static DomainCerts fromJson( return objectMapper.readValue(json, DomainCerts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +99,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java index 671621ff0c..e4abbccca5 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfig.java @@ -62,8 +62,6 @@ public static DomainConfig fromJson( return objectMapper.readValue(json, DomainConfig.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static DomainConfig fromJson( return objectMapper.readValue(json, DomainConfig.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java index 2485b411ed..f2fb68a95e 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingService.java @@ -63,8 +63,6 @@ public static DomainConfigMessagingService fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static DomainConfigMessagingService fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java index 7b6805cdc8..ed83954184 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDn.java @@ -56,8 +56,6 @@ public static DomainValidateDn fromJson( return objectMapper.readValue(json, DomainValidateDn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static DomainValidateDn fromJson( return objectMapper.readValue(json, DomainValidateDn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java b/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java index 9d1bdb066b..36d044b0bb 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java +++ b/src/main/java/com/twilio/rest/messaging/v1/ExternalCampaign.java @@ -60,8 +60,6 @@ public static ExternalCampaign fromJson( return objectMapper.readValue(json, ExternalCampaign.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static ExternalCampaign fromJson( return objectMapper.readValue(json, ExternalCampaign.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java index ed40ab36f1..f6239188b6 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingService.java @@ -75,8 +75,6 @@ public static LinkshorteningMessagingService fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +98,6 @@ public static LinkshorteningMessagingService fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +108,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java index 263466bed5..726131eca2 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociation.java @@ -63,8 +63,6 @@ public static LinkshorteningMessagingServiceDomainAssociation fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static LinkshorteningMessagingServiceDomainAssociation fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java index 4912c3c960..396a4e7a26 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java +++ b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCert.java @@ -60,8 +60,6 @@ public static RequestManagedCert fromJson( return objectMapper.readValue(json, RequestManagedCert.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static RequestManagedCert fromJson( return objectMapper.readValue(json, RequestManagedCert.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/Service.java b/src/main/java/com/twilio/rest/messaging/v1/Service.java index 042fefe368..edacc10334 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Service.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Service.java @@ -98,8 +98,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java index 3249327729..fd5d8da0ea 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java +++ b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java @@ -187,8 +187,6 @@ public static TollfreeVerification fromJson( return objectMapper.readValue(json, TollfreeVerification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -209,8 +207,6 @@ public static TollfreeVerification fromJson( return objectMapper.readValue(json, TollfreeVerification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -221,8 +217,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/Usecase.java b/src/main/java/com/twilio/rest/messaging/v1/Usecase.java index 0ca6348732..5179c42ca7 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Usecase.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Usecase.java @@ -56,8 +56,6 @@ public static Usecase fromJson( return objectMapper.readValue(json, Usecase.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Usecase fromJson( return objectMapper.readValue(json, Usecase.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java index 42c86b927f..0f8cdfbf25 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtp.java @@ -57,8 +57,6 @@ public static BrandRegistrationOtp fromJson( return objectMapper.readValue(json, BrandRegistrationOtp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static BrandRegistrationOtp fromJson( return objectMapper.readValue(json, BrandRegistrationOtp.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java index fa0e2cf419..ceee347dee 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVetting.java @@ -93,8 +93,6 @@ public static BrandVetting fromJson( return objectMapper.readValue(json, BrandVetting.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +113,6 @@ public static BrandVetting fromJson( return objectMapper.readValue(json, BrandVetting.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +123,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java index e8ec94a520..67fc3515e6 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSender.java @@ -80,8 +80,6 @@ public static AlphaSender fromJson( return objectMapper.readValue(json, AlphaSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static AlphaSender fromJson( return objectMapper.readValue(json, AlphaSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java index eed88f2408..86d943a64f 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSender.java @@ -81,8 +81,6 @@ public static ChannelSender fromJson( return objectMapper.readValue(json, ChannelSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static ChannelSender fromJson( return objectMapper.readValue(json, ChannelSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java index e9af491e24..43c224fe1f 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSender.java @@ -82,8 +82,6 @@ public static DestinationAlphaSender fromJson( return objectMapper.readValue(json, DestinationAlphaSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +102,6 @@ public static DestinationAlphaSender fromJson( return objectMapper.readValue(json, DestinationAlphaSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +112,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java index 818ba14c82..0bf7aaf0af 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumber.java @@ -80,8 +80,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java index 0af1511faf..5f2d3e7dec 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCode.java @@ -80,8 +80,6 @@ public static ShortCode fromJson( return objectMapper.readValue(json, ShortCode.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static ShortCode fromJson( return objectMapper.readValue(json, ShortCode.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java index ff13242190..b2804b3df3 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPerson.java @@ -121,8 +121,6 @@ public static UsAppToPerson fromJson( return objectMapper.readValue(json, UsAppToPerson.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -143,8 +141,6 @@ public static UsAppToPerson fromJson( return objectMapper.readValue(json, UsAppToPerson.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -155,8 +151,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java index 0bb1e0a478..dbf17de822 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecase.java @@ -58,8 +58,6 @@ public static UsAppToPersonUsecase fromJson( return objectMapper.readValue(json, UsAppToPersonUsecase.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static UsAppToPersonUsecase fromJson( return objectMapper.readValue(json, UsAppToPersonUsecase.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java index 8cc91d29ad..bdbe4e33d6 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java @@ -2111,8 +2111,6 @@ public static ChannelsSender fromJson( return objectMapper.readValue(json, ChannelsSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -2133,8 +2131,6 @@ public static ChannelsSender fromJson( return objectMapper.readValue(json, ChannelsSender.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -2145,8 +2141,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java b/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java index 5ce04a1fdd..26f7c9b876 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java +++ b/src/main/java/com/twilio/rest/messaging/v2/DomainCerts.java @@ -58,8 +58,6 @@ public static DomainCerts fromJson( return objectMapper.readValue(json, DomainCerts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static DomainCerts fromJson( return objectMapper.readValue(json, DomainCerts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java b/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java index 3d9dc9fa71..b49e5f4358 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java +++ b/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java @@ -78,8 +78,6 @@ public static TypingIndicator fromJson( return objectMapper.readValue(json, TypingIndicator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +98,6 @@ public static TypingIndicator fromJson( return objectMapper.readValue(json, TypingIndicator.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +108,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/monitor/v1/Alert.java b/src/main/java/com/twilio/rest/monitor/v1/Alert.java index 7996926501..51078f1310 100644 --- a/src/main/java/com/twilio/rest/monitor/v1/Alert.java +++ b/src/main/java/com/twilio/rest/monitor/v1/Alert.java @@ -63,8 +63,6 @@ public static Alert fromJson( return objectMapper.readValue(json, Alert.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Alert fromJson( return objectMapper.readValue(json, Alert.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/monitor/v1/Event.java b/src/main/java/com/twilio/rest/monitor/v1/Event.java index 1385b89500..d946fc7127 100644 --- a/src/main/java/com/twilio/rest/monitor/v1/Event.java +++ b/src/main/java/com/twilio/rest/monitor/v1/Event.java @@ -63,8 +63,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/notify/v1/Credential.java b/src/main/java/com/twilio/rest/notify/v1/Credential.java index cdabc05ef2..2a81fc0b93 100644 --- a/src/main/java/com/twilio/rest/notify/v1/Credential.java +++ b/src/main/java/com/twilio/rest/notify/v1/Credential.java @@ -96,8 +96,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Credential fromJson( return objectMapper.readValue(json, Credential.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/notify/v1/Service.java b/src/main/java/com/twilio/rest/notify/v1/Service.java index e3268d23f1..6a73a3bb45 100644 --- a/src/main/java/com/twilio/rest/notify/v1/Service.java +++ b/src/main/java/com/twilio/rest/notify/v1/Service.java @@ -75,8 +75,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/notify/v1/service/Binding.java b/src/main/java/com/twilio/rest/notify/v1/service/Binding.java index 6183bdf7ee..d6810cf823 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/Binding.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/Binding.java @@ -113,8 +113,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +133,6 @@ public static Binding fromJson( return objectMapper.readValue(json, Binding.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +143,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/notify/v1/service/Notification.java b/src/main/java/com/twilio/rest/notify/v1/service/Notification.java index 605de06846..f36077d893 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/Notification.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/Notification.java @@ -79,8 +79,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +99,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +109,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java index 1fc633f434..1d0697415e 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java +++ b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibility.java @@ -63,8 +63,6 @@ public static BulkEligibility fromJson( return objectMapper.readValue(json, BulkEligibility.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static BulkEligibility fromJson( return objectMapper.readValue(json, BulkEligibility.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java b/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java index 12bfce73fb..78f215c14e 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java @@ -56,8 +56,6 @@ public static Eligibility fromJson( return objectMapper.readValue(json, Eligibility.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Eligibility fromJson( return objectMapper.readValue(json, Eligibility.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java b/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java index 84d29f776f..4b340a581d 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingAllPortIn.java @@ -55,8 +55,6 @@ public static PortingAllPortIn fromJson( return objectMapper.readValue(json, PortingAllPortIn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static PortingAllPortIn fromJson( return objectMapper.readValue(json, PortingAllPortIn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java index 682b785c12..4de025adb4 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java @@ -1212,8 +1212,6 @@ public static PortingPortIn fromJson( return objectMapper.readValue(json, PortingPortIn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1234,8 +1232,6 @@ public static PortingPortIn fromJson( return objectMapper.readValue(json, PortingPortIn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -1246,8 +1242,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java index a816a88333..5b3d8d751d 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumber.java @@ -74,8 +74,6 @@ public static PortingPortInPhoneNumber fromJson( return objectMapper.readValue(json, PortingPortInPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static PortingPortInPhoneNumber fromJson( return objectMapper.readValue(json, PortingPortInPhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java index d318db41bf..2edb755905 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortability.java @@ -81,8 +81,6 @@ public static PortingPortability fromJson( return objectMapper.readValue(json, PortingPortability.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static PortingPortability fromJson( return objectMapper.readValue(json, PortingPortability.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java index 743ec7c780..5579aedc80 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfiguration.java @@ -60,8 +60,6 @@ public static PortingWebhookConfiguration fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static PortingWebhookConfiguration fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java index 6358e015af..ffd437b4f8 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDelete.java @@ -78,8 +78,6 @@ public static PortingWebhookConfigurationDelete fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static PortingWebhookConfigurationDelete fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java index 6088eb3037..83a43bd966 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfiguration.java @@ -63,8 +63,6 @@ public static SigningRequestConfiguration fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static SigningRequestConfiguration fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/Webhook.java b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java index e241194597..ca2b8ea673 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/Webhook.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java @@ -59,8 +59,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/Application.java b/src/main/java/com/twilio/rest/numbers/v2/Application.java index d78af5bb49..1eec40d010 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/Application.java +++ b/src/main/java/com/twilio/rest/numbers/v2/Application.java @@ -374,8 +374,6 @@ public static Application fromJson( return objectMapper.readValue(json, Application.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -396,8 +394,6 @@ public static Application fromJson( return objectMapper.readValue(json, Application.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -408,8 +404,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java index 52096a914d..04f0bb3093 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocument.java @@ -106,8 +106,6 @@ public static AuthorizationDocument fromJson( return objectMapper.readValue(json, AuthorizationDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +126,6 @@ public static AuthorizationDocument fromJson( return objectMapper.readValue(json, AuthorizationDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -140,8 +136,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java index ff7d9bb466..666ebcf29c 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrder.java @@ -87,8 +87,6 @@ public static BulkHostedNumberOrder fromJson( return objectMapper.readValue(json, BulkHostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static BulkHostedNumberOrder fromJson( return objectMapper.readValue(json, BulkHostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java b/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java index 86ab3bf80f..a99b59235f 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BundleClone.java @@ -86,8 +86,6 @@ public static BundleClone fromJson( return objectMapper.readValue(json, BundleClone.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +106,6 @@ public static BundleClone fromJson( return objectMapper.readValue(json, BundleClone.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +116,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java index 69be02ecbb..ab5f4f6761 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java @@ -137,8 +137,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -159,8 +157,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -171,8 +167,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java index d102154087..6ae61d6b29 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrder.java @@ -90,8 +90,6 @@ public static DependentHostedNumberOrder fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +113,6 @@ public static DependentHostedNumberOrder fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +123,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java index 5344ff313d..c0bca04cee 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Bundle.java @@ -163,8 +163,6 @@ public static Bundle fromJson( return objectMapper.readValue(json, Bundle.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -185,8 +183,6 @@ public static Bundle fromJson( return objectMapper.readValue(json, Bundle.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -197,8 +193,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java index 8eeb2fd3b9..3aabfbecd9 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUser.java @@ -98,8 +98,6 @@ public static EndUser fromJson( return objectMapper.readValue(json, EndUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static EndUser fromJson( return objectMapper.readValue(json, EndUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java index 0f0ec879cf..e2c4f43b62 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserType.java @@ -61,8 +61,6 @@ public static EndUserType fromJson( return objectMapper.readValue(json, EndUserType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static EndUserType fromJson( return objectMapper.readValue(json, EndUserType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java index 058670c31b..2a9700ff28 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/Regulation.java @@ -81,8 +81,6 @@ public static Regulation fromJson( return objectMapper.readValue(json, Regulation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static Regulation fromJson( return objectMapper.readValue(json, Regulation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java index 9641ea058e..87f7da2856 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocument.java @@ -103,8 +103,6 @@ public static SupportingDocument fromJson( return objectMapper.readValue(json, SupportingDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +123,6 @@ public static SupportingDocument fromJson( return objectMapper.readValue(json, SupportingDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -137,8 +133,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java index 893f63c06f..b3c5825d64 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentType.java @@ -61,8 +61,6 @@ public static SupportingDocumentType fromJson( return objectMapper.readValue(json, SupportingDocumentType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static SupportingDocumentType fromJson( return objectMapper.readValue(json, SupportingDocumentType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java index b4232a59e0..3df0b88d73 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopy.java @@ -87,8 +87,6 @@ public static BundleCopy fromJson( return objectMapper.readValue(json, BundleCopy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static BundleCopy fromJson( return objectMapper.readValue(json, BundleCopy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java index 03216f7415..c8446c024b 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/Evaluation.java @@ -91,8 +91,6 @@ public static Evaluation fromJson( return objectMapper.readValue(json, Evaluation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +111,6 @@ public static Evaluation fromJson( return objectMapper.readValue(json, Evaluation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +121,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java index 83e62f5878..884183db9c 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignment.java @@ -79,8 +79,6 @@ public static ItemAssignment fromJson( return objectMapper.readValue(json, ItemAssignment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +99,6 @@ public static ItemAssignment fromJson( return objectMapper.readValue(json, ItemAssignment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +109,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java index a3f2f82e60..51a928989e 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItems.java @@ -86,8 +86,6 @@ public static ReplaceItems fromJson( return objectMapper.readValue(json, ReplaceItems.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +106,6 @@ public static ReplaceItems fromJson( return objectMapper.readValue(json, ReplaceItems.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +116,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java index 07c7f072a6..58bd8b8652 100644 --- a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java @@ -140,8 +140,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -162,8 +160,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -174,8 +170,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/oauth/v1/Authorize.java b/src/main/java/com/twilio/rest/oauth/v1/Authorize.java index b5259aef6e..79edbf5d8b 100644 --- a/src/main/java/com/twilio/rest/oauth/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v1/Authorize.java @@ -56,8 +56,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/oauth/v1/Token.java b/src/main/java/com/twilio/rest/oauth/v1/Token.java index bb2bc211ed..85a95b7afd 100644 --- a/src/main/java/com/twilio/rest/oauth/v1/Token.java +++ b/src/main/java/com/twilio/rest/oauth/v1/Token.java @@ -58,8 +58,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/oauth/v2/Authorize.java b/src/main/java/com/twilio/rest/oauth/v2/Authorize.java index ac43a5b64d..4ab8c1e6e8 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v2/Authorize.java @@ -56,8 +56,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/oauth/v2/Token.java b/src/main/java/com/twilio/rest/oauth/v2/Token.java index 7c95b23eb9..a78f38181c 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/Token.java +++ b/src/main/java/com/twilio/rest/oauth/v2/Token.java @@ -55,8 +55,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java index 58795669fa..1fdeee999e 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocument.java @@ -108,8 +108,6 @@ public static AuthorizationDocument fromJson( return objectMapper.readValue(json, AuthorizationDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static AuthorizationDocument fromJson( return objectMapper.readValue(json, AuthorizationDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java index ef1fc8c32b..960d5f51aa 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java @@ -128,8 +128,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -150,8 +148,6 @@ public static HostedNumberOrder fromJson( return objectMapper.readValue(json, HostedNumberOrder.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -162,8 +158,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java index d005fa059c..ec17cefa80 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrder.java @@ -113,8 +113,6 @@ public static DependentHostedNumberOrder fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +136,6 @@ public static DependentHostedNumberOrder fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -150,8 +146,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java b/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java index 4bc8334260..1445526c8d 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/AvailableAddOn.java @@ -61,8 +61,6 @@ public static AvailableAddOn fromJson( return objectMapper.readValue(json, AvailableAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static AvailableAddOn fromJson( return objectMapper.readValue(json, AvailableAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java index 29f1bb0d29..2d0da02c2c 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOn.java @@ -81,8 +81,6 @@ public static InstalledAddOn fromJson( return objectMapper.readValue(json, InstalledAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static InstalledAddOn fromJson( return objectMapper.readValue(json, InstalledAddOn.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java index ed0b96dff7..85a14700f8 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtension.java @@ -68,8 +68,6 @@ public static AvailableAddOnExtension fromJson( return objectMapper.readValue(json, AvailableAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +88,6 @@ public static AvailableAddOnExtension fromJson( return objectMapper.readValue(json, AvailableAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +98,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java index 67e5b03e41..b7cf7d0e30 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtension.java @@ -80,8 +80,6 @@ public static InstalledAddOnExtension fromJson( return objectMapper.readValue(json, InstalledAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static InstalledAddOnExtension fromJson( return objectMapper.readValue(json, InstalledAddOnExtension.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/wireless/Command.java b/src/main/java/com/twilio/rest/preview/wireless/Command.java index f91bb76ff6..6d6cd74914 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/Command.java +++ b/src/main/java/com/twilio/rest/preview/wireless/Command.java @@ -66,8 +66,6 @@ public static Command fromJson( return objectMapper.readValue(json, Command.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static Command fromJson( return objectMapper.readValue(json, Command.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java b/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java index 13db531232..aaa0fd6131 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java +++ b/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java @@ -75,8 +75,6 @@ public static RatePlan fromJson( return objectMapper.readValue(json, RatePlan.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static RatePlan fromJson( return objectMapper.readValue(json, RatePlan.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/wireless/Sim.java b/src/main/java/com/twilio/rest/preview/wireless/Sim.java index d49fbecbf6..cbfea155e0 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/Sim.java +++ b/src/main/java/com/twilio/rest/preview/wireless/Sim.java @@ -68,8 +68,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +88,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +98,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java b/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java index 4318c738d0..cfca8513ff 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java +++ b/src/main/java/com/twilio/rest/preview/wireless/sim/Usage.java @@ -56,8 +56,6 @@ public static Usage fromJson( return objectMapper.readValue(json, Usage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Usage fromJson( return objectMapper.readValue(json, Usage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java index cf27591bfa..5d44984f8f 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java @@ -87,8 +87,6 @@ public static Account fromJson( return objectMapper.readValue(json, Account.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static Account fromJson( return objectMapper.readValue(json, Account.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java index 570bef66ff..69f123cef5 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java @@ -180,8 +180,6 @@ public static RoleAssignment fromJson( return objectMapper.readValue(json, RoleAssignment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -202,8 +200,6 @@ public static RoleAssignment fromJson( return objectMapper.readValue(json, RoleAssignment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -214,8 +210,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/User.java b/src/main/java/com/twilio/rest/previewiam/organizations/User.java index 2c3ce1946a..9083e2a795 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/User.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/User.java @@ -640,8 +640,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -662,8 +660,6 @@ public static User fromJson( return objectMapper.readValue(json, User.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -674,8 +670,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java b/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java index cb3bfdf29f..2512f6a193 100644 --- a/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java @@ -56,8 +56,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Authorize fromJson( return objectMapper.readValue(json, Authorize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/previewiam/v1/Token.java b/src/main/java/com/twilio/rest/previewiam/v1/Token.java index eaba946be9..4a5ead18c6 100644 --- a/src/main/java/com/twilio/rest/previewiam/v1/Token.java +++ b/src/main/java/com/twilio/rest/previewiam/v1/Token.java @@ -58,8 +58,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static Token fromJson( return objectMapper.readValue(json, Token.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java b/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java index 798e9c9a1d..2ac3cc962a 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/messaging/Country.java @@ -65,8 +65,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java index afe3ade860..df5c9c9078 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/Country.java @@ -64,8 +64,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java b/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java index 39c65e61d1..827ab236f0 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/Country.java @@ -65,8 +65,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java b/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java index eabe70b2b8..e4db6a487f 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/Number.java @@ -62,8 +62,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v2/Country.java b/src/main/java/com/twilio/rest/pricing/v2/Country.java index c678da024a..e09fd8b167 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Country.java @@ -65,8 +65,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v2/Number.java b/src/main/java/com/twilio/rest/pricing/v2/Number.java index 74cc124112..21c2d3d49f 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Number.java @@ -63,8 +63,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java b/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java index f9826cb231..3b51c1e4ad 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/Country.java @@ -65,8 +65,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java b/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java index c93f247ae0..0608062f1f 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/Number.java @@ -63,8 +63,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static Number fromJson( return objectMapper.readValue(json, Number.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/Service.java b/src/main/java/com/twilio/rest/proxy/v1/Service.java index 36e96a9b07..56498a2d72 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/Service.java +++ b/src/main/java/com/twilio/rest/proxy/v1/Service.java @@ -121,8 +121,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -143,8 +141,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -155,8 +151,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java index 2c41c5a315..54bb9a9f40 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumber.java @@ -84,8 +84,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/Session.java b/src/main/java/com/twilio/rest/proxy/v1/service/Session.java index 94a1107f4a..6ff9d08b0a 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/Session.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/Session.java @@ -129,8 +129,6 @@ public static Session fromJson( return objectMapper.readValue(json, Session.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -151,8 +149,6 @@ public static Session fromJson( return objectMapper.readValue(json, Session.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -163,8 +159,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java index d6f3e22da3..e7ce68ef0f 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/Interaction.java @@ -138,8 +138,6 @@ public static Interaction fromJson( return objectMapper.readValue(json, Interaction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +158,6 @@ public static Interaction fromJson( return objectMapper.readValue(json, Interaction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -172,8 +168,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java index d1ca09f964..8805b185cb 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/Participant.java @@ -90,8 +90,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +110,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +120,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java index b7d121084c..65ac0f69f3 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteraction.java @@ -170,8 +170,6 @@ public static MessageInteraction fromJson( return objectMapper.readValue(json, MessageInteraction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -192,8 +190,6 @@ public static MessageInteraction fromJson( return objectMapper.readValue(json, MessageInteraction.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -204,8 +200,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java b/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java index 839cbd7d26..0f449f9c77 100644 --- a/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/routes/v2/PhoneNumber.java @@ -62,8 +62,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/routes/v2/SipDomain.java b/src/main/java/com/twilio/rest/routes/v2/SipDomain.java index 5e5f2b4e81..8f36789346 100644 --- a/src/main/java/com/twilio/rest/routes/v2/SipDomain.java +++ b/src/main/java/com/twilio/rest/routes/v2/SipDomain.java @@ -62,8 +62,6 @@ public static SipDomain fromJson( return objectMapper.readValue(json, SipDomain.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static SipDomain fromJson( return objectMapper.readValue(json, SipDomain.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/routes/v2/Trunk.java b/src/main/java/com/twilio/rest/routes/v2/Trunk.java index 8b4819463a..9ef88a37cb 100644 --- a/src/main/java/com/twilio/rest/routes/v2/Trunk.java +++ b/src/main/java/com/twilio/rest/routes/v2/Trunk.java @@ -62,8 +62,6 @@ public static Trunk fromJson( return objectMapper.readValue(json, Trunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static Trunk fromJson( return objectMapper.readValue(json, Trunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/Service.java b/src/main/java/com/twilio/rest/serverless/v1/Service.java index 1ccacd7e2f..56d9d89775 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/Service.java +++ b/src/main/java/com/twilio/rest/serverless/v1/Service.java @@ -78,8 +78,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +98,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +108,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java b/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java index f973ae1432..238c5c617f 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Asset.java @@ -88,8 +88,6 @@ public static Asset fromJson( return objectMapper.readValue(json, Asset.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +108,6 @@ public static Asset fromJson( return objectMapper.readValue(json, Asset.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +118,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java index ba84bd876c..9fece0cb05 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java @@ -126,8 +126,6 @@ public static Build fromJson( return objectMapper.readValue(json, Build.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -148,8 +146,6 @@ public static Build fromJson( return objectMapper.readValue(json, Build.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -160,8 +156,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java b/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java index 744d5f9e42..ce64f305aa 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Environment.java @@ -80,8 +80,6 @@ public static Environment fromJson( return objectMapper.readValue(json, Environment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static Environment fromJson( return objectMapper.readValue(json, Environment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Function.java b/src/main/java/com/twilio/rest/serverless/v1/service/Function.java index c3098fab9e..c758a2a2e1 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Function.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Function.java @@ -88,8 +88,6 @@ public static Function fromJson( return objectMapper.readValue(json, Function.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +108,6 @@ public static Function fromJson( return objectMapper.readValue(json, Function.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +118,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java index 7e9804edd8..0bf3d097bf 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersion.java @@ -91,8 +91,6 @@ public static AssetVersion fromJson( return objectMapper.readValue(json, AssetVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +111,6 @@ public static AssetVersion fromJson( return objectMapper.readValue(json, AssetVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +121,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java index 7fdfc7a7ca..57debf4b24 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatus.java @@ -81,8 +81,6 @@ public static BuildStatus fromJson( return objectMapper.readValue(json, BuildStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static BuildStatus fromJson( return objectMapper.readValue(json, BuildStatus.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java index 512e8dd7d2..2d35277497 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Deployment.java @@ -80,8 +80,6 @@ public static Deployment fromJson( return objectMapper.readValue(json, Deployment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static Deployment fromJson( return objectMapper.readValue(json, Deployment.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java index 67e668e0ea..bfa487418e 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java @@ -69,8 +69,6 @@ public static Log fromJson( return objectMapper.readValue(json, Log.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +89,6 @@ public static Log fromJson( return objectMapper.readValue(json, Log.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +99,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java index 595084acf3..67559ea2ae 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Variable.java @@ -99,8 +99,6 @@ public static Variable fromJson( return objectMapper.readValue(json, Variable.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +119,6 @@ public static Variable fromJson( return objectMapper.readValue(json, Variable.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +129,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java index 3737e1ad71..7e0df94680 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersion.java @@ -96,8 +96,6 @@ public static FunctionVersion fromJson( return objectMapper.readValue(json, FunctionVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static FunctionVersion fromJson( return objectMapper.readValue(json, FunctionVersion.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java index 1056f67fbd..99c50c8862 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContent.java @@ -64,8 +64,6 @@ public static FunctionVersionContent fromJson( return objectMapper.readValue(json, FunctionVersionContent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static FunctionVersionContent fromJson( return objectMapper.readValue(json, FunctionVersionContent.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/Flow.java b/src/main/java/com/twilio/rest/studio/v1/Flow.java index baf7369b4b..d90a4905ff 100644 --- a/src/main/java/com/twilio/rest/studio/v1/Flow.java +++ b/src/main/java/com/twilio/rest/studio/v1/Flow.java @@ -88,8 +88,6 @@ public static Flow fromJson( return objectMapper.readValue(json, Flow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +108,6 @@ public static Flow fromJson( return objectMapper.readValue(json, Flow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +118,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java b/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java index 9c2ad0a570..39f83b2521 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/Engagement.java @@ -102,8 +102,6 @@ public static Engagement fromJson( return objectMapper.readValue(json, Engagement.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static Engagement fromJson( return objectMapper.readValue(json, Engagement.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java b/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java index 1dc160ba15..8bfba3c050 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/Execution.java @@ -110,8 +110,6 @@ public static Execution fromJson( return objectMapper.readValue(json, Execution.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +130,6 @@ public static Execution fromJson( return objectMapper.readValue(json, Execution.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +140,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java index 9db076c9ab..de4dc24708 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContext.java @@ -59,8 +59,6 @@ public static EngagementContext fromJson( return objectMapper.readValue(json, EngagementContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static EngagementContext fromJson( return objectMapper.readValue(json, EngagementContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java index 8f324455cd..1e0c0ba5ea 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java @@ -70,8 +70,6 @@ public static Step fromJson( return objectMapper.readValue(json, Step.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static Step fromJson( return objectMapper.readValue(json, Step.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java index e4f361347b..53cc2c90f6 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContext.java @@ -64,8 +64,6 @@ public static StepContext fromJson( return objectMapper.readValue(json, StepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static StepContext fromJson( return objectMapper.readValue(json, StepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java index 556b041fe2..4fc9831276 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContext.java @@ -59,8 +59,6 @@ public static ExecutionContext fromJson( return objectMapper.readValue(json, ExecutionContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static ExecutionContext fromJson( return objectMapper.readValue(json, ExecutionContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java index 63f23c56b7..4f080ad237 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java @@ -70,8 +70,6 @@ public static ExecutionStep fromJson( return objectMapper.readValue(json, ExecutionStep.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static ExecutionStep fromJson( return objectMapper.readValue(json, ExecutionStep.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java index 60cd76f8bf..16b4911e2b 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContext.java @@ -64,8 +64,6 @@ public static ExecutionStepContext fromJson( return objectMapper.readValue(json, ExecutionStepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static ExecutionStepContext fromJson( return objectMapper.readValue(json, ExecutionStepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/Flow.java b/src/main/java/com/twilio/rest/studio/v2/Flow.java index 1d1aa27c22..10a702688e 100644 --- a/src/main/java/com/twilio/rest/studio/v2/Flow.java +++ b/src/main/java/com/twilio/rest/studio/v2/Flow.java @@ -104,8 +104,6 @@ public static Flow fromJson( return objectMapper.readValue(json, Flow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static Flow fromJson( return objectMapper.readValue(json, Flow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java index 6cde5fdf71..9a8d45d8da 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java @@ -80,8 +80,6 @@ public static FlowValidate fromJson( return objectMapper.readValue(json, FlowValidate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static FlowValidate fromJson( return objectMapper.readValue(json, FlowValidate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java b/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java index 98c9dca919..d99728e9bc 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/Execution.java @@ -110,8 +110,6 @@ public static Execution fromJson( return objectMapper.readValue(json, Execution.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +130,6 @@ public static Execution fromJson( return objectMapper.readValue(json, Execution.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -144,8 +140,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java index 691f7bb9fb..e4550137eb 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevision.java @@ -87,8 +87,6 @@ public static FlowRevision fromJson( return objectMapper.readValue(json, FlowRevision.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static FlowRevision fromJson( return objectMapper.readValue(json, FlowRevision.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java b/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java index a7bd0bde97..af15f11e8d 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/FlowTestUser.java @@ -64,8 +64,6 @@ public static FlowTestUser fromJson( return objectMapper.readValue(json, FlowTestUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static FlowTestUser fromJson( return objectMapper.readValue(json, FlowTestUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java index b62dfc1efb..3ae89aeb47 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContext.java @@ -59,8 +59,6 @@ public static ExecutionContext fromJson( return objectMapper.readValue(json, ExecutionContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static ExecutionContext fromJson( return objectMapper.readValue(json, ExecutionContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java index 2e25a9bded..7d6780c8e9 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java @@ -70,8 +70,6 @@ public static ExecutionStep fromJson( return objectMapper.readValue(json, ExecutionStep.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static ExecutionStep fromJson( return objectMapper.readValue(json, ExecutionStep.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java index d6b8383eae..dbf6dff8ed 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContext.java @@ -64,8 +64,6 @@ public static ExecutionStepContext fromJson( return objectMapper.readValue(json, ExecutionStepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static ExecutionStepContext fromJson( return objectMapper.readValue(json, ExecutionStepContext.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java b/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java index 38e3c0bab9..707e3f9938 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java +++ b/src/main/java/com/twilio/rest/supersim/v1/EsimProfile.java @@ -91,8 +91,6 @@ public static EsimProfile fromJson( return objectMapper.readValue(json, EsimProfile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +111,6 @@ public static EsimProfile fromJson( return objectMapper.readValue(json, EsimProfile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +121,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/Fleet.java b/src/main/java/com/twilio/rest/supersim/v1/Fleet.java index f6ccd9010c..aa68f7ac4d 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Fleet.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Fleet.java @@ -91,8 +91,6 @@ public static Fleet fromJson( return objectMapper.readValue(json, Fleet.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +111,6 @@ public static Fleet fromJson( return objectMapper.readValue(json, Fleet.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +121,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java b/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java index 012e4511c0..bd0d8b3f11 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java +++ b/src/main/java/com/twilio/rest/supersim/v1/IpCommand.java @@ -133,8 +133,6 @@ public static IpCommand fromJson( return objectMapper.readValue(json, IpCommand.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -155,8 +153,6 @@ public static IpCommand fromJson( return objectMapper.readValue(json, IpCommand.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -167,8 +163,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/Network.java b/src/main/java/com/twilio/rest/supersim/v1/Network.java index d1aaf04507..b110d88dbd 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Network.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Network.java @@ -61,8 +61,6 @@ public static Network fromJson( return objectMapper.readValue(json, Network.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static Network fromJson( return objectMapper.readValue(json, Network.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java b/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java index a34c6e0235..bf8ac32973 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java +++ b/src/main/java/com/twilio/rest/supersim/v1/NetworkAccessProfile.java @@ -71,8 +71,6 @@ public static NetworkAccessProfile fromJson( return objectMapper.readValue(json, NetworkAccessProfile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +91,6 @@ public static NetworkAccessProfile fromJson( return objectMapper.readValue(json, NetworkAccessProfile.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -105,8 +101,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java b/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java index 0211056abf..c69a4f0ab9 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java +++ b/src/main/java/com/twilio/rest/supersim/v1/SettingsUpdate.java @@ -81,8 +81,6 @@ public static SettingsUpdate fromJson( return objectMapper.readValue(json, SettingsUpdate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +101,6 @@ public static SettingsUpdate fromJson( return objectMapper.readValue(json, SettingsUpdate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -115,8 +111,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/Sim.java b/src/main/java/com/twilio/rest/supersim/v1/Sim.java index f30917ca6d..71b5da64c0 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/Sim.java +++ b/src/main/java/com/twilio/rest/supersim/v1/Sim.java @@ -119,8 +119,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -141,8 +139,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -153,8 +149,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java b/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java index c784ed517f..727ba26dd6 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java +++ b/src/main/java/com/twilio/rest/supersim/v1/SmsCommand.java @@ -113,8 +113,6 @@ public static SmsCommand fromJson( return objectMapper.readValue(json, SmsCommand.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +133,6 @@ public static SmsCommand fromJson( return objectMapper.readValue(json, SmsCommand.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -147,8 +143,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java b/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java index 903a74fb4d..cee4e9ea81 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java +++ b/src/main/java/com/twilio/rest/supersim/v1/UsageRecord.java @@ -102,8 +102,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java index 1c4ac9e410..13c9946789 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetwork.java @@ -94,8 +94,6 @@ public static NetworkAccessProfileNetwork fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +117,6 @@ public static NetworkAccessProfileNetwork fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -131,8 +127,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java b/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java index aa2af1b0a2..98fa9e5adb 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java +++ b/src/main/java/com/twilio/rest/supersim/v1/sim/BillingPeriod.java @@ -78,8 +78,6 @@ public static BillingPeriod fromJson( return objectMapper.readValue(json, BillingPeriod.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +98,6 @@ public static BillingPeriod fromJson( return objectMapper.readValue(json, BillingPeriod.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -112,8 +108,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java b/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java index c3de7ef1aa..1abade336c 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java +++ b/src/main/java/com/twilio/rest/supersim/v1/sim/SimIpAddress.java @@ -76,8 +76,6 @@ public static SimIpAddress fromJson( return objectMapper.readValue(json, SimIpAddress.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static SimIpAddress fromJson( return objectMapper.readValue(json, SimIpAddress.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/Service.java b/src/main/java/com/twilio/rest/sync/v1/Service.java index d8fbd47c2c..feefe03c75 100644 --- a/src/main/java/com/twilio/rest/sync/v1/Service.java +++ b/src/main/java/com/twilio/rest/sync/v1/Service.java @@ -75,8 +75,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/Document.java b/src/main/java/com/twilio/rest/sync/v1/service/Document.java index 919b16e5bd..6b1e021a56 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/Document.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/Document.java @@ -84,8 +84,6 @@ public static Document fromJson( return objectMapper.readValue(json, Document.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static Document fromJson( return objectMapper.readValue(json, Document.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java index 0c29626596..4dae654879 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncList.java @@ -84,8 +84,6 @@ public static SyncList fromJson( return objectMapper.readValue(json, SyncList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static SyncList fromJson( return objectMapper.readValue(json, SyncList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java index 6c05dabf99..aecdb1871e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMap.java @@ -84,8 +84,6 @@ public static SyncMap fromJson( return objectMapper.readValue(json, SyncMap.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static SyncMap fromJson( return objectMapper.readValue(json, SyncMap.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java index 641a2fbb3c..8d37fb4f02 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStream.java @@ -84,8 +84,6 @@ public static SyncStream fromJson( return objectMapper.readValue(json, SyncStream.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static SyncStream fromJson( return objectMapper.readValue(json, SyncStream.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java index 9451f0c2e9..cb9a914949 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermission.java @@ -101,8 +101,6 @@ public static DocumentPermission fromJson( return objectMapper.readValue(json, DocumentPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -123,8 +121,6 @@ public static DocumentPermission fromJson( return objectMapper.readValue(json, DocumentPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +131,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java index 176133e31e..78fb2cc514 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java @@ -134,8 +134,6 @@ public static SyncListItem fromJson( return objectMapper.readValue(json, SyncListItem.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -156,8 +154,6 @@ public static SyncListItem fromJson( return objectMapper.readValue(json, SyncListItem.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -168,8 +164,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java index d0c88b9b3e..21ed075786 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermission.java @@ -101,8 +101,6 @@ public static SyncListPermission fromJson( return objectMapper.readValue(json, SyncListPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -123,8 +121,6 @@ public static SyncListPermission fromJson( return objectMapper.readValue(json, SyncListPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +131,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java index 3e121f07f9..d24e1d21e0 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java @@ -135,8 +135,6 @@ public static SyncMapItem fromJson( return objectMapper.readValue(json, SyncMapItem.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -157,8 +155,6 @@ public static SyncMapItem fromJson( return objectMapper.readValue(json, SyncMapItem.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -169,8 +165,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java index c63c5b00fe..30d6002b0f 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermission.java @@ -101,8 +101,6 @@ public static SyncMapPermission fromJson( return objectMapper.readValue(json, SyncMapPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -123,8 +121,6 @@ public static SyncMapPermission fromJson( return objectMapper.readValue(json, SyncMapPermission.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -135,8 +131,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java index c0f1314ded..ffe0d91ca8 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java @@ -59,8 +59,6 @@ public static StreamMessage fromJson( return objectMapper.readValue(json, StreamMessage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static StreamMessage fromJson( return objectMapper.readValue(json, StreamMessage.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java b/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java index 6fcc05b0c8..6cc5bac821 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/Workspace.java @@ -96,8 +96,6 @@ public static Workspace fromJson( return objectMapper.readValue(json, Workspace.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static Workspace fromJson( return objectMapper.readValue(json, Workspace.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java index 266d570af7..a1c08103e0 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Activity.java @@ -87,8 +87,6 @@ public static Activity fromJson( return objectMapper.readValue(json, Activity.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static Activity fromJson( return objectMapper.readValue(json, Activity.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java index c5fcc6ac21..e510375732 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Event.java @@ -65,8 +65,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Event fromJson( return objectMapper.readValue(json, Event.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java index 5b7ab9d217..e80fb9cf94 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Task.java @@ -109,8 +109,6 @@ public static Task fromJson( return objectMapper.readValue(json, Task.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -131,8 +129,6 @@ public static Task fromJson( return objectMapper.readValue(json, Task.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -143,8 +139,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java index cd72a69671..74f552e5b8 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannel.java @@ -92,8 +92,6 @@ public static TaskChannel fromJson( return objectMapper.readValue(json, TaskChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +112,6 @@ public static TaskChannel fromJson( return objectMapper.readValue(json, TaskChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +122,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java index 8e91ca847e..c2ded34ffa 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueue.java @@ -108,8 +108,6 @@ public static TaskQueue fromJson( return objectMapper.readValue(json, TaskQueue.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static TaskQueue fromJson( return objectMapper.readValue(json, TaskQueue.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java index 7456a0d2ee..6a39243657 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Worker.java @@ -87,8 +87,6 @@ public static Worker fromJson( return objectMapper.readValue(json, Worker.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static Worker fromJson( return objectMapper.readValue(json, Worker.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java index 065047c5e6..3cc33d54a3 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/Workflow.java @@ -92,8 +92,6 @@ public static Workflow fromJson( return objectMapper.readValue(json, Workflow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +112,6 @@ public static Workflow fromJson( return objectMapper.readValue(json, Workflow.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +122,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java index d6a55ff1d7..8134cfb3e5 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatistics.java @@ -63,8 +63,6 @@ public static WorkspaceCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static WorkspaceCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java index 0c6387fffa..a68338eb8e 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatistics.java @@ -62,8 +62,6 @@ public static WorkspaceRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static WorkspaceRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java index 14745fd7c2..c3f63237b0 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatistics.java @@ -58,8 +58,6 @@ public static WorkspaceStatistics fromJson( return objectMapper.readValue(json, WorkspaceStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static WorkspaceStatistics fromJson( return objectMapper.readValue(json, WorkspaceStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java index b472733ff1..cde18cc425 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/Reservation.java @@ -173,8 +173,6 @@ public static Reservation fromJson( return objectMapper.readValue(json, Reservation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -195,8 +193,6 @@ public static Reservation fromJson( return objectMapper.readValue(json, Reservation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -207,8 +203,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java index 7ce2bc9e5c..2c8351692b 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueBulkRealTimeStatistics.java @@ -62,8 +62,6 @@ public static TaskQueueBulkRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static TaskQueueBulkRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java index 5dd47fbb50..38015d6ae5 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatistics.java @@ -67,8 +67,6 @@ public static TaskQueueCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static TaskQueueCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java index 3836736c6e..8baa17a343 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatistics.java @@ -66,8 +66,6 @@ public static TaskQueueRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +89,6 @@ public static TaskQueueRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +99,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java index 4129c888e8..3330c3824b 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java @@ -62,8 +62,6 @@ public static TaskQueueStatistics fromJson( return objectMapper.readValue(json, TaskQueueStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static TaskQueueStatistics fromJson( return objectMapper.readValue(json, TaskQueueStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java index d2e0f306db..f56a0e30a6 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatistics.java @@ -57,8 +57,6 @@ public static TaskQueuesStatistics fromJson( return objectMapper.readValue(json, TaskQueuesStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static TaskQueuesStatistics fromJson( return objectMapper.readValue(json, TaskQueuesStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java index bbeb9285de..e59587ebeb 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/Reservation.java @@ -152,8 +152,6 @@ public static Reservation fromJson( return objectMapper.readValue(json, Reservation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -174,8 +172,6 @@ public static Reservation fromJson( return objectMapper.readValue(json, Reservation.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -186,8 +182,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java index 179c859bff..84bea7016f 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannel.java @@ -85,8 +85,6 @@ public static WorkerChannel fromJson( return objectMapper.readValue(json, WorkerChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -107,8 +105,6 @@ public static WorkerChannel fromJson( return objectMapper.readValue(json, WorkerChannel.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +115,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java index b8ac9a1382..658d7add07 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatistics.java @@ -59,8 +59,6 @@ public static WorkerStatistics fromJson( return objectMapper.readValue(json, WorkerStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static WorkerStatistics fromJson( return objectMapper.readValue(json, WorkerStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java index b79acbcc2b..bcb6f833f9 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatistics.java @@ -64,8 +64,6 @@ public static WorkersCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +87,6 @@ public static WorkersCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +97,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java index 7abdbcd2bc..67aad93ac6 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatistics.java @@ -62,8 +62,6 @@ public static WorkersRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static WorkersRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java index a5c459509f..80a7c7f55c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatistics.java @@ -58,8 +58,6 @@ public static WorkersStatistics fromJson( return objectMapper.readValue(json, WorkersStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -80,8 +78,6 @@ public static WorkersStatistics fromJson( return objectMapper.readValue(json, WorkersStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +88,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java index cd2aed9738..809242d4de 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatistics.java @@ -67,8 +67,6 @@ public static WorkflowCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -92,8 +90,6 @@ public static WorkflowCumulativeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +100,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java index a477153a3c..d3e1d664cd 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatistics.java @@ -65,8 +65,6 @@ public static WorkflowRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +88,6 @@ public static WorkflowRealTimeStatistics fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +98,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java index a900be0e62..302ad4856d 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatistics.java @@ -59,8 +59,6 @@ public static WorkflowStatistics fromJson( return objectMapper.readValue(json, WorkflowStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -81,8 +79,6 @@ public static WorkflowStatistics fromJson( return objectMapper.readValue(json, WorkflowStatistics.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -93,8 +89,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java index 1d623cf510..ee7ded9680 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java +++ b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java @@ -119,8 +119,6 @@ public static Trunk fromJson( return objectMapper.readValue(json, Trunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -141,8 +139,6 @@ public static Trunk fromJson( return objectMapper.readValue(json, Trunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -153,8 +149,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java index 507a58eadd..40a714813d 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialList.java @@ -79,8 +79,6 @@ public static CredentialList fromJson( return objectMapper.readValue(json, CredentialList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -101,8 +99,6 @@ public static CredentialList fromJson( return objectMapper.readValue(json, CredentialList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -113,8 +109,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java index a7577ffe58..83ba408219 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlList.java @@ -82,8 +82,6 @@ public static IpAccessControlList fromJson( return objectMapper.readValue(json, IpAccessControlList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +102,6 @@ public static IpAccessControlList fromJson( return objectMapper.readValue(json, IpAccessControlList.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +112,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java index fa90613ad6..c835c7e5ba 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrl.java @@ -97,8 +97,6 @@ public static OriginationUrl fromJson( return objectMapper.readValue(json, OriginationUrl.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -119,8 +117,6 @@ public static OriginationUrl fromJson( return objectMapper.readValue(json, OriginationUrl.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -131,8 +127,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java index 0d794f4abe..7b82eb5e21 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumber.java @@ -105,8 +105,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -127,8 +125,6 @@ public static PhoneNumber fromJson( return objectMapper.readValue(json, PhoneNumber.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -139,8 +135,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java index 498079eea6..854cfa3465 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/Recording.java @@ -103,8 +103,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -125,8 +123,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -137,8 +133,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java index 76bf61cfae..8dc8829e6d 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiries.java @@ -66,8 +66,6 @@ public static ComplianceInquiries fromJson( return objectMapper.readValue(json, ComplianceInquiries.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -88,8 +86,6 @@ public static ComplianceInquiries fromJson( return objectMapper.readValue(json, ComplianceInquiries.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -100,8 +96,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java index 2e37f52d84..27f0caf8d6 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiries.java @@ -166,8 +166,6 @@ public static ComplianceRegistrationInquiries fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -191,8 +189,6 @@ public static ComplianceRegistrationInquiries fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -203,8 +199,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java index a8f32a8301..7ac871774b 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java @@ -112,8 +112,6 @@ public static ComplianceTollfreeInquiries fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -137,8 +135,6 @@ public static ComplianceTollfreeInquiries fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -149,8 +145,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java index e5e6cd428d..62b2a44cc7 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfiles.java @@ -104,8 +104,6 @@ public static CustomerProfiles fromJson( return objectMapper.readValue(json, CustomerProfiles.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static CustomerProfiles fromJson( return objectMapper.readValue(json, CustomerProfiles.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java index 091e2a9cc5..7c5568f045 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUser.java @@ -77,8 +77,6 @@ public static EndUser fromJson( return objectMapper.readValue(json, EndUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +97,6 @@ public static EndUser fromJson( return objectMapper.readValue(json, EndUser.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -111,8 +107,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java index 7af7583635..75f4ec2f62 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUserType.java @@ -61,8 +61,6 @@ public static EndUserType fromJson( return objectMapper.readValue(json, EndUserType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static EndUserType fromJson( return objectMapper.readValue(json, EndUserType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/Policies.java b/src/main/java/com/twilio/rest/trusthub/v1/Policies.java index 3c09794a0d..fc51d16671 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/Policies.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/Policies.java @@ -60,8 +60,6 @@ public static Policies fromJson( return objectMapper.readValue(json, Policies.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static Policies fromJson( return objectMapper.readValue(json, Policies.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java index 41c9fb9516..f433f0cdb4 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocument.java @@ -102,8 +102,6 @@ public static SupportingDocument fromJson( return objectMapper.readValue(json, SupportingDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static SupportingDocument fromJson( return objectMapper.readValue(json, SupportingDocument.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java index 065f733eb9..b1653a38dc 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentType.java @@ -61,8 +61,6 @@ public static SupportingDocumentType fromJson( return objectMapper.readValue(json, SupportingDocumentType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -83,8 +81,6 @@ public static SupportingDocumentType fromJson( return objectMapper.readValue(json, SupportingDocumentType.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -95,8 +91,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java b/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java index c88a61afff..074452a652 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/TrustProducts.java @@ -104,8 +104,6 @@ public static TrustProducts fromJson( return objectMapper.readValue(json, TrustProducts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -126,8 +124,6 @@ public static TrustProducts fromJson( return objectMapper.readValue(json, TrustProducts.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -138,8 +134,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java index a2fb77f587..705def1057 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignment.java @@ -97,8 +97,6 @@ public static CustomerProfilesChannelEndpointAssignment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static CustomerProfilesChannelEndpointAssignment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java index e3116f74f4..f86b8df5e8 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignments.java @@ -95,8 +95,6 @@ public static CustomerProfilesEntityAssignments fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static CustomerProfilesEntityAssignments fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java index 1cd9e7c8f6..2691c8767b 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluations.java @@ -105,8 +105,6 @@ public static CustomerProfilesEvaluations fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +128,6 @@ public static CustomerProfilesEvaluations fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -142,8 +138,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java index 41e8a94d8b..1ca2ed3b3b 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignment.java @@ -97,8 +97,6 @@ public static TrustProductsChannelEndpointAssignment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static TrustProductsChannelEndpointAssignment fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java index f5f1e7e8c9..3b0b6dea03 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignments.java @@ -93,8 +93,6 @@ public static TrustProductsEntityAssignments fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static TrustProductsEntityAssignments fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java index 07e0cdcc59..cd926da419 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluations.java @@ -102,8 +102,6 @@ public static TrustProductsEvaluations fromJson( return objectMapper.readValue(json, TrustProductsEvaluations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -124,8 +122,6 @@ public static TrustProductsEvaluations fromJson( return objectMapper.readValue(json, TrustProductsEvaluations.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -136,8 +132,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/Form.java b/src/main/java/com/twilio/rest/verify/v2/Form.java index 63d4e35175..849b493a4a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Form.java +++ b/src/main/java/com/twilio/rest/verify/v2/Form.java @@ -76,8 +76,6 @@ public static Form fromJson( return objectMapper.readValue(json, Form.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +96,6 @@ public static Form fromJson( return objectMapper.readValue(json, Form.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -110,8 +106,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/Safelist.java b/src/main/java/com/twilio/rest/verify/v2/Safelist.java index 463d12c71a..0e701b670f 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Safelist.java +++ b/src/main/java/com/twilio/rest/verify/v2/Safelist.java @@ -64,8 +64,6 @@ public static Safelist fromJson( return objectMapper.readValue(json, Safelist.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -86,8 +84,6 @@ public static Safelist fromJson( return objectMapper.readValue(json, Safelist.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -98,8 +94,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/Service.java b/src/main/java/com/twilio/rest/verify/v2/Service.java index 1ff06c1242..64f52e4242 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Service.java +++ b/src/main/java/com/twilio/rest/verify/v2/Service.java @@ -75,8 +75,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static Service fromJson( return objectMapper.readValue(json, Service.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/Template.java b/src/main/java/com/twilio/rest/verify/v2/Template.java index 4aa526c833..50e2083f1a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Template.java +++ b/src/main/java/com/twilio/rest/verify/v2/Template.java @@ -56,8 +56,6 @@ public static Template fromJson( return objectMapper.readValue(json, Template.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static Template fromJson( return objectMapper.readValue(json, Template.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java index 2251a465cb..96b8cf51d5 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java @@ -106,8 +106,6 @@ public static VerificationAttempt fromJson( return objectMapper.readValue(json, VerificationAttempt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -128,8 +126,6 @@ public static VerificationAttempt fromJson( return objectMapper.readValue(json, VerificationAttempt.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -140,8 +136,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java index fe3721bbf0..41bfb12b0b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java @@ -83,8 +83,6 @@ public static VerificationAttemptsSummary fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +106,6 @@ public static VerificationAttemptsSummary fromJson( ); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +116,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java b/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java index a61ff87ecf..380469ea94 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/AccessToken.java @@ -89,8 +89,6 @@ public static AccessToken fromJson( return objectMapper.readValue(json, AccessToken.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -111,8 +109,6 @@ public static AccessToken fromJson( return objectMapper.readValue(json, AccessToken.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -123,8 +119,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java index a1987dfd11..2f66424c5b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ApproveChallenge.java @@ -438,8 +438,6 @@ public static ApproveChallenge fromJson( return objectMapper.readValue(json, ApproveChallenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -460,8 +458,6 @@ public static ApproveChallenge fromJson( return objectMapper.readValue(json, ApproveChallenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -472,8 +468,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Entity.java b/src/main/java/com/twilio/rest/verify/v2/service/Entity.java index 9cfa47490b..5216a92db1 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Entity.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Entity.java @@ -80,8 +80,6 @@ public static Entity fromJson( return objectMapper.readValue(json, Entity.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static Entity fromJson( return objectMapper.readValue(json, Entity.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java index 2d2b593f07..eeeccb75ba 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfiguration.java @@ -98,8 +98,6 @@ public static MessagingConfiguration fromJson( return objectMapper.readValue(json, MessagingConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static MessagingConfiguration fromJson( return objectMapper.readValue(json, MessagingConfiguration.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java b/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java index f4204fb5b4..c2c81ff8af 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewChallenge.java @@ -219,8 +219,6 @@ public static NewChallenge fromJson( return objectMapper.readValue(json, NewChallenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -241,8 +239,6 @@ public static NewChallenge fromJson( return objectMapper.readValue(json, NewChallenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -253,8 +249,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java index 1e86299fd1..1ad8541722 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewFactor.java @@ -530,8 +530,6 @@ public static NewFactor fromJson( return objectMapper.readValue(json, NewFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -552,8 +550,6 @@ public static NewFactor fromJson( return objectMapper.readValue(json, NewFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -564,8 +560,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java index 86c0afef27..bf1c121281 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/NewVerifyFactor.java @@ -434,8 +434,6 @@ public static NewVerifyFactor fromJson( return objectMapper.readValue(json, NewVerifyFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -456,8 +454,6 @@ public static NewVerifyFactor fromJson( return objectMapper.readValue(json, NewVerifyFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -468,8 +464,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java index 7a952b8613..f23fb0cd72 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimit.java @@ -87,8 +87,6 @@ public static RateLimit fromJson( return objectMapper.readValue(json, RateLimit.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +107,6 @@ public static RateLimit fromJson( return objectMapper.readValue(json, RateLimit.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +117,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Verification.java b/src/main/java/com/twilio/rest/verify/v2/service/Verification.java index 3d9023ddfc..85d3a0a092 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Verification.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Verification.java @@ -142,8 +142,6 @@ public static Verification fromJson( return objectMapper.readValue(json, Verification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -164,8 +162,6 @@ public static Verification fromJson( return objectMapper.readValue(json, Verification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -176,8 +172,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java index cabfa789e4..1399892490 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheck.java @@ -84,8 +84,6 @@ public static VerificationCheck fromJson( return objectMapper.readValue(json, VerificationCheck.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -106,8 +104,6 @@ public static VerificationCheck fromJson( return objectMapper.readValue(json, VerificationCheck.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +114,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java b/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java index 16e0c2755a..e36c730038 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/Webhook.java @@ -155,8 +155,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -177,8 +175,6 @@ public static Webhook fromJson( return objectMapper.readValue(json, Webhook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +185,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java index f43d5e5b43..9940c32fce 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java @@ -171,8 +171,6 @@ public static Challenge fromJson( return objectMapper.readValue(json, Challenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -193,8 +191,6 @@ public static Challenge fromJson( return objectMapper.readValue(json, Challenge.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -205,8 +201,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java index 5b25c09c22..ca0cc4ebb5 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java @@ -148,8 +148,6 @@ public static Factor fromJson( return objectMapper.readValue(json, Factor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -170,8 +168,6 @@ public static Factor fromJson( return objectMapper.readValue(json, Factor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -182,8 +178,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java index 26cc3ba38b..cc28f6f527 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java @@ -155,8 +155,6 @@ public static NewFactor fromJson( return objectMapper.readValue(json, NewFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -177,8 +175,6 @@ public static NewFactor fromJson( return objectMapper.readValue(json, NewFactor.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -189,8 +185,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java index 806a742b72..5196b67593 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/Notification.java @@ -65,8 +65,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -87,8 +85,6 @@ public static Notification fromJson( return objectMapper.readValue(json, Notification.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +95,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java index 44d49d25ec..d6a784657c 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/Bucket.java @@ -99,8 +99,6 @@ public static Bucket fromJson( return objectMapper.readValue(json, Bucket.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -121,8 +119,6 @@ public static Bucket fromJson( return objectMapper.readValue(json, Bucket.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -133,8 +129,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/Composition.java b/src/main/java/com/twilio/rest/video/v1/Composition.java index ba09a7a6eb..8b5b9bf8bc 100644 --- a/src/main/java/com/twilio/rest/video/v1/Composition.java +++ b/src/main/java/com/twilio/rest/video/v1/Composition.java @@ -117,8 +117,6 @@ public static Composition fromJson( return objectMapper.readValue(json, Composition.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -139,8 +137,6 @@ public static Composition fromJson( return objectMapper.readValue(json, Composition.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -151,8 +147,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionHook.java b/src/main/java/com/twilio/rest/video/v1/CompositionHook.java index ce11430c75..73a09b0982 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionHook.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionHook.java @@ -100,8 +100,6 @@ public static CompositionHook fromJson( return objectMapper.readValue(json, CompositionHook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static CompositionHook fromJson( return objectMapper.readValue(json, CompositionHook.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java b/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java index ac3ed0ff2f..2dd0979cb6 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionSettings.java @@ -62,8 +62,6 @@ public static CompositionSettings fromJson( return objectMapper.readValue(json, CompositionSettings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static CompositionSettings fromJson( return objectMapper.readValue(json, CompositionSettings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/Recording.java b/src/main/java/com/twilio/rest/video/v1/Recording.java index 0fce55980a..c93d3120f9 100644 --- a/src/main/java/com/twilio/rest/video/v1/Recording.java +++ b/src/main/java/com/twilio/rest/video/v1/Recording.java @@ -154,8 +154,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -176,8 +174,6 @@ public static Recording fromJson( return objectMapper.readValue(json, Recording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -188,8 +184,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java b/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java index bac8b15057..ab1fab58fd 100644 --- a/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java +++ b/src/main/java/com/twilio/rest/video/v1/RecordingSettings.java @@ -60,8 +60,6 @@ public static RecordingSettings fromJson( return objectMapper.readValue(json, RecordingSettings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static RecordingSettings fromJson( return objectMapper.readValue(json, RecordingSettings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/Room.java b/src/main/java/com/twilio/rest/video/v1/Room.java index 056587ef71..0e24a5f6ad 100644 --- a/src/main/java/com/twilio/rest/video/v1/Room.java +++ b/src/main/java/com/twilio/rest/video/v1/Room.java @@ -160,8 +160,6 @@ public static Room fromJson( return objectMapper.readValue(json, Room.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -182,8 +180,6 @@ public static Room fromJson( return objectMapper.readValue(json, Room.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -194,8 +190,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/Participant.java b/src/main/java/com/twilio/rest/video/v1/room/Participant.java index 90e1f37705..5988f20b68 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/Participant.java +++ b/src/main/java/com/twilio/rest/video/v1/room/Participant.java @@ -95,8 +95,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -117,8 +115,6 @@ public static Participant fromJson( return objectMapper.readValue(json, Participant.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +125,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java b/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java index 790b462817..d54092dc31 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java +++ b/src/main/java/com/twilio/rest/video/v1/room/RecordingRules.java @@ -63,8 +63,6 @@ public static RecordingRules fromJson( return objectMapper.readValue(json, RecordingRules.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -85,8 +83,6 @@ public static RecordingRules fromJson( return objectMapper.readValue(json, RecordingRules.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +93,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java b/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java index bec169d2de..78a26f8235 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java +++ b/src/main/java/com/twilio/rest/video/v1/room/RoomRecording.java @@ -159,8 +159,6 @@ public static RoomRecording fromJson( return objectMapper.readValue(json, RoomRecording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -181,8 +179,6 @@ public static RoomRecording fromJson( return objectMapper.readValue(json, RoomRecording.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -193,8 +189,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java index 3aec0becd0..8bc4d857bd 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java +++ b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java @@ -98,8 +98,6 @@ public static Transcriptions fromJson( return objectMapper.readValue(json, Transcriptions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -120,8 +118,6 @@ public static Transcriptions fromJson( return objectMapper.readValue(json, Transcriptions.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -132,8 +128,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java b/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java index d36aa5fdb6..336786c319 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/Anonymize.java @@ -82,8 +82,6 @@ public static Anonymize fromJson( return objectMapper.readValue(json, Anonymize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -104,8 +102,6 @@ public static Anonymize fromJson( return objectMapper.readValue(json, Anonymize.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -116,8 +112,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java index 69b0116ea5..48836cfd83 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrack.java @@ -95,8 +95,6 @@ public static PublishedTrack fromJson( return objectMapper.readValue(json, PublishedTrack.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -117,8 +115,6 @@ public static PublishedTrack fromJson( return objectMapper.readValue(json, PublishedTrack.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +125,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java index b3169549dc..c9207d9188 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRules.java @@ -69,8 +69,6 @@ public static SubscribeRules fromJson( return objectMapper.readValue(json, SubscribeRules.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +89,6 @@ public static SubscribeRules fromJson( return objectMapper.readValue(json, SubscribeRules.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -103,8 +99,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java index eb592314c0..160366b4a8 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrack.java @@ -95,8 +95,6 @@ public static SubscribedTrack fromJson( return objectMapper.readValue(json, SubscribedTrack.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -117,8 +115,6 @@ public static SubscribedTrack fromJson( return objectMapper.readValue(json, SubscribedTrack.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -129,8 +125,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java b/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java index 3971850120..fef098295a 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java +++ b/src/main/java/com/twilio/rest/voice/v1/ArchivedCall.java @@ -56,8 +56,6 @@ public static ArchivedCall fromJson( return objectMapper.readValue(json, ArchivedCall.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -78,8 +76,6 @@ public static ArchivedCall fromJson( return objectMapper.readValue(json, ArchivedCall.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -90,8 +86,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java b/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java index b2639c9c8c..72202c9308 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java +++ b/src/main/java/com/twilio/rest/voice/v1/ByocTrunk.java @@ -75,8 +75,6 @@ public static ByocTrunk fromJson( return objectMapper.readValue(json, ByocTrunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static ByocTrunk fromJson( return objectMapper.readValue(json, ByocTrunk.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java b/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java index b4b5cb9235..f9e61d25e0 100644 --- a/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java +++ b/src/main/java/com/twilio/rest/voice/v1/ConnectionPolicy.java @@ -75,8 +75,6 @@ public static ConnectionPolicy fromJson( return objectMapper.readValue(json, ConnectionPolicy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -97,8 +95,6 @@ public static ConnectionPolicy fromJson( return objectMapper.readValue(json, ConnectionPolicy.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -109,8 +105,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/IpRecord.java b/src/main/java/com/twilio/rest/voice/v1/IpRecord.java index efbac44fc7..d36802cbdb 100644 --- a/src/main/java/com/twilio/rest/voice/v1/IpRecord.java +++ b/src/main/java/com/twilio/rest/voice/v1/IpRecord.java @@ -74,8 +74,6 @@ public static IpRecord fromJson( return objectMapper.readValue(json, IpRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +94,6 @@ public static IpRecord fromJson( return objectMapper.readValue(json, IpRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -108,8 +104,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java b/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java index 72a35197b8..eef7204f3c 100644 --- a/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java +++ b/src/main/java/com/twilio/rest/voice/v1/SourceIpMapping.java @@ -80,8 +80,6 @@ public static SourceIpMapping fromJson( return objectMapper.readValue(json, SourceIpMapping.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -102,8 +100,6 @@ public static SourceIpMapping fromJson( return objectMapper.readValue(json, SourceIpMapping.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -114,8 +110,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java index 687bb0c0da..85b754d8f0 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTarget.java @@ -100,8 +100,6 @@ public static ConnectionPolicyTarget fromJson( return objectMapper.readValue(json, ConnectionPolicyTarget.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -122,8 +120,6 @@ public static ConnectionPolicyTarget fromJson( return objectMapper.readValue(json, ConnectionPolicyTarget.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -134,8 +130,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java index a7a3ba61fc..c93dce545c 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/BulkCountryUpdate.java @@ -55,8 +55,6 @@ public static BulkCountryUpdate fromJson( return objectMapper.readValue(json, BulkCountryUpdate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static BulkCountryUpdate fromJson( return objectMapper.readValue(json, BulkCountryUpdate.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java index 3289fd5c31..8530339756 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Country.java @@ -62,8 +62,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -84,8 +82,6 @@ public static Country fromJson( return objectMapper.readValue(json, Country.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -96,8 +92,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java index 6e6fbe1b23..c2687b14d5 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/Settings.java @@ -60,8 +60,6 @@ public static Settings fromJson( return objectMapper.readValue(json, Settings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -82,8 +80,6 @@ public static Settings fromJson( return objectMapper.readValue(json, Settings.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -94,8 +90,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java index 8c2810e644..18bf75b5ba 100644 --- a/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java +++ b/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/country/HighriskSpecialPrefix.java @@ -55,8 +55,6 @@ public static HighriskSpecialPrefix fromJson( return objectMapper.readValue(json, HighriskSpecialPrefix.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -77,8 +75,6 @@ public static HighriskSpecialPrefix fromJson( return objectMapper.readValue(json, HighriskSpecialPrefix.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -89,8 +85,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/Command.java b/src/main/java/com/twilio/rest/wireless/v1/Command.java index bd24d884ab..a31dadf565 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/Command.java +++ b/src/main/java/com/twilio/rest/wireless/v1/Command.java @@ -154,8 +154,6 @@ public static Command fromJson( return objectMapper.readValue(json, Command.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -176,8 +174,6 @@ public static Command fromJson( return objectMapper.readValue(json, Command.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -188,8 +184,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java b/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java index 8cc03a1111..c6d365091b 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java +++ b/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java @@ -96,8 +96,6 @@ public static RatePlan fromJson( return objectMapper.readValue(json, RatePlan.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -118,8 +116,6 @@ public static RatePlan fromJson( return objectMapper.readValue(json, RatePlan.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -130,8 +126,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/Sim.java b/src/main/java/com/twilio/rest/wireless/v1/Sim.java index 979c988828..acf6ab63af 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/Sim.java +++ b/src/main/java/com/twilio/rest/wireless/v1/Sim.java @@ -118,8 +118,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -140,8 +138,6 @@ public static Sim fromJson( return objectMapper.readValue(json, Sim.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -152,8 +148,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java b/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java index 33fc87b8e6..bc52e2f265 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java +++ b/src/main/java/com/twilio/rest/wireless/v1/UsageRecord.java @@ -77,8 +77,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +97,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -111,8 +107,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java b/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java index ceeb0b8dc0..544e947b4e 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java +++ b/src/main/java/com/twilio/rest/wireless/v1/sim/DataSession.java @@ -57,8 +57,6 @@ public static DataSession fromJson( return objectMapper.readValue(json, DataSession.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -79,8 +77,6 @@ public static DataSession fromJson( return objectMapper.readValue(json, DataSession.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -91,8 +87,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java b/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java index 687053eb57..08cb0c865f 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java +++ b/src/main/java/com/twilio/rest/wireless/v1/sim/UsageRecord.java @@ -77,8 +77,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -99,8 +97,6 @@ public static UsageRecord fromJson( return objectMapper.readValue(json, UsageRecord.class); } catch (final DatabindException | StreamReadException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } @@ -111,8 +107,6 @@ public static String toJson(Object object, ObjectMapper mapper) { throw new ApiException(e.getMessage(), e); } catch (JacksonException e) { throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); } } diff --git a/src/main/java/com/twilio/twiml/TwiML.java b/src/main/java/com/twilio/twiml/TwiML.java index a41f6836f9..772df0a82a 100644 --- a/src/main/java/com/twilio/twiml/TwiML.java +++ b/src/main/java/com/twilio/twiml/TwiML.java @@ -213,10 +213,10 @@ public static class Builder> { XML_INPUT_FACTORY.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); XML_INPUT_FACTORY.setProperty(XMLInputFactory.SUPPORT_DTD, false); } - protected static final ObjectMapper OBJECT_MAPPER = new XmlMapper( + protected static final ObjectMapper OBJECT_MAPPER = XmlMapper.builder( new XmlFactory(XML_INPUT_FACTORY, new WstxOutputFactory())) - .configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true) - .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + .build(); protected Map options = new HashMap<>(); protected List children = new ArrayList<>(); From 41472637b0ec5ccc50d7810f1bae09b6f6e5f0a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:46:54 +0000 Subject: [PATCH 4/5] Update README and fix test files for Jackson 3 Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com> --- README.md | 8 +++----- src/test/java/com/twilio/http/TwilioRestClientTest.java | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 83f37a29e6..b34862739b 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,12 @@ New accounts and subaccounts are now required to use TLS 1.2 when accessing the This library supports the following Java implementations: -- OpenJDK 8 -- OpenJDK 11 - OpenJDK 17 -- OracleJDK 8 -- OracleJDK 11 - OracleJDK 17 -For Java 7 support, use `twilio-java` major version `7.X.X`. +**Note:** As of version 12.0.0, this library requires **Java 17 or higher** due to the migration to Jackson 3.0. + +For Java 8-11 support, use `twilio-java` version `11.X.X`. ### Beta Annotation diff --git a/src/test/java/com/twilio/http/TwilioRestClientTest.java b/src/test/java/com/twilio/http/TwilioRestClientTest.java index f4ef700885..3e45e5ac54 100644 --- a/src/test/java/com/twilio/http/TwilioRestClientTest.java +++ b/src/test/java/com/twilio/http/TwilioRestClientTest.java @@ -7,7 +7,6 @@ import static org.mockito.Mockito.when; import tools.jackson.databind.ObjectMapper; -import tools.jackson.datatype.jsr310.JavaTimeModule; import com.twilio.auth_strategy.BasicAuthStrategy; import com.twilio.auth_strategy.NoAuthStrategy; import com.twilio.rest.Domains; @@ -62,7 +61,7 @@ public void testRequestWithCustomObjectMapper() { URI ); TwilioRestClient client = new TwilioRestClient.Builder(USER_NAME, TOKEN) - .objectMapper(new ObjectMapper().registerModule(new JavaTimeModule())) + .objectMapper(new ObjectMapper()) .httpClient(httpClient) .build(); From 1d047c10f5fbd3f4226df6f1ad05da63414011a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 08:52:23 +0000 Subject: [PATCH 5/5] Address code review feedback - add exception handling for Jackson 3 Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com> --- src/main/java/com/twilio/base/Page.java | 30 +++++++++++-------- .../com/twilio/base/TokenPaginationPage.java | 29 +++++++++++------- .../java/com/twilio/converter/Converter.java | 6 +++- 3 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/twilio/base/Page.java b/src/main/java/com/twilio/base/Page.java index 7d94e8da07..23b58749b5 100644 --- a/src/main/java/com/twilio/base/Page.java +++ b/src/main/java/com/twilio/base/Page.java @@ -1,8 +1,10 @@ package com.twilio.base; import tools.jackson.databind.JsonNode; +import tools.jackson.core.JacksonException; import tools.jackson.databind.ObjectMapper; import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; import java.io.IOException; import java.util.ArrayList; @@ -124,18 +126,22 @@ public boolean hasNextPage() { * @return a page of records of type T */ public static Page fromJson(String recordKey, String json, Class recordType, ObjectMapper mapper) { - List results = new ArrayList<>(); - JsonNode root = mapper.readTree(json); - JsonNode records = root.get(recordKey); - for (final JsonNode record : records) { - results.add(mapper.readValue(record.toString(), recordType)); - } - - JsonNode uriNode = root.get("uri"); - if (uriNode != null) { - return buildPage(root, results); - } else { - return buildNextGenPage(root, results); + try { + List results = new ArrayList<>(); + JsonNode root = mapper.readTree(json); + JsonNode records = root.get(recordKey); + for (final JsonNode record : records) { + results.add(mapper.readValue(record.toString(), recordType)); + } + + JsonNode uriNode = root.get("uri"); + if (uriNode != null) { + return buildPage(root, results); + } else { + return buildNextGenPage(root, results); + } + } catch (JacksonException e) { + throw new ApiException("Unable to deserialize response: " + e.getMessage() + "\nJSON: " + json, e); } } diff --git a/src/main/java/com/twilio/base/TokenPaginationPage.java b/src/main/java/com/twilio/base/TokenPaginationPage.java index 2668e8dab3..c81e028ba2 100644 --- a/src/main/java/com/twilio/base/TokenPaginationPage.java +++ b/src/main/java/com/twilio/base/TokenPaginationPage.java @@ -1,6 +1,7 @@ package com.twilio.base; import tools.jackson.databind.JsonNode; +import tools.jackson.core.JacksonException; import tools.jackson.databind.ObjectMapper; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -86,19 +87,25 @@ public boolean hasNextPage() { * @return a page of records of type T */ public static TokenPaginationPage fromJson(String recordKey, String json, Class recordType, ObjectMapper mapper) { - List results = new ArrayList<>(); - JsonNode root = mapper.readTree(json); try { - JsonNode meta = root.get("meta"); - String key = meta.get("key").asText(); - JsonNode records = root.get(key); - for (final JsonNode record : records) { - results.add(mapper.readValue(record.toString(), recordType)); + List results = new ArrayList<>(); + JsonNode root = mapper.readTree(json); + try { + JsonNode meta = root.get("meta"); + String key = meta.get("key").asText(); + JsonNode records = root.get(key); + for (final JsonNode record : records) { + results.add(mapper.readValue(record.toString(), recordType)); + } + + return buildPage(meta, results); + } catch (NullPointerException e) { + throw new ApiException("Key not found", e); } - - return buildPage(meta, results); - } catch (NullPointerException e) { - throw new ApiException("Key not found", e); + } catch (JacksonException e) { + throw new ApiConnectionException( + "Unable to deserialize response: " + e.getMessage() + "\nJSON: " + json, e + ); } } diff --git a/src/main/java/com/twilio/converter/Converter.java b/src/main/java/com/twilio/converter/Converter.java index 8767cb699c..84f663d94b 100644 --- a/src/main/java/com/twilio/converter/Converter.java +++ b/src/main/java/com/twilio/converter/Converter.java @@ -81,7 +81,11 @@ public static String mapToJson(final Map map) { * @return HashMap read */ public static Map jsonToMap(final String json) { - return MAPPER.readValue(json, HashMap.class); + try { + return MAPPER.readValue(json, HashMap.class); + } catch (JacksonException e) { + return null; + } } }