From 408db80d3f27e4b4c848e65a949795e329bb15b4 Mon Sep 17 00:00:00 2001 From: Twilio DX Date: Wed, 26 Aug 2026 14:00:50 +0530 Subject: [PATCH 1/7] [Librarian] Regenerated @ f443c9dfa233e41d0e61c9ed6ca2b162467a08b5 3e707bb96c6f47c65f8fdd9264d2a5340093b8ac --- CHANGES.md | 265 +++ src/main/java/com/twilio/Domains.java | 1 - .../v1/AuthTokenPromotionUpdater.java | 25 + .../twilio/rest/accounts/v1/BulkConsents.java | 2 +- .../twilio/rest/accounts/v1/BulkContacts.java | 2 +- .../accounts/v1/MessagingGeopermissions.java | 2 +- .../v1/MessagingGeopermissionsFetcher.java | 3 +- .../v1/MessagingGeopermissionsUpdater.java | 3 +- .../v1/SecondaryAuthTokenCreator.java | 25 + .../v1/SecondaryAuthTokenDeleter.java | 23 + .../api/v2010/account/AddressCreator.java | 9 +- .../api/v2010/account/AddressDeleter.java | 9 +- .../api/v2010/account/AddressFetcher.java | 9 +- .../rest/api/v2010/account/AddressReader.java | 9 +- .../api/v2010/account/AddressUpdater.java | 9 +- .../api/v2010/account/ApplicationCreator.java | 9 +- .../api/v2010/account/ApplicationDeleter.java | 9 +- .../api/v2010/account/ApplicationFetcher.java | 9 +- .../api/v2010/account/ApplicationReader.java | 9 +- .../api/v2010/account/ApplicationUpdater.java | 9 +- .../v2010/account/AuthorizedConnectApp.java | 6 +- .../account/AuthorizedConnectAppFetcher.java | 18 +- .../account/AuthorizedConnectAppReader.java | 9 +- .../AvailablePhoneNumberCountryFetcher.java | 21 +- .../AvailablePhoneNumberCountryReader.java | 12 +- .../api/v2010/account/BalanceFetcher.java | 9 +- .../rest/api/v2010/account/CallCreator.java | 24 +- .../rest/api/v2010/account/CallDeleter.java | 9 +- .../rest/api/v2010/account/CallFetcher.java | 9 +- .../rest/api/v2010/account/CallReader.java | 9 +- .../rest/api/v2010/account/CallUpdater.java | 9 +- .../api/v2010/account/ConferenceFetcher.java | 9 +- .../api/v2010/account/ConferenceReader.java | 9 +- .../api/v2010/account/ConferenceUpdater.java | 9 +- .../rest/api/v2010/account/ConnectApp.java | 6 +- .../api/v2010/account/ConnectAppDeleter.java | 9 +- .../api/v2010/account/ConnectAppFetcher.java | 9 +- .../api/v2010/account/ConnectAppReader.java | 9 +- .../api/v2010/account/ConnectAppUpdater.java | 9 +- .../account/IncomingPhoneNumberCreator.java | 9 +- .../account/IncomingPhoneNumberDeleter.java | 9 +- .../account/IncomingPhoneNumberFetcher.java | 9 +- .../account/IncomingPhoneNumberReader.java | 9 +- .../account/IncomingPhoneNumberUpdater.java | 9 +- .../rest/api/v2010/account/KeyDeleter.java | 9 +- .../rest/api/v2010/account/KeyFetcher.java | 9 +- .../rest/api/v2010/account/KeyReader.java | 9 +- .../rest/api/v2010/account/KeyUpdater.java | 9 +- .../api/v2010/account/MessageCreator.java | 9 +- .../api/v2010/account/MessageDeleter.java | 9 +- .../api/v2010/account/MessageFetcher.java | 9 +- .../rest/api/v2010/account/MessageReader.java | 9 +- .../api/v2010/account/MessageUpdater.java | 9 +- .../rest/api/v2010/account/NewKeyCreator.java | 9 +- .../v2010/account/NewSigningKeyCreator.java | 9 +- .../v2010/account/NotificationFetcher.java | 9 +- .../api/v2010/account/NotificationReader.java | 9 +- .../account/OutgoingCallerIdDeleter.java | 9 +- .../account/OutgoingCallerIdFetcher.java | 9 +- .../v2010/account/OutgoingCallerIdReader.java | 9 +- .../account/OutgoingCallerIdUpdater.java | 9 +- .../rest/api/v2010/account/QueueCreator.java | 9 +- .../rest/api/v2010/account/QueueDeleter.java | 9 +- .../rest/api/v2010/account/QueueFetcher.java | 9 +- .../rest/api/v2010/account/QueueReader.java | 9 +- .../rest/api/v2010/account/QueueUpdater.java | 9 +- .../api/v2010/account/RecordingDeleter.java | 9 +- .../api/v2010/account/RecordingFetcher.java | 9 +- .../api/v2010/account/RecordingReader.java | 9 +- .../api/v2010/account/ShortCodeFetcher.java | 9 +- .../api/v2010/account/ShortCodeReader.java | 9 +- .../api/v2010/account/ShortCodeUpdater.java | 9 +- .../api/v2010/account/SigningKeyDeleter.java | 9 +- .../api/v2010/account/SigningKeyFetcher.java | 9 +- .../api/v2010/account/SigningKeyReader.java | 9 +- .../api/v2010/account/SigningKeyUpdater.java | 9 +- .../rest/api/v2010/account/TokenCreator.java | 9 +- .../v2010/account/TranscriptionDeleter.java | 9 +- .../v2010/account/TranscriptionFetcher.java | 9 +- .../v2010/account/TranscriptionReader.java | 9 +- .../account/ValidationRequestCreator.java | 9 +- .../address/DependentPhoneNumberReader.java | 18 +- .../LocalReader.java | 18 +- .../MachineToMachineReader.java | 18 +- .../MobileReader.java | 18 +- .../NationalReader.java | 18 +- .../SharedCostReader.java | 18 +- .../TollFreeReader.java | 18 +- .../VoipReader.java | 18 +- .../api/v2010/account/call/EventReader.java | 9 +- .../account/call/NotificationFetcher.java | 9 +- .../account/call/NotificationReader.java | 9 +- .../v2010/account/call/PaymentCreator.java | 9 +- .../v2010/account/call/PaymentUpdater.java | 9 +- .../v2010/account/call/RecordingCreator.java | 9 +- .../v2010/account/call/RecordingDeleter.java | 9 +- .../v2010/account/call/RecordingFetcher.java | 9 +- .../v2010/account/call/RecordingReader.java | 9 +- .../v2010/account/call/RecordingUpdater.java | 9 +- .../api/v2010/account/call/SiprecCreator.java | 9 +- .../api/v2010/account/call/SiprecUpdater.java | 9 +- .../api/v2010/account/call/StreamCreator.java | 9 +- .../api/v2010/account/call/StreamUpdater.java | 9 +- .../account/call/TranscriptionCreator.java | 9 +- .../account/call/TranscriptionUpdater.java | 9 +- .../call/UserDefinedMessageCreator.java | 9 +- ...UserDefinedMessageSubscriptionCreator.java | 12 +- ...UserDefinedMessageSubscriptionDeleter.java | 12 +- .../conference/ParticipantCreator.java | 163 +- .../conference/ParticipantDeleter.java | 18 +- .../conference/ParticipantFetcher.java | 18 +- .../account/conference/ParticipantReader.java | 18 +- .../conference/ParticipantUpdater.java | 18 +- .../account/conference/RecordingDeleter.java | 18 +- .../account/conference/RecordingFetcher.java | 18 +- .../account/conference/RecordingReader.java | 18 +- .../account/conference/RecordingUpdater.java | 18 +- .../AssignedAddOnCreator.java | 18 +- .../AssignedAddOnDeleter.java | 18 +- .../AssignedAddOnFetcher.java | 18 +- .../AssignedAddOnReader.java | 18 +- .../incomingphonenumber/LocalCreator.java | 9 +- .../incomingphonenumber/LocalReader.java | 9 +- .../incomingphonenumber/MobileCreator.java | 9 +- .../incomingphonenumber/MobileReader.java | 9 +- .../incomingphonenumber/TollFreeCreator.java | 9 +- .../incomingphonenumber/TollFreeReader.java | 9 +- .../AssignedAddOnExtensionFetcher.java | 30 +- .../AssignedAddOnExtensionReader.java | 30 +- .../account/message/FeedbackCreator.java | 18 +- .../v2010/account/message/MediaDeleter.java | 18 +- .../v2010/account/message/MediaFetcher.java | 18 +- .../v2010/account/message/MediaReader.java | 18 +- .../v2010/account/queue/MemberFetcher.java | 15 +- .../api/v2010/account/queue/MemberReader.java | 15 +- .../v2010/account/queue/MemberUpdater.java | 15 +- .../account/recording/AddOnResultDeleter.java | 18 +- .../account/recording/AddOnResultFetcher.java | 18 +- .../account/recording/AddOnResultReader.java | 18 +- .../recording/TranscriptionDeleter.java | 18 +- .../recording/TranscriptionFetcher.java | 18 +- .../recording/TranscriptionReader.java | 18 +- .../recording/addonresult/PayloadDeleter.java | 27 +- .../recording/addonresult/PayloadFetcher.java | 27 +- .../recording/addonresult/PayloadReader.java | 27 +- .../recording/addonresult/payload/Data.java | 2 +- .../addonresult/payload/DataFetcher.java | 36 +- .../account/sip/CredentialListCreator.java | 9 +- .../account/sip/CredentialListDeleter.java | 9 +- .../account/sip/CredentialListFetcher.java | 9 +- .../account/sip/CredentialListReader.java | 9 +- .../account/sip/CredentialListUpdater.java | 9 +- .../api/v2010/account/sip/DomainCreator.java | 9 +- .../api/v2010/account/sip/DomainDeleter.java | 9 +- .../api/v2010/account/sip/DomainFetcher.java | 9 +- .../api/v2010/account/sip/DomainReader.java | 9 +- .../api/v2010/account/sip/DomainUpdater.java | 9 +- .../sip/IpAccessControlListCreator.java | 9 +- .../sip/IpAccessControlListDeleter.java | 9 +- .../sip/IpAccessControlListFetcher.java | 9 +- .../sip/IpAccessControlListReader.java | 9 +- .../sip/IpAccessControlListUpdater.java | 9 +- .../sip/credentiallist/CredentialCreator.java | 18 +- .../sip/credentiallist/CredentialDeleter.java | 18 +- .../sip/credentiallist/CredentialFetcher.java | 18 +- .../sip/credentiallist/CredentialReader.java | 18 +- .../sip/credentiallist/CredentialUpdater.java | 18 +- .../domain/CredentialListMappingCreator.java | 21 +- .../domain/CredentialListMappingDeleter.java | 21 +- .../domain/CredentialListMappingFetcher.java | 21 +- .../domain/CredentialListMappingReader.java | 18 +- .../IpAccessControlListMappingCreator.java | 21 +- .../IpAccessControlListMappingDeleter.java | 21 +- .../IpAccessControlListMappingFetcher.java | 21 +- .../IpAccessControlListMappingReader.java | 21 +- ...AuthCallsCredentialListMappingCreator.java | 21 +- ...AuthCallsCredentialListMappingDeleter.java | 21 +- ...AuthCallsCredentialListMappingFetcher.java | 21 +- .../AuthCallsCredentialListMappingReader.java | 21 +- ...allsIpAccessControlListMappingCreator.java | 27 +- ...allsIpAccessControlListMappingDeleter.java | 21 +- ...allsIpAccessControlListMappingFetcher.java | 27 +- ...CallsIpAccessControlListMappingReader.java | 27 +- ...strationsCredentialListMappingCreator.java | 27 +- ...strationsCredentialListMappingDeleter.java | 21 +- ...strationsCredentialListMappingFetcher.java | 27 +- ...istrationsCredentialListMappingReader.java | 27 +- .../ipaccesscontrollist/IpAddressCreator.java | 18 +- .../ipaccesscontrollist/IpAddressDeleter.java | 18 +- .../ipaccesscontrollist/IpAddressFetcher.java | 18 +- .../ipaccesscontrollist/IpAddressReader.java | 18 +- .../ipaccesscontrollist/IpAddressUpdater.java | 18 +- .../api/v2010/account/usage/RecordReader.java | 9 +- .../v2010/account/usage/TriggerCreator.java | 9 +- .../v2010/account/usage/TriggerDeleter.java | 9 +- .../v2010/account/usage/TriggerFetcher.java | 9 +- .../v2010/account/usage/TriggerReader.java | 9 +- .../v2010/account/usage/TriggerUpdater.java | 9 +- .../account/usage/record/AllTimeReader.java | 9 +- .../account/usage/record/DailyReader.java | 9 +- .../account/usage/record/LastMonthReader.java | 9 +- .../account/usage/record/MonthlyReader.java | 9 +- .../account/usage/record/ThisMonthReader.java | 9 +- .../account/usage/record/TodayReader.java | 9 +- .../account/usage/record/YearlyReader.java | 9 +- .../account/usage/record/YesterdayReader.java | 9 +- .../twilio/rest/assistants/v1/Assistant.java | 1242 ------------- .../rest/assistants/v1/AssistantReader.java | 202 --- .../twilio/rest/assistants/v1/Knowledge.java | 733 -------- .../rest/assistants/v1/KnowledgeReader.java | 217 --- .../rest/assistants/v1/SessionReader.java | 202 --- .../com/twilio/rest/assistants/v1/Tool.java | 977 ----------- .../twilio/rest/assistants/v1/ToolReader.java | 213 --- .../assistant/AssistantsKnowledgeDeleter.java | 107 -- .../assistant/AssistantsKnowledgeReader.java | 213 --- .../v1/assistant/AssistantsToolReader.java | 211 --- .../v1/assistant/FeedbackReader.java | 207 --- .../rest/assistants/v1/assistant/Message.java | 323 ---- .../assistants/v1/knowledge/ChunkReader.java | 203 --- .../assistants/v1/session/MessageReader.java | 211 --- .../v1/ExportConfigurationFetcher.java | 9 +- .../v1/ExportConfigurationUpdater.java | 9 +- .../rest/bulkexports/v1/ExportFetcher.java | 9 +- .../bulkexports/v1/export/DayFetcher.java | 9 +- .../rest/bulkexports/v1/export/DayReader.java | 9 +- .../v1/export/ExportCustomJobCreator.java | 9 +- .../v1/export/ExportCustomJobReader.java | 9 +- .../rest/chat/v1/service/ChannelCreator.java | 9 +- .../rest/chat/v1/service/ChannelDeleter.java | 9 +- .../rest/chat/v1/service/ChannelFetcher.java | 9 +- .../rest/chat/v1/service/ChannelReader.java | 9 +- .../rest/chat/v1/service/ChannelUpdater.java | 9 +- .../rest/chat/v1/service/RoleCreator.java | 9 +- .../rest/chat/v1/service/RoleDeleter.java | 9 +- .../rest/chat/v1/service/RoleFetcher.java | 9 +- .../rest/chat/v1/service/RoleReader.java | 9 +- .../rest/chat/v1/service/RoleUpdater.java | 9 +- .../rest/chat/v1/service/UserCreator.java | 9 +- .../rest/chat/v1/service/UserDeleter.java | 9 +- .../rest/chat/v1/service/UserFetcher.java | 9 +- .../rest/chat/v1/service/UserReader.java | 9 +- .../rest/chat/v1/service/UserUpdater.java | 9 +- .../v1/service/channel/InviteCreator.java | 18 +- .../v1/service/channel/InviteDeleter.java | 18 +- .../v1/service/channel/InviteFetcher.java | 18 +- .../chat/v1/service/channel/InviteReader.java | 18 +- .../v1/service/channel/MemberCreator.java | 18 +- .../v1/service/channel/MemberDeleter.java | 18 +- .../v1/service/channel/MemberFetcher.java | 18 +- .../chat/v1/service/channel/MemberReader.java | 18 +- .../v1/service/channel/MemberUpdater.java | 18 +- .../v1/service/channel/MessageCreator.java | 18 +- .../v1/service/channel/MessageDeleter.java | 18 +- .../v1/service/channel/MessageFetcher.java | 18 +- .../v1/service/channel/MessageReader.java | 18 +- .../v1/service/channel/MessageUpdater.java | 18 +- .../v1/service/user/UserChannelReader.java | 9 +- .../rest/chat/v2/service/BindingDeleter.java | 9 +- .../rest/chat/v2/service/BindingFetcher.java | 9 +- .../rest/chat/v2/service/BindingReader.java | 9 +- .../rest/chat/v2/service/ChannelCreator.java | 9 +- .../rest/chat/v2/service/ChannelDeleter.java | 9 +- .../rest/chat/v2/service/ChannelFetcher.java | 9 +- .../rest/chat/v2/service/ChannelReader.java | 9 +- .../rest/chat/v2/service/ChannelUpdater.java | 9 +- .../rest/chat/v2/service/RoleCreator.java | 9 +- .../rest/chat/v2/service/RoleDeleter.java | 9 +- .../rest/chat/v2/service/RoleFetcher.java | 9 +- .../rest/chat/v2/service/RoleReader.java | 9 +- .../rest/chat/v2/service/RoleUpdater.java | 9 +- .../rest/chat/v2/service/UserCreator.java | 9 +- .../rest/chat/v2/service/UserDeleter.java | 9 +- .../rest/chat/v2/service/UserFetcher.java | 9 +- .../rest/chat/v2/service/UserReader.java | 9 +- .../rest/chat/v2/service/UserUpdater.java | 9 +- .../v2/service/channel/InviteCreator.java | 18 +- .../v2/service/channel/InviteDeleter.java | 18 +- .../v2/service/channel/InviteFetcher.java | 18 +- .../chat/v2/service/channel/InviteReader.java | 18 +- .../v2/service/channel/MemberCreator.java | 18 +- .../v2/service/channel/MemberDeleter.java | 18 +- .../v2/service/channel/MemberFetcher.java | 18 +- .../chat/v2/service/channel/MemberReader.java | 18 +- .../v2/service/channel/MemberUpdater.java | 18 +- .../v2/service/channel/MessageCreator.java | 18 +- .../v2/service/channel/MessageDeleter.java | 18 +- .../v2/service/channel/MessageFetcher.java | 18 +- .../v2/service/channel/MessageReader.java | 18 +- .../v2/service/channel/MessageUpdater.java | 18 +- .../v2/service/channel/WebhookCreator.java | 18 +- .../v2/service/channel/WebhookDeleter.java | 18 +- .../v2/service/channel/WebhookFetcher.java | 18 +- .../v2/service/channel/WebhookReader.java | 18 +- .../v2/service/channel/WebhookUpdater.java | 18 +- .../v2/service/user/UserBindingDeleter.java | 9 +- .../v2/service/user/UserBindingFetcher.java | 9 +- .../v2/service/user/UserBindingReader.java | 9 +- .../v2/service/user/UserChannelDeleter.java | 18 +- .../v2/service/user/UserChannelFetcher.java | 18 +- .../v2/service/user/UserChannelReader.java | 9 +- .../v2/service/user/UserChannelUpdater.java | 18 +- .../twilio/rest/chat/v3/ChannelUpdater.java | 9 +- .../com/twilio/rest/content/v1/Content.java | 85 +- .../content/v1/content/ApprovalCreate.java | 30 +- .../v1/content/ApprovalCreateCreator.java | 9 +- .../ConversationWithParticipantsCreator.java | 3 +- .../v1/ParticipantConversationReader.java | 3 +- .../v1/conversation/MessageCreator.java | 9 +- .../v1/conversation/MessageDeleter.java | 9 +- .../v1/conversation/MessageFetcher.java | 9 +- .../v1/conversation/MessageReader.java | 9 +- .../v1/conversation/MessageUpdater.java | 9 +- .../v1/conversation/ParticipantCreator.java | 9 +- .../v1/conversation/ParticipantDeleter.java | 9 +- .../v1/conversation/ParticipantFetcher.java | 9 +- .../v1/conversation/ParticipantReader.java | 9 +- .../v1/conversation/ParticipantUpdater.java | 9 +- .../v1/conversation/WebhookCreator.java | 9 +- .../v1/conversation/WebhookDeleter.java | 9 +- .../v1/conversation/WebhookFetcher.java | 9 +- .../v1/conversation/WebhookReader.java | 9 +- .../v1/conversation/WebhookUpdater.java | 9 +- .../message/DeliveryReceiptFetcher.java | 18 +- .../message/DeliveryReceiptReader.java | 18 +- .../v1/service/BindingDeleter.java | 9 +- .../v1/service/BindingFetcher.java | 9 +- .../v1/service/BindingReader.java | 9 +- .../v1/service/ConfigurationFetcher.java | 9 +- .../v1/service/ConfigurationUpdater.java | 9 +- .../v1/service/ConversationCreator.java | 9 +- .../v1/service/ConversationDeleter.java | 9 +- .../v1/service/ConversationFetcher.java | 9 +- .../v1/service/ConversationReader.java | 9 +- .../v1/service/ConversationUpdater.java | 9 +- .../ConversationWithParticipantsCreator.java | 12 +- .../ParticipantConversationReader.java | 12 +- .../conversations/v1/service/RoleCreator.java | 9 +- .../conversations/v1/service/RoleDeleter.java | 9 +- .../conversations/v1/service/RoleFetcher.java | 9 +- .../conversations/v1/service/RoleReader.java | 9 +- .../conversations/v1/service/RoleUpdater.java | 9 +- .../conversations/v1/service/UserCreator.java | 9 +- .../conversations/v1/service/UserDeleter.java | 9 +- .../conversations/v1/service/UserFetcher.java | 9 +- .../conversations/v1/service/UserReader.java | 9 +- .../conversations/v1/service/UserUpdater.java | 9 +- .../configuration/NotificationFetcher.java | 9 +- .../configuration/NotificationUpdater.java | 9 +- .../service/configuration/WebhookFetcher.java | 9 +- .../service/configuration/WebhookUpdater.java | 9 +- .../service/conversation/MessageCreator.java | 18 +- .../service/conversation/MessageDeleter.java | 18 +- .../service/conversation/MessageFetcher.java | 18 +- .../service/conversation/MessageReader.java | 18 +- .../service/conversation/MessageUpdater.java | 18 +- .../conversation/ParticipantCreator.java | 18 +- .../conversation/ParticipantDeleter.java | 18 +- .../conversation/ParticipantFetcher.java | 18 +- .../conversation/ParticipantReader.java | 18 +- .../conversation/ParticipantUpdater.java | 18 +- .../service/conversation/WebhookCreator.java | 18 +- .../service/conversation/WebhookDeleter.java | 18 +- .../service/conversation/WebhookFetcher.java | 18 +- .../service/conversation/WebhookReader.java | 18 +- .../service/conversation/WebhookUpdater.java | 18 +- .../message/DeliveryReceiptFetcher.java | 27 +- .../message/DeliveryReceiptReader.java | 27 +- .../service/user/UserConversationDeleter.java | 18 +- .../service/user/UserConversationFetcher.java | 18 +- .../service/user/UserConversationReader.java | 9 +- .../service/user/UserConversationUpdater.java | 18 +- .../v1/user/UserConversationDeleter.java | 9 +- .../v1/user/UserConversationFetcher.java | 9 +- .../v1/user/UserConversationUpdater.java | 9 +- .../twilio/rest/conversations/v2/Action.java | 74 +- .../rest/conversations/v2/ActionCreator.java | 9 +- .../rest/conversations/v2/ActionFetcher.java | 26 +- .../rest/conversations/v2/Communication.java | 1561 +++++++++-------- .../v2/CommunicationCreator.java | 26 +- .../v2/CommunicationFetcher.java | 46 +- .../conversations/v2/CommunicationReader.java | 48 +- .../rest/conversations/v2/Configuration.java | 285 ++- .../v2/ConfigurationCreator.java | 9 +- .../v2/ConfigurationDeleter.java | 30 +- .../v2/ConfigurationFetcher.java | 30 +- .../conversations/v2/ConfigurationReader.java | 9 +- .../v2/ConfigurationUpdater.java | 30 +- .../rest/conversations/v2/Conversation.java | 284 ++- .../conversations/v2/ConversationCreator.java | 9 +- .../conversations/v2/ConversationDeleter.java | 30 +- .../conversations/v2/ConversationFetcher.java | 30 +- .../conversations/v2/ConversationPatcher.java | 24 +- .../conversations/v2/ConversationReader.java | 9 +- .../conversations/v2/ConversationUpdater.java | 30 +- .../rest/conversations/v2/Operation.java | 31 +- .../conversations/v2/OperationFetcher.java | 24 +- .../rest/conversations/v2/Participant.java | 396 +++-- .../conversations/v2/ParticipantCreator.java | 26 +- .../conversations/v2/ParticipantFetcher.java | 45 +- .../conversations/v2/ParticipantReader.java | 48 +- .../conversations/v2/ParticipantUpdater.java | 45 +- .../v1/schema/SchemaVersionFetcher.java | 9 +- .../twilio/rest/events/v1/sink/SinkTest.java | 2 +- .../rest/events/v1/sink/SinkValidate.java | 2 +- .../subscription/SubscribedEventCreator.java | 9 +- .../subscription/SubscribedEventDeleter.java | 9 +- .../subscription/SubscribedEventFetcher.java | 9 +- .../subscription/SubscribedEventReader.java | 9 +- .../subscription/SubscribedEventUpdater.java | 9 +- .../rest/flexapi/v1/AssessmentsUpdater.java | 9 +- .../twilio/rest/flexapi/v1/Configuration.java | 12 +- .../v1/InsightsAssessmentsCommentCreator.java | 3 +- .../v1/InsightsAssessmentsCommentReader.java | 3 +- ...InsightsQuestionnairesCategoryCreator.java | 3 +- ...InsightsQuestionnairesCategoryDeleter.java | 12 +- .../InsightsQuestionnairesCategoryReader.java | 3 +- ...InsightsQuestionnairesCategoryUpdater.java | 12 +- .../v1/InsightsQuestionnairesCreator.java | 3 +- .../v1/InsightsQuestionnairesDeleter.java | 12 +- .../v1/InsightsQuestionnairesFetcher.java | 12 +- ...InsightsQuestionnairesQuestionCreator.java | 3 +- ...InsightsQuestionnairesQuestionDeleter.java | 12 +- .../InsightsQuestionnairesQuestionReader.java | 3 +- ...InsightsQuestionnairesQuestionUpdater.java | 12 +- .../v1/InsightsQuestionnairesReader.java | 3 +- .../v1/InsightsQuestionnairesUpdater.java | 12 +- .../v1/InsightsSettingsAnswerSetsFetcher.java | 3 +- .../v1/InsightsSettingsCommentFetcher.java | 3 +- .../v1/PluginConfigurationArchiveUpdater.java | 3 +- .../v1/PluginVersionArchiveUpdater.java | 9 +- .../InteractionChannelFetcher.java | 9 +- .../interaction/InteractionChannelReader.java | 9 +- .../InteractionChannelUpdater.java | 9 +- .../InteractionChannelInviteCreator.java | 21 +- .../InteractionChannelInviteReader.java | 21 +- .../InteractionChannelParticipantCreator.java | 21 +- .../InteractionChannelParticipantReader.java | 21 +- .../InteractionChannelParticipantUpdater.java | 21 +- .../InteractionTransferCreator.java | 18 +- .../InteractionTransferFetcher.java | 18 +- .../InteractionTransferUpdater.java | 18 +- .../v1/plugin/PluginVersionsCreator.java | 9 +- .../v1/plugin/PluginVersionsFetcher.java | 9 +- .../v1/plugin/PluginVersionsReader.java | 9 +- .../ConfiguredPluginFetcher.java | 18 +- .../ConfiguredPluginReader.java | 9 +- .../rest/flexapi/v2/FlexUserFetcher.java | 18 +- .../rest/flexapi/v2/FlexUserUpdater.java | 18 +- .../com/twilio/rest/iam/v1/NewApiKey.java | 22 - .../twilio/rest/iam/v1/NewApiKeyCreator.java | 4 +- .../java/com/twilio/rest/iam/v1/OAuthApp.java | 63 + .../rest/insights/v1/CallSummaries.java | 683 ++++++++ .../rest/insights/v1/ConferenceFetcher.java | 9 +- .../rest/insights/v1/call/CallSummary.java | 683 ++++++++ .../twilio/rest/insights/v1/call/Event.java | 989 +++++++++++ .../v1/conference/ConferenceParticipant.java | 6 +- .../ConferenceParticipantFetcher.java | 21 +- .../ConferenceParticipantReader.java | 9 +- .../insights/v1/room/ParticipantFetcher.java | 9 +- .../com/twilio/rest/insights/v2/Inbound.java | 12 + .../rest/insights/v2/InboundReader.java | 6 +- .../com/twilio/rest/insights/v2/Outbound.java | 24 +- .../rest/insights/v2/OutboundReader.java | 6 +- .../com/twilio/rest/insights/v2/Report.java | 56 +- .../rest/insights/v2/ReportFetcher.java | 6 +- .../com/twilio/rest/insights/v3/Metadata.java | 30 +- .../rest/insights/v3/MetadataFetcher.java | 13 +- .../com/twilio/rest/insights/v3/Query.java | 24 +- .../twilio/rest/insights/v3/QueryCreator.java | 2 +- .../twilio/rest/insights/v3/QueryFetcher.java | 13 +- .../v2/OperatorAttachmentCreator.java | 18 +- .../v2/OperatorAttachmentDeleter.java | 18 +- .../v2/OperatorAttachmentsFetcher.java | 9 +- .../rest/intelligence/v2/OperatorType.java | 6 +- .../twilio/rest/intelligence/v2/Service.java | 6 +- .../EncryptedOperatorResultsFetcher.java | 12 +- .../transcript/EncryptedSentencesFetcher.java | 9 +- .../v2/transcript/OperatorResultFetcher.java | 18 +- .../v2/transcript/OperatorResultReader.java | 9 +- .../v2/transcript/SentenceReader.java | 9 +- .../rest/intelligence/v3/Configuration.java | 46 +- .../intelligence/v3/ConfigurationCreator.java | 9 +- .../intelligence/v3/ConfigurationDeleter.java | 11 - .../intelligence/v3/ConfigurationFetcher.java | 20 +- .../intelligence/v3/ConfigurationReader.java | 9 +- .../intelligence/v3/ConfigurationUpdater.java | 20 +- .../rest/intelligence/v3/Conversation.java | 68 +- .../intelligence/v3/ConversationFetcher.java | 20 +- .../intelligence/v3/ConversationReader.java | 9 +- .../twilio/rest/intelligence/v3/Operator.java | 42 +- .../rest/intelligence/v3/OperatorDeleter.java | 11 - .../rest/intelligence/v3/OperatorFetcher.java | 11 - .../rest/intelligence/v3/OperatorResult.java | 238 +-- .../v3/OperatorResultDeleter.java | 20 +- .../v3/OperatorResultFetcher.java | 29 +- .../intelligence/v3/OperatorResultReader.java | 9 +- .../rest/intelligence/v3/OperatorUpdater.java | 11 - .../rest/intelligence/v3/RuleExecution.java | 482 +++++ .../intelligence/v3/RuleExecutionCreator.java | 121 ++ .../twilio/rest/intelligence/v3/Version.java | 26 +- .../rest/intelligence/v3/VersionFetcher.java | 11 - .../v1/service/ChannelCreator.java | 9 +- .../v1/service/ChannelDeleter.java | 9 +- .../v1/service/ChannelFetcher.java | 9 +- .../ipmessaging/v1/service/ChannelReader.java | 9 +- .../v1/service/ChannelUpdater.java | 9 +- .../ipmessaging/v1/service/RoleCreator.java | 9 +- .../ipmessaging/v1/service/RoleDeleter.java | 9 +- .../ipmessaging/v1/service/RoleFetcher.java | 9 +- .../ipmessaging/v1/service/RoleReader.java | 9 +- .../ipmessaging/v1/service/RoleUpdater.java | 9 +- .../ipmessaging/v1/service/UserCreator.java | 9 +- .../ipmessaging/v1/service/UserDeleter.java | 9 +- .../ipmessaging/v1/service/UserFetcher.java | 9 +- .../ipmessaging/v1/service/UserReader.java | 9 +- .../ipmessaging/v1/service/UserUpdater.java | 9 +- .../v1/service/channel/InviteCreator.java | 18 +- .../v1/service/channel/InviteDeleter.java | 18 +- .../v1/service/channel/InviteFetcher.java | 18 +- .../v1/service/channel/InviteReader.java | 18 +- .../v1/service/channel/MemberCreator.java | 18 +- .../v1/service/channel/MemberDeleter.java | 18 +- .../v1/service/channel/MemberFetcher.java | 18 +- .../v1/service/channel/MemberReader.java | 18 +- .../v1/service/channel/MemberUpdater.java | 18 +- .../v1/service/channel/MessageCreator.java | 18 +- .../v1/service/channel/MessageDeleter.java | 18 +- .../v1/service/channel/MessageFetcher.java | 18 +- .../v1/service/channel/MessageReader.java | 18 +- .../v1/service/channel/MessageUpdater.java | 18 +- .../v1/service/user/UserChannelReader.java | 9 +- .../v2/service/BindingDeleter.java | 9 +- .../v2/service/BindingFetcher.java | 9 +- .../ipmessaging/v2/service/BindingReader.java | 9 +- .../v2/service/ChannelCreator.java | 9 +- .../v2/service/ChannelDeleter.java | 9 +- .../v2/service/ChannelFetcher.java | 9 +- .../ipmessaging/v2/service/ChannelReader.java | 9 +- .../v2/service/ChannelUpdater.java | 9 +- .../ipmessaging/v2/service/RoleCreator.java | 9 +- .../ipmessaging/v2/service/RoleDeleter.java | 9 +- .../ipmessaging/v2/service/RoleFetcher.java | 9 +- .../ipmessaging/v2/service/RoleReader.java | 9 +- .../ipmessaging/v2/service/RoleUpdater.java | 9 +- .../ipmessaging/v2/service/UserCreator.java | 9 +- .../ipmessaging/v2/service/UserDeleter.java | 9 +- .../ipmessaging/v2/service/UserFetcher.java | 9 +- .../ipmessaging/v2/service/UserReader.java | 9 +- .../ipmessaging/v2/service/UserUpdater.java | 9 +- .../v2/service/channel/InviteCreator.java | 18 +- .../v2/service/channel/InviteDeleter.java | 18 +- .../v2/service/channel/InviteFetcher.java | 18 +- .../v2/service/channel/InviteReader.java | 18 +- .../v2/service/channel/MemberCreator.java | 18 +- .../v2/service/channel/MemberDeleter.java | 18 +- .../v2/service/channel/MemberFetcher.java | 18 +- .../v2/service/channel/MemberReader.java | 18 +- .../v2/service/channel/MemberUpdater.java | 18 +- .../v2/service/channel/MessageCreator.java | 18 +- .../v2/service/channel/MessageDeleter.java | 18 +- .../v2/service/channel/MessageFetcher.java | 18 +- .../v2/service/channel/MessageReader.java | 18 +- .../v2/service/channel/MessageUpdater.java | 18 +- .../v2/service/channel/WebhookCreator.java | 18 +- .../v2/service/channel/WebhookDeleter.java | 18 +- .../v2/service/channel/WebhookFetcher.java | 18 +- .../v2/service/channel/WebhookReader.java | 18 +- .../v2/service/channel/WebhookUpdater.java | 18 +- .../v2/service/user/UserBindingDeleter.java | 9 +- .../v2/service/user/UserBindingFetcher.java | 9 +- .../v2/service/user/UserBindingReader.java | 9 +- .../v2/service/user/UserChannelDeleter.java | 18 +- .../v2/service/user/UserChannelFetcher.java | 18 +- .../v2/service/user/UserChannelReader.java | 9 +- .../v2/service/user/UserChannelUpdater.java | 18 +- .../twilio/rest/knowledge/v1/Knowledge.java | 6 + .../com/twilio/rest/knowledge/v2/Chunk.java | 123 +- .../twilio/rest/knowledge/v2/ChunkReader.java | 27 +- .../twilio/rest/knowledge/v2/Knowledge.java | 400 ++++- .../rest/knowledge/v2/KnowledgeBasis.java | 22 +- .../knowledge/v2/KnowledgeBasisCreator.java | 9 +- .../knowledge/v2/KnowledgeBasisDeleter.java | 20 +- .../knowledge/v2/KnowledgeBasisFetcher.java | 20 +- .../knowledge/v2/KnowledgeBasisReader.java | 9 +- .../knowledge/v2/KnowledgeBasisUpdater.java | 20 +- .../rest/knowledge/v2/KnowledgeCreator.java | 3 +- .../rest/knowledge/v2/KnowledgeDeleter.java | 20 +- .../rest/knowledge/v2/KnowledgeFetcher.java | 23 +- .../rest/knowledge/v2/KnowledgeReader.java | 6 +- .../rest/knowledge/v2/KnowledgeUpdater.java | 23 +- .../twilio/rest/knowledge/v2/Operation.java | 8 +- .../rest/knowledge/v2/OperationFetcher.java | 23 +- .../com/twilio/rest/knowledge/v2/Search.java | 88 +- .../rest/lookups/v1/PhoneNumberFetcher.java | 9 +- .../com/twilio/rest/lookups/v2/Bucket.java | 2 + .../rest/lookups/v2/LookupOverride.java | 2 + .../lookups/v2/LookupOverrideCreator.java | 9 +- .../lookups/v2/LookupOverrideDeleter.java | 9 +- .../lookups/v2/LookupOverrideFetcher.java | 9 +- .../lookups/v2/LookupOverrideUpdater.java | 9 +- .../twilio/rest/lookups/v2/PhoneNumber.java | 27 +- .../rest/lookups/v2/PhoneNumberFetcher.java | 9 +- .../com/twilio/rest/lookups/v2/Query.java | 47 +- .../com/twilio/rest/lookups/v2/RateLimit.java | 4 +- .../marketplace/v1/ReferralConversion.java | 8 +- .../AvailableAddOnExtensionFetcher.java | 12 +- .../AvailableAddOnExtensionReader.java | 12 +- .../InstalledAddOnExtensionFetcher.java | 12 +- .../InstalledAddOnExtensionReader.java | 12 +- .../InstalledAddOnExtensionUpdater.java | 12 +- .../installedaddon/InstalledAddOnUsage.java | 32 +- .../InstalledAddOnUsageCreator.java | 9 +- .../java/com/twilio/rest/memory/v1/Bulk.java | 14 +- .../twilio/rest/memory/v1/BulkUpdater.java | 13 +- .../rest/memory/v1/ConversationSummary.java | 16 +- .../memory/v1/ConversationSummaryCreator.java | 20 +- .../memory/v1/ConversationSummaryDeleter.java | 40 +- .../memory/v1/ConversationSummaryFetcher.java | 40 +- .../memory/v1/ConversationSummaryPatcher.java | 34 +- .../memory/v1/ConversationSummaryReader.java | 77 +- .../twilio/rest/memory/v1/DataMapping.java | 256 +-- .../rest/memory/v1/DataMappingCreator.java | 11 +- .../rest/memory/v1/DataMappingDeleter.java | 34 +- .../rest/memory/v1/DataMappingFetcher.java | 31 +- .../rest/memory/v1/DataMappingPatcher.java | 25 +- .../rest/memory/v1/DataMappingReader.java | 11 +- .../java/com/twilio/rest/memory/v1/Event.java | 924 ---------- .../twilio/rest/memory/v1/EventCreator.java | 122 -- .../com/twilio/rest/memory/v1/Identifier.java | 10 +- .../rest/memory/v1/IdentifierCreator.java | 20 +- .../rest/memory/v1/IdentifierDeleter.java | 31 +- .../rest/memory/v1/IdentifierFetcher.java | 25 +- .../rest/memory/v1/IdentifierPatcher.java | 25 +- .../rest/memory/v1/IdentifierReader.java | 38 +- .../memory/v1/IdentityResolutionSetting.java | 53 +- .../v1/IdentityResolutionSettingFetcher.java | 24 +- .../v1/IdentityResolutionSettingUpdater.java | 24 +- .../com/twilio/rest/memory/v1/Import.java | 169 +- .../twilio/rest/memory/v1/ImportCreator.java | 2 +- .../twilio/rest/memory/v1/ImportFetcher.java | 19 +- .../twilio/rest/memory/v1/ImportReader.java | 50 +- .../com/twilio/rest/memory/v1/Lookup.java | 8 +- .../twilio/rest/memory/v1/LookupCreator.java | 2 +- .../twilio/rest/memory/v1/Observation.java | 307 +++- .../rest/memory/v1/ObservationCreator.java | 20 +- .../rest/memory/v1/ObservationDeleter.java | 43 +- .../rest/memory/v1/ObservationFetcher.java | 40 +- .../rest/memory/v1/ObservationPatcher.java | 50 +- .../rest/memory/v1/ObservationReader.java | 53 +- .../com/twilio/rest/memory/v1/Operation.java | 10 +- .../rest/memory/v1/OperationFetcher.java | 25 +- .../com/twilio/rest/memory/v1/Profile.java | 32 +- .../twilio/rest/memory/v1/ProfileCreator.java | 2 +- .../twilio/rest/memory/v1/ProfileDeleter.java | 25 +- .../twilio/rest/memory/v1/ProfileFetcher.java | 22 +- .../twilio/rest/memory/v1/ProfilePatcher.java | 22 +- .../twilio/rest/memory/v1/ProfileReader.java | 2 +- .../com/twilio/rest/memory/v1/Recall.java | 44 +- .../twilio/rest/memory/v1/RecallCreator.java | 11 +- .../com/twilio/rest/memory/v1/Revision.java | 51 +- .../twilio/rest/memory/v1/RevisionReader.java | 56 +- .../java/com/twilio/rest/memory/v1/Store.java | 12 +- .../twilio/rest/memory/v1/StoreCreator.java | 2 +- .../twilio/rest/memory/v1/StoreDeleter.java | 16 +- .../twilio/rest/memory/v1/StoreFetcher.java | 13 +- .../twilio/rest/memory/v1/StorePatcher.java | 13 +- .../twilio/rest/memory/v1/StoreReader.java | 2 +- .../java/com/twilio/rest/memory/v1/Trait.java | 40 +- .../com/twilio/rest/memory/v1/TraitGroup.java | 525 ++++-- .../rest/memory/v1/TraitGroupCreator.java | 11 +- .../rest/memory/v1/TraitGroupDeleter.java | 31 +- .../rest/memory/v1/TraitGroupFetcher.java | 25 +- .../rest/memory/v1/TraitGroupPatcher.java | 25 +- .../rest/memory/v1/TraitGroupReader.java | 11 +- .../twilio/rest/memory/v1/TraitReader.java | 29 +- .../rest/messaging/v1/BrandRegistration.java | 6 +- .../rest/messaging/v1/Deactivations.java | 2 +- .../rest/messaging/v1/DomainCertsDeleter.java | 9 +- .../rest/messaging/v1/DomainCertsFetcher.java | 9 +- .../rest/messaging/v1/DomainCertsUpdater.java | 9 +- .../messaging/v1/DomainConfigFetcher.java | 9 +- .../DomainConfigMessagingServiceFetcher.java | 12 +- .../messaging/v1/DomainConfigUpdater.java | 9 +- .../messaging/v1/DomainValidateDnFetcher.java | 9 +- ...LinkshorteningMessagingServiceCreator.java | 21 +- ...LinkshorteningMessagingServiceDeleter.java | 21 +- ...sagingServiceDomainAssociationFetcher.java | 18 +- .../v1/RequestManagedCertUpdater.java | 9 +- .../messaging/v1/TollfreeVerification.java | 10 +- .../com/twilio/rest/messaging/v1/Usecase.java | 2 +- .../BrandRegistrationOtpCreator.java | 9 +- .../BrandVettingCreator.java | 6 +- .../BrandVettingFetcher.java | 15 +- .../brandregistration/BrandVettingReader.java | 6 +- .../v1/service/AlphaSenderCreator.java | 9 +- .../v1/service/AlphaSenderDeleter.java | 9 +- .../v1/service/AlphaSenderFetcher.java | 9 +- .../v1/service/AlphaSenderReader.java | 9 +- .../v1/service/ChannelSenderCreator.java | 9 +- .../v1/service/ChannelSenderDeleter.java | 9 +- .../v1/service/ChannelSenderFetcher.java | 9 +- .../v1/service/ChannelSenderReader.java | 9 +- .../DestinationAlphaSenderCreator.java | 12 +- .../DestinationAlphaSenderDeleter.java | 12 +- .../DestinationAlphaSenderFetcher.java | 12 +- .../service/DestinationAlphaSenderReader.java | 12 +- .../v1/service/PhoneNumberCreator.java | 9 +- .../v1/service/PhoneNumberDeleter.java | 9 +- .../v1/service/PhoneNumberFetcher.java | 9 +- .../v1/service/PhoneNumberReader.java | 9 +- .../v1/service/ShortCodeCreator.java | 9 +- .../v1/service/ShortCodeDeleter.java | 9 +- .../v1/service/ShortCodeFetcher.java | 9 +- .../messaging/v1/service/ShortCodeReader.java | 9 +- .../v1/service/UsAppToPersonCreator.java | 9 +- .../v1/service/UsAppToPersonDeleter.java | 9 +- .../v1/service/UsAppToPersonFetcher.java | 9 +- .../v1/service/UsAppToPersonReader.java | 9 +- .../v1/service/UsAppToPersonUpdater.java | 9 +- .../v1/service/UsAppToPersonUsecase.java | 11 +- .../service/UsAppToPersonUsecaseFetcher.java | 9 +- .../rest/messaging/v2/ChannelsSender.java | 203 ++- .../rest/messaging/v2/DomainCertsFetcher.java | 9 +- .../rest/messaging/v2/TypingIndicator.java | 2 +- .../rest/messaging/v3/TypingIndicator.java | 60 +- .../notify/v1/service/BindingCreator.java | 9 +- .../notify/v1/service/BindingDeleter.java | 9 +- .../notify/v1/service/BindingFetcher.java | 9 +- .../rest/notify/v1/service/BindingReader.java | 9 +- .../v1/service/NotificationCreator.java | 9 +- .../numbers/v1/BulkEligibilityFetcher.java | 9 +- .../twilio/rest/numbers/v1/Eligibility.java | 2 +- .../rest/numbers/v1/EmbeddedSession.java | 4 +- .../numbers/v1/EmbeddedSessionCreator.java | 9 +- .../twilio/rest/numbers/v1/PortingPortIn.java | 26 +- .../rest/numbers/v1/PortingPortInDeleter.java | 9 +- .../rest/numbers/v1/PortingPortInFetcher.java | 9 +- .../v1/PortingPortInPhoneNumberDeleter.java | 21 +- .../v1/PortingPortInPhoneNumberFetcher.java | 21 +- .../numbers/v1/PortingPortabilityFetcher.java | 9 +- .../PortingWebhookConfigurationCreator.java | 3 +- ...tingWebhookConfigurationDeleteDeleter.java | 12 +- .../rest/numbers/v1/SenderIdRegistration.java | 4 + .../SigningRequestConfigurationCreator.java | 3 +- .../v1/SigningRequestConfigurationReader.java | 3 +- .../rest/numbers/v1/SmsVerification.java | 239 +++ .../v1/SmsVerificationCheck.java} | 89 +- .../v1/SmsVerificationCheckCreator.java} | 32 +- .../v1/SmsVerificationCreator.java} | 35 +- .../v1/VoiceVerification.java} | 78 +- .../numbers/v1/VoiceVerificationCheck.java | 136 ++ .../v1/VoiceVerificationCheckCreator.java | 92 + .../v1/VoiceVerificationCreator.java} | 32 +- .../twilio/rest/numbers/v2/Application.java | 36 +- .../v2/AuthorizationDocumentCreator.java | 3 +- .../v2/AuthorizationDocumentDeleter.java | 3 +- .../v2/AuthorizationDocumentFetcher.java | 3 +- .../v2/BulkHostedNumberOrderCreator.java | 3 +- .../v2/BulkHostedNumberOrderFetcher.java | 12 +- .../rest/numbers/v2/BundleCloneCreator.java | 9 +- .../rest/numbers/v2/HostedNumberOrder.java | 6 +- .../DependentHostedNumberOrderReader.java | 12 +- .../SupportingDocumentTypeFetcher.java | 3 +- .../SupportingDocumentTypeReader.java | 3 +- .../bundle/BundleCopyCreator.java | 9 +- .../bundle/BundleCopyReader.java | 9 +- .../bundle/EvaluationCreator.java | 9 +- .../bundle/EvaluationFetcher.java | 9 +- .../bundle/EvaluationReader.java | 9 +- .../bundle/ItemAssignmentCreator.java | 9 +- .../bundle/ItemAssignmentDeleter.java | 9 +- .../bundle/ItemAssignmentFetcher.java | 9 +- .../bundle/ItemAssignmentReader.java | 9 +- .../bundle/ReplaceItemsCreator.java | 9 +- .../rest/numbers/v3/HostedNumberOrder.java | 10 +- .../numbers/v3/HostedNumberOrderCreator.java | 9 +- .../com/twilio/rest/oauth/v1/Authorize.java | 2 +- .../com/twilio/rest/oauth/v2/Authorize.java | 24 +- .../rest/oauth/v2/AuthorizeFetcher.java | 32 + .../oauth/v2/OauthAuthorizationServer.java | 295 ++++ .../v2/OauthAuthorizationServerFetcher.java} | 34 +- .../twilio/rest/oauth/v2/TokenCreator.java | 15 + .../AuthorizationDocumentCreator.java | 3 +- .../AuthorizationDocumentFetcher.java | 3 +- .../AuthorizationDocumentUpdater.java | 3 +- .../hostedNumbers/HostedNumberOrder.java | 6 +- .../DependentHostedNumberOrder.java | 6 +- .../DependentHostedNumberOrderReader.java | 12 +- .../AvailableAddOnExtensionFetcher.java | 12 +- .../AvailableAddOnExtensionReader.java | 12 +- .../InstalledAddOnExtensionFetcher.java | 12 +- .../InstalledAddOnExtensionReader.java | 12 +- .../InstalledAddOnExtensionUpdater.java | 12 +- .../rest/preview/wireless/RatePlan.java | 6 +- .../organizations/AccountFetcher.java | 18 +- .../organizations/AccountReader.java | 9 +- .../organizations/RoleAssignment.java | 2 + .../organizations/RoleAssignmentCreator.java | 9 +- .../organizations/RoleAssignmentDeleter.java | 18 +- .../organizations/RoleAssignmentReader.java | 9 +- .../rest/previewiam/organizations/User.java | 12 + .../previewiam/organizations/UserCreator.java | 9 +- .../previewiam/organizations/UserDeleter.java | 9 +- .../previewiam/organizations/UserFetcher.java | 9 +- .../previewiam/organizations/UserPatcher.java | 9 +- .../previewiam/organizations/UserReader.java | 9 +- .../previewiam/organizations/UserUpdater.java | 9 +- .../twilio/rest/previewiam/v1/Authorize.java | 2 +- .../rest/pricing/v1/messaging/Country.java | 12 +- .../pricing/v1/messaging/CountryFetcher.java | 9 +- .../rest/pricing/v1/phonenumber/Country.java | 6 +- .../v1/phonenumber/CountryFetcher.java | 9 +- .../twilio/rest/pricing/v1/voice/Country.java | 12 +- .../rest/pricing/v1/voice/CountryFetcher.java | 9 +- .../com/twilio/rest/pricing/v2/Country.java | 12 +- .../rest/pricing/v2/CountryFetcher.java | 9 +- .../com/twilio/rest/pricing/v2/Number.java | 6 +- .../twilio/rest/pricing/v2/NumberFetcher.java | 9 +- .../twilio/rest/pricing/v2/voice/Country.java | 12 +- .../rest/pricing/v2/voice/CountryFetcher.java | 9 +- .../twilio/rest/pricing/v2/voice/Number.java | 6 +- .../rest/pricing/v2/voice/NumberFetcher.java | 9 +- .../proxy/v1/service/PhoneNumberCreator.java | 9 +- .../proxy/v1/service/PhoneNumberDeleter.java | 9 +- .../proxy/v1/service/PhoneNumberFetcher.java | 9 +- .../proxy/v1/service/PhoneNumberReader.java | 9 +- .../proxy/v1/service/PhoneNumberUpdater.java | 9 +- .../rest/proxy/v1/service/SessionCreator.java | 9 +- .../rest/proxy/v1/service/SessionDeleter.java | 9 +- .../rest/proxy/v1/service/SessionFetcher.java | 9 +- .../rest/proxy/v1/service/SessionReader.java | 9 +- .../rest/proxy/v1/service/SessionUpdater.java | 9 +- .../service/session/InteractionDeleter.java | 18 +- .../service/session/InteractionFetcher.java | 18 +- .../v1/service/session/InteractionReader.java | 18 +- .../service/session/ParticipantCreator.java | 18 +- .../service/session/ParticipantDeleter.java | 18 +- .../service/session/ParticipantFetcher.java | 18 +- .../v1/service/session/ParticipantReader.java | 18 +- .../MessageInteractionCreator.java | 27 +- .../MessageInteractionFetcher.java | 27 +- .../participant/MessageInteractionReader.java | 27 +- .../rest/routes/v2/PhoneNumberFetcher.java | 9 +- .../rest/routes/v2/PhoneNumberUpdater.java | 9 +- .../rest/routes/v2/SipDomainFetcher.java | 9 +- .../rest/routes/v2/SipDomainUpdater.java | 9 +- .../twilio/rest/routes/v2/TrunkFetcher.java | 9 +- .../twilio/rest/routes/v2/TrunkUpdater.java | 9 +- .../twilio/rest/routes/v3/PhoneNumber.java | 490 ++++++ .../rest/routes/v3/PhoneNumberFetcher.java | 104 ++ .../rest/routes/v3/PhoneNumberUpdater.java | 156 ++ .../serverless/v1/service/AssetCreator.java | 9 +- .../serverless/v1/service/AssetDeleter.java | 9 +- .../serverless/v1/service/AssetFetcher.java | 9 +- .../serverless/v1/service/AssetReader.java | 9 +- .../serverless/v1/service/AssetUpdater.java | 9 +- .../rest/serverless/v1/service/Build.java | 3 +- .../serverless/v1/service/BuildCreator.java | 9 +- .../serverless/v1/service/BuildDeleter.java | 9 +- .../serverless/v1/service/BuildFetcher.java | 9 +- .../serverless/v1/service/BuildReader.java | 9 +- .../v1/service/EnvironmentCreator.java | 9 +- .../v1/service/EnvironmentDeleter.java | 9 +- .../v1/service/EnvironmentFetcher.java | 9 +- .../v1/service/EnvironmentReader.java | 9 +- .../v1/service/FunctionCreator.java | 9 +- .../v1/service/FunctionDeleter.java | 9 +- .../v1/service/FunctionFetcher.java | 9 +- .../serverless/v1/service/FunctionReader.java | 9 +- .../v1/service/FunctionUpdater.java | 9 +- .../v1/service/asset/AssetVersionFetcher.java | 15 +- .../v1/service/asset/AssetVersionReader.java | 15 +- .../v1/service/build/BuildStatusFetcher.java | 9 +- .../environment/DeploymentCreator.java | 18 +- .../environment/DeploymentFetcher.java | 18 +- .../service/environment/DeploymentReader.java | 18 +- .../v1/service/environment/LogFetcher.java | 18 +- .../v1/service/environment/LogReader.java | 18 +- .../service/environment/VariableCreator.java | 18 +- .../service/environment/VariableDeleter.java | 18 +- .../service/environment/VariableFetcher.java | 18 +- .../service/environment/VariableReader.java | 18 +- .../service/environment/VariableUpdater.java | 18 +- .../function/FunctionVersionFetcher.java | 18 +- .../function/FunctionVersionReader.java | 18 +- .../FunctionVersionContentFetcher.java | 21 +- .../engagement/EngagementContextFetcher.java | 9 +- .../v1/flow/engagement/StepFetcher.java | 9 +- .../studio/v1/flow/engagement/StepReader.java | 9 +- .../engagement/step/StepContextFetcher.java | 9 +- .../execution/ExecutionContextFetcher.java | 9 +- .../flow/execution/ExecutionStepFetcher.java | 9 +- .../flow/execution/ExecutionStepReader.java | 9 +- .../ExecutionStepContextFetcher.java | 9 +- .../twilio/rest/studio/v2/FlowValidate.java | 2 +- .../studio/v2/flow/FlowRevisionFetcher.java | 6 +- .../execution/ExecutionContextFetcher.java | 9 +- .../flow/execution/ExecutionStepFetcher.java | 9 +- .../flow/execution/ExecutionStepReader.java | 9 +- .../ExecutionStepContextFetcher.java | 9 +- .../NetworkAccessProfileNetworkCreator.java | 12 +- .../NetworkAccessProfileNetworkDeleter.java | 12 +- .../NetworkAccessProfileNetworkFetcher.java | 12 +- .../NetworkAccessProfileNetworkReader.java | 12 +- .../rest/sync/v1/service/DocumentCreator.java | 9 +- .../rest/sync/v1/service/DocumentDeleter.java | 9 +- .../rest/sync/v1/service/DocumentFetcher.java | 9 +- .../rest/sync/v1/service/DocumentReader.java | 9 +- .../rest/sync/v1/service/DocumentUpdater.java | 9 +- .../rest/sync/v1/service/SyncListCreator.java | 9 +- .../rest/sync/v1/service/SyncListDeleter.java | 9 +- .../rest/sync/v1/service/SyncListFetcher.java | 9 +- .../rest/sync/v1/service/SyncListReader.java | 9 +- .../rest/sync/v1/service/SyncListUpdater.java | 9 +- .../rest/sync/v1/service/SyncMapCreator.java | 9 +- .../rest/sync/v1/service/SyncMapDeleter.java | 9 +- .../rest/sync/v1/service/SyncMapFetcher.java | 9 +- .../rest/sync/v1/service/SyncMapReader.java | 9 +- .../rest/sync/v1/service/SyncMapUpdater.java | 9 +- .../sync/v1/service/SyncStreamCreator.java | 9 +- .../sync/v1/service/SyncStreamDeleter.java | 9 +- .../sync/v1/service/SyncStreamFetcher.java | 9 +- .../sync/v1/service/SyncStreamReader.java | 9 +- .../sync/v1/service/SyncStreamUpdater.java | 9 +- .../document/DocumentPermissionDeleter.java | 24 +- .../document/DocumentPermissionFetcher.java | 24 +- .../document/DocumentPermissionReader.java | 18 +- .../document/DocumentPermissionUpdater.java | 24 +- .../service/synclist/SyncListItemCreator.java | 9 +- .../service/synclist/SyncListItemDeleter.java | 9 +- .../service/synclist/SyncListItemFetcher.java | 9 +- .../service/synclist/SyncListItemReader.java | 9 +- .../service/synclist/SyncListItemUpdater.java | 9 +- .../synclist/SyncListPermissionDeleter.java | 15 +- .../synclist/SyncListPermissionFetcher.java | 15 +- .../synclist/SyncListPermissionReader.java | 9 +- .../synclist/SyncListPermissionUpdater.java | 15 +- .../service/syncmap/SyncMapItemCreator.java | 9 +- .../service/syncmap/SyncMapItemDeleter.java | 9 +- .../service/syncmap/SyncMapItemFetcher.java | 9 +- .../v1/service/syncmap/SyncMapItemReader.java | 9 +- .../service/syncmap/SyncMapItemUpdater.java | 9 +- .../syncmap/SyncMapPermissionDeleter.java | 15 +- .../syncmap/SyncMapPermissionFetcher.java | 15 +- .../syncmap/SyncMapPermissionReader.java | 9 +- .../syncmap/SyncMapPermissionUpdater.java | 15 +- .../syncstream/StreamMessageCreator.java | 18 +- .../v1/workspace/ActivityCreator.java | 9 +- .../v1/workspace/ActivityDeleter.java | 9 +- .../v1/workspace/ActivityFetcher.java | 9 +- .../v1/workspace/ActivityReader.java | 9 +- .../v1/workspace/ActivityUpdater.java | 9 +- .../taskrouter/v1/workspace/EventFetcher.java | 9 +- .../taskrouter/v1/workspace/EventReader.java | 9 +- .../v1/workspace/TaskChannelCreator.java | 9 +- .../v1/workspace/TaskChannelDeleter.java | 9 +- .../v1/workspace/TaskChannelFetcher.java | 9 +- .../v1/workspace/TaskChannelReader.java | 9 +- .../v1/workspace/TaskChannelUpdater.java | 9 +- .../taskrouter/v1/workspace/TaskCreator.java | 9 +- .../taskrouter/v1/workspace/TaskDeleter.java | 9 +- .../taskrouter/v1/workspace/TaskFetcher.java | 9 +- .../v1/workspace/TaskQueueCreator.java | 9 +- .../v1/workspace/TaskQueueDeleter.java | 9 +- .../v1/workspace/TaskQueueFetcher.java | 9 +- .../v1/workspace/TaskQueueReader.java | 9 +- .../v1/workspace/TaskQueueUpdater.java | 9 +- .../taskrouter/v1/workspace/TaskReader.java | 9 +- .../taskrouter/v1/workspace/TaskUpdater.java | 9 +- .../v1/workspace/WorkerCreator.java | 9 +- .../v1/workspace/WorkerDeleter.java | 9 +- .../v1/workspace/WorkerFetcher.java | 9 +- .../taskrouter/v1/workspace/WorkerReader.java | 9 +- .../v1/workspace/WorkerUpdater.java | 9 +- .../v1/workspace/WorkflowCreator.java | 9 +- .../v1/workspace/WorkflowDeleter.java | 9 +- .../v1/workspace/WorkflowFetcher.java | 9 +- .../v1/workspace/WorkflowReader.java | 9 +- .../v1/workspace/WorkflowUpdater.java | 9 +- .../WorkspaceCumulativeStatisticsFetcher.java | 12 +- .../WorkspaceRealTimeStatistics.java | 6 +- .../WorkspaceRealTimeStatisticsFetcher.java | 12 +- .../workspace/WorkspaceStatisticsFetcher.java | 9 +- .../v1/workspace/task/ReservationFetcher.java | 9 +- .../v1/workspace/task/ReservationReader.java | 9 +- .../v1/workspace/task/ReservationUpdater.java | 9 +- ...askQueueBulkRealTimeStatisticsCreator.java | 12 +- .../TaskQueueCumulativeStatisticsFetcher.java | 21 +- .../TaskQueueRealTimeStatistics.java | 6 +- .../TaskQueueRealTimeStatisticsFetcher.java | 21 +- .../taskqueue/TaskQueueStatisticsFetcher.java | 18 +- .../taskqueue/TaskQueuesStatisticsReader.java | 9 +- .../workspace/worker/ReservationFetcher.java | 18 +- .../workspace/worker/ReservationReader.java | 18 +- .../workspace/worker/ReservationUpdater.java | 18 +- .../worker/WorkerChannelFetcher.java | 18 +- .../workspace/worker/WorkerChannelReader.java | 18 +- .../worker/WorkerChannelUpdater.java | 18 +- .../worker/WorkerStatisticsFetcher.java | 18 +- .../worker/WorkersCumulativeStatistics.java | 6 +- .../WorkersCumulativeStatisticsFetcher.java | 12 +- .../worker/WorkersRealTimeStatistics.java | 6 +- .../WorkersRealTimeStatisticsFetcher.java | 12 +- .../worker/WorkersStatisticsFetcher.java | 9 +- .../WorkflowCumulativeStatisticsFetcher.java | 21 +- .../WorkflowRealTimeStatisticsFetcher.java | 21 +- .../workflow/WorkflowStatisticsFetcher.java | 18 +- .../v1/trunk/CredentialListCreator.java | 6 +- .../v1/trunk/CredentialListDeleter.java | 6 +- .../v1/trunk/CredentialListFetcher.java | 6 +- .../v1/trunk/CredentialListReader.java | 6 +- .../v1/trunk/IpAccessControlListCreator.java | 6 +- .../v1/trunk/IpAccessControlListDeleter.java | 6 +- .../v1/trunk/IpAccessControlListFetcher.java | 6 +- .../v1/trunk/IpAccessControlListReader.java | 6 +- .../v1/trunk/OriginationUrlCreator.java | 6 +- .../v1/trunk/OriginationUrlDeleter.java | 6 +- .../v1/trunk/OriginationUrlFetcher.java | 6 +- .../v1/trunk/OriginationUrlReader.java | 6 +- .../v1/trunk/OriginationUrlUpdater.java | 6 +- .../trunking/v1/trunk/PhoneNumberCreator.java | 6 +- .../trunking/v1/trunk/PhoneNumberDeleter.java | 6 +- .../trunking/v1/trunk/PhoneNumberFetcher.java | 6 +- .../trunking/v1/trunk/PhoneNumberReader.java | 6 +- .../trunking/v1/trunk/RecordingFetcher.java | 6 +- .../trunking/v1/trunk/RecordingUpdater.java | 6 +- .../trusthub/v1/A2PBrandRegistration.java | 812 +++++++++ .../v1/A2PBrandRegistrationCreator.java} | 49 +- .../A2PBrandRegistrationEmbeddedSession.java} | 106 +- ...ndRegistrationEmbeddedSessionCreator.java} | 45 +- .../trusthub/v1/A2PCampaignRegistration.java | 693 ++++++++ .../v1/A2PCampaignRegistrationCreator.java | 123 ++ ...2PCampaignRegistrationEmbeddedSession.java | 151 ++ ...gnRegistrationEmbeddedSessionCreator.java} | 45 +- .../v1/ComplianceInquiriesUpdater.java | 9 +- ...omplianceRegistrationInquiriesCreator.java | 3 +- ...omplianceRegistrationInquiriesUpdater.java | 12 +- .../ComplianceTollfreeInquiriesCreator.java | 3 +- .../v1/CustomerProfilesProvisionalCopy.java} | 136 +- ...ustomerProfilesProvisionalCopyCreator.java | 107 ++ ...ustomerProfilesProvisionalCopyFetcher.java | 107 ++ .../v1/SupportingDocumentTypeFetcher.java | 3 +- .../v1/SupportingDocumentTypeReader.java | 3 +- .../v1/TrustProductsProvisionalCopy.java} | 133 +- .../TrustProductsProvisionalCopyCreator.java | 104 ++ .../TrustProductsProvisionalCopyFetcher.java | 104 ++ ...filesChannelEndpointAssignmentCreator.java | 18 +- ...filesChannelEndpointAssignmentDeleter.java | 12 +- ...filesChannelEndpointAssignmentFetcher.java | 18 +- ...ofilesChannelEndpointAssignmentReader.java | 18 +- ...tomerProfilesEntityAssignmentsCreator.java | 12 +- ...tomerProfilesEntityAssignmentsDeleter.java | 12 +- ...tomerProfilesEntityAssignmentsFetcher.java | 12 +- ...stomerProfilesEntityAssignmentsReader.java | 18 +- .../CustomerProfilesEvaluationsCreator.java | 12 +- .../CustomerProfilesEvaluationsFetcher.java | 12 +- .../CustomerProfilesEvaluationsReader.java | 12 +- ...ductsChannelEndpointAssignmentCreator.java | 18 +- ...ductsChannelEndpointAssignmentDeleter.java | 12 +- ...ductsChannelEndpointAssignmentFetcher.java | 18 +- ...oductsChannelEndpointAssignmentReader.java | 18 +- ...TrustProductsEntityAssignmentsCreator.java | 12 +- ...TrustProductsEntityAssignmentsDeleter.java | 12 +- ...TrustProductsEntityAssignmentsFetcher.java | 12 +- .../TrustProductsEntityAssignmentsReader.java | 12 +- .../TrustProductsEvaluationsCreator.java | 12 +- .../TrustProductsEvaluationsFetcher.java | 12 +- .../TrustProductsEvaluationsReader.java | 12 +- .../twilio/rest/verify/v2/FormFetcher.java | 6 +- .../rest/verify/v2/SafelistDeleter.java | 9 +- .../rest/verify/v2/SafelistFetcher.java | 9 +- .../VerificationAttemptsSummaryFetcher.java | 3 +- .../verify/v2/service/AccessTokenCreator.java | 9 +- .../verify/v2/service/AccessTokenFetcher.java | 9 +- .../verify/v2/service/ApproveChallenge.java | 4 + .../v2/service/ApproveChallengeUpdater.java | 9 +- .../rest/verify/v2/service/EntityCreator.java | 9 +- .../rest/verify/v2/service/EntityDeleter.java | 15 +- .../rest/verify/v2/service/EntityFetcher.java | 15 +- .../rest/verify/v2/service/EntityReader.java | 9 +- .../MessagingConfigurationCreator.java | 12 +- .../MessagingConfigurationDeleter.java | 12 +- .../MessagingConfigurationFetcher.java | 12 +- .../service/MessagingConfigurationReader.java | 12 +- .../MessagingConfigurationUpdater.java | 12 +- .../rest/verify/v2/service/NewChallenge.java | 2 + .../v2/service/NewChallengeCreator.java | 9 +- .../rest/verify/v2/service/NewFactor.java | 6 + .../verify/v2/service/NewFactorCreator.java | 9 +- .../verify/v2/service/NewVerifyFactor.java | 4 + .../v2/service/NewVerifyFactorUpdater.java | 9 +- .../verify/v2/service/RateLimitCreator.java | 9 +- .../verify/v2/service/RateLimitDeleter.java | 9 +- .../verify/v2/service/RateLimitFetcher.java | 9 +- .../verify/v2/service/RateLimitReader.java | 9 +- .../verify/v2/service/RateLimitUpdater.java | 9 +- .../verify/v2/service/VerificationCheck.java | 6 +- .../v2/service/VerificationCheckCreator.java | 9 +- .../v2/service/VerificationCreator.java | 24 +- .../v2/service/VerificationFetcher.java | 9 +- .../v2/service/VerificationUpdater.java | 9 +- .../verify/v2/service/WebhookCreator.java | 9 +- .../verify/v2/service/WebhookDeleter.java | 9 +- .../verify/v2/service/WebhookFetcher.java | 9 +- .../rest/verify/v2/service/WebhookReader.java | 9 +- .../verify/v2/service/WebhookUpdater.java | 9 +- .../v2/service/entity/ChallengeCreator.java | 15 +- .../v2/service/entity/ChallengeFetcher.java | 15 +- .../v2/service/entity/ChallengeReader.java | 15 +- .../v2/service/entity/ChallengeUpdater.java | 15 +- .../v2/service/entity/FactorDeleter.java | 15 +- .../v2/service/entity/FactorFetcher.java | 15 +- .../v2/service/entity/FactorReader.java | 15 +- .../v2/service/entity/FactorUpdater.java | 15 +- .../v2/service/entity/NewFactorCreator.java | 15 +- .../entity/challenge/NotificationCreator.java | 24 +- .../v2/service/ratelimit/BucketCreator.java | 18 +- .../v2/service/ratelimit/BucketDeleter.java | 18 +- .../v2/service/ratelimit/BucketFetcher.java | 18 +- .../v2/service/ratelimit/BucketReader.java | 18 +- .../v2/service/ratelimit/BucketUpdater.java | 18 +- .../com/twilio/rest/video/v1/Composition.java | 6 +- .../twilio/rest/video/v1/CompositionHook.java | 6 +- .../participant/PublishedTrackFetcher.java | 9 +- .../participant/PublishedTrackReader.java | 9 +- .../participant/SubscribeRulesFetcher.java | 9 +- .../participant/SubscribeRulesUpdater.java | 9 +- .../participant/SubscribedTrackFetcher.java | 9 +- .../participant/SubscribedTrackReader.java | 9 +- .../ConnectionPolicyTargetCreator.java | 12 +- .../ConnectionPolicyTargetDeleter.java | 12 +- .../ConnectionPolicyTargetFetcher.java | 12 +- .../ConnectionPolicyTargetReader.java | 12 +- .../ConnectionPolicyTargetUpdater.java | 12 +- .../voice/v1/dialingpermissions/Settings.java | 3 +- .../country/HighriskSpecialPrefix.java | 2 +- .../voice/v2/AccountDefaultConfiguration.java | 292 +++ .../AccountDefaultConfigurationCreator.java} | 63 +- .../AccountDefaultConfigurationDeleter.java} | 24 +- .../AccountDefaultConfigurationFetcher.java | 99 ++ .../AccountDefaultConfigurationUpdater.java | 124 ++ .../v2/Configuration.java} | 177 +- .../v2/ConfigurationCreator.java} | 50 +- .../com/twilio/rest/voice/v2/Recording.java | 955 ++++++++++ .../v2/RecordingCreator.java} | 45 +- .../v2/RecordingDeleter.java} | 25 +- .../rest/voice/v2/RecordingFetcher.java | 99 ++ .../v2/RecordingUpdater.java} | 49 +- .../twilio/rest/voice/v2/Transcription.java | 775 ++++++++ .../v2/TranscriptionCreator.java} | 45 +- .../v2/TranscriptionDeleter.java} | 25 +- .../rest/voice/v2/TranscriptionFetcher.java | 99 ++ .../v2/TranscriptionUpdater.java} | 49 +- .../Feedback.java => voice/v2/Type.java} | 202 +-- .../v2/TypeDeleter.java} | 38 +- .../com/twilio/rest/voice/v2/TypeFetcher.java | 99 ++ .../com/twilio/rest/voice/v2/TypeUpdater.java | 120 ++ .../v2/configuration/Default.java} | 165 +- .../v2/configuration/DefaultCreator.java} | 45 +- .../v2/configuration/DefaultFetcher.java} | 30 +- .../twilio/rest/voice/v3/Transcription.java | 381 +++- .../rest/voice/v3/TranscriptionCreator.java | 9 +- .../rest/voice/v3/TranscriptionFetcher.java | 29 +- .../v3/TranscriptionReader.java} | 184 +- .../com/twilio/rest/wireless/v1/RatePlan.java | 6 +- .../com/twilio/twiml/voice/Assistant.java | 629 ------- .../java/com/twilio/twiml/voice/Connect.java | 9 - .../java/com/twilio/twiml/voice/Dial.java | 24 + .../com/twilio/twiml/VoiceResponseTest.java | 6 +- .../com/twilio/twiml/voice/AssistantTest.java | 259 --- .../com/twilio/twiml/voice/ConnectTest.java | 53 - .../java/com/twilio/twiml/voice/DialTest.java | 6 +- 1172 files changed, 21139 insertions(+), 17421 deletions(-) delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/Assistant.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/AssistantReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/Knowledge.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/KnowledgeReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/SessionReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/Tool.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/ToolReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeDeleter.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/knowledge/ChunkReader.java delete mode 100644 src/main/java/com/twilio/rest/assistants/v1/session/MessageReader.java create mode 100644 src/main/java/com/twilio/rest/intelligence/v3/RuleExecution.java create mode 100644 src/main/java/com/twilio/rest/intelligence/v3/RuleExecutionCreator.java delete mode 100644 src/main/java/com/twilio/rest/memory/v1/Event.java delete mode 100644 src/main/java/com/twilio/rest/memory/v1/EventCreator.java create mode 100644 src/main/java/com/twilio/rest/numbers/v1/SmsVerification.java rename src/main/java/com/twilio/rest/{assistants/v1/knowledge/Chunk.java => numbers/v1/SmsVerificationCheck.java} (55%) rename src/main/java/com/twilio/rest/{assistants/v1/AssistantFetcher.java => numbers/v1/SmsVerificationCheckCreator.java} (75%) rename src/main/java/com/twilio/rest/{assistants/v1/ToolFetcher.java => numbers/v1/SmsVerificationCreator.java} (74%) rename src/main/java/com/twilio/rest/{assistants/v1/knowledge/KnowledgeStatus.java => numbers/v1/VoiceVerification.java} (62%) create mode 100644 src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheck.java create mode 100644 src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheckCreator.java rename src/main/java/com/twilio/rest/{assistants/v1/KnowledgeFetcher.java => numbers/v1/VoiceVerificationCreator.java} (75%) create mode 100644 src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServer.java rename src/main/java/com/twilio/rest/{assistants/v1/knowledge/KnowledgeStatusFetcher.java => oauth/v2/OauthAuthorizationServerFetcher.java} (74%) create mode 100644 src/main/java/com/twilio/rest/routes/v3/PhoneNumber.java create mode 100644 src/main/java/com/twilio/rest/routes/v3/PhoneNumberFetcher.java create mode 100644 src/main/java/com/twilio/rest/routes/v3/PhoneNumberUpdater.java create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistration.java rename src/main/java/com/twilio/rest/{assistants/v1/assistant/FeedbackCreator.java => trusthub/v1/A2PBrandRegistrationCreator.java} (66%) rename src/main/java/com/twilio/rest/{assistants/v1/Session.java => trusthub/v1/A2PBrandRegistrationEmbeddedSession.java} (52%) rename src/main/java/com/twilio/rest/{assistants/v1/assistant/AssistantsToolCreator.java => trusthub/v1/A2PBrandRegistrationEmbeddedSessionCreator.java} (69%) create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistration.java create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationCreator.java create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSession.java rename src/main/java/com/twilio/rest/{assistants/v1/assistant/AssistantsKnowledgeCreator.java => trusthub/v1/A2PCampaignRegistrationEmbeddedSessionCreator.java} (68%) rename src/main/java/com/twilio/rest/{assistants/v1/session/Message.java => trusthub/v1/CustomerProfilesProvisionalCopy.java} (57%) create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyCreator.java create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyFetcher.java rename src/main/java/com/twilio/rest/{assistants/v1/assistant/AssistantsKnowledge.java => trusthub/v1/TrustProductsProvisionalCopy.java} (61%) create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyCreator.java create mode 100644 src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyFetcher.java create mode 100644 src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfiguration.java rename src/main/java/com/twilio/rest/{assistants/v1/assistant/MessageCreator.java => voice/v2/AccountDefaultConfigurationCreator.java} (61%) rename src/main/java/com/twilio/rest/{assistants/v1/ToolDeleter.java => voice/v2/AccountDefaultConfigurationDeleter.java} (81%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationFetcher.java create mode 100644 src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationUpdater.java rename src/main/java/com/twilio/rest/{assistants/v1/Policy.java => voice/v2/Configuration.java} (51%) rename src/main/java/com/twilio/rest/{assistants/v1/ToolUpdater.java => voice/v2/ConfigurationCreator.java} (66%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/Recording.java rename src/main/java/com/twilio/rest/{assistants/v1/KnowledgeCreator.java => voice/v2/RecordingCreator.java} (67%) rename src/main/java/com/twilio/rest/{assistants/v1/KnowledgeDeleter.java => voice/v2/RecordingDeleter.java} (81%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/RecordingFetcher.java rename src/main/java/com/twilio/rest/{assistants/v1/AssistantUpdater.java => voice/v2/RecordingUpdater.java} (67%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/Transcription.java rename src/main/java/com/twilio/rest/{assistants/v1/AssistantCreator.java => voice/v2/TranscriptionCreator.java} (67%) rename src/main/java/com/twilio/rest/{assistants/v1/AssistantDeleter.java => voice/v2/TranscriptionDeleter.java} (80%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/TranscriptionFetcher.java rename src/main/java/com/twilio/rest/{assistants/v1/KnowledgeUpdater.java => voice/v2/TranscriptionUpdater.java} (65%) rename src/main/java/com/twilio/rest/{assistants/v1/assistant/Feedback.java => voice/v2/Type.java} (56%) rename src/main/java/com/twilio/rest/{assistants/v1/assistant/AssistantsToolDeleter.java => voice/v2/TypeDeleter.java} (76%) create mode 100644 src/main/java/com/twilio/rest/voice/v2/TypeFetcher.java create mode 100644 src/main/java/com/twilio/rest/voice/v2/TypeUpdater.java rename src/main/java/com/twilio/rest/{assistants/v1/assistant/AssistantsTool.java => voice/v2/configuration/Default.java} (58%) rename src/main/java/com/twilio/rest/{assistants/v1/ToolCreator.java => voice/v2/configuration/DefaultCreator.java} (68%) rename src/main/java/com/twilio/rest/{assistants/v1/SessionFetcher.java => voice/v2/configuration/DefaultFetcher.java} (74%) rename src/main/java/com/twilio/rest/{assistants/v1/PolicyReader.java => voice/v3/TranscriptionReader.java} (50%) delete mode 100644 src/main/java/com/twilio/twiml/voice/Assistant.java delete mode 100644 src/test/java/com/twilio/twiml/voice/AssistantTest.java diff --git a/CHANGES.md b/CHANGES.md index 1338b68da1..4c9900441a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,271 @@ twilio-java changelog ===================== +[2026-08-26] Version 12.2.0 +--------------------------- +**Library - Fix** +- [PR #963](https://github.com/twilio/twilio-java/pull/963): publishing to maven. Thanks to [@shrutiburman](https://github.com/shrutiburman)! + +**Twiml** +- Remove `` noun from `` verb as part of the AI Assistants deprecation **(breaking change)** +- Add `passports` attribute to `` verb for SHAKEN/STIR passport passthrough + +**Accounts** +- Add `SuppressEmailNotification` parameter to the Secondary Auth Token and Auth Token promotion endpoints. Set it to `true` to suppress the email notification sent to account owners and administrators. Defaults to `false`, preserving existing behavior. +- Add SMS Pumping Protection GET and POST API + +**Ai** +- Removing ai workbench apis + +**Api** +- Add missing `uri` property to the `twiml_session` resource + +**Data-ingress** +- ## 2026-08-07 +- **Removed 1 API path**: +- `/v1/DataQuery` (Realtime DataQuery) +- ## 2026-07-07 +- **Added 1 new API path (data plane)**: +- `/v1/DataQuery` (Realtime DataQuery) +- ## 2026-06-17 +- **Content updates**: +- Added properties to `OAuthJWTBearerCredentials`: privateKey, privateKeyPassphrase +- ## 2026-06-12 +- **Added 16 new path(s)**: +- `/v1/DataSyncs/{syncId}` (FetchDataSync) +- `/v1/CloudAppSources/{sourceId}/Objects` (ListCloudAppObjects) +- `/v1/WarehouseSources/{sourceId}/Preview` (CreateWarehousePreview) +- `/v1/WarehouseSources/{sourceId}/Preview/{operationId}` (FetchWarehousePreview) +- `/v1/DataSample/{operationId}` (FetchDataSample) +- `/v1/ControlPlane/CloudAppSources/{sourceId}` (FetchCloudAppSource, PatchCloudAppSource, DeleteCloudAppSource) +- `/v1/ControlPlane/CloudAppSources/{sourceId}/Datasets` (ListCloudAppDatasets, CreateCloudAppDataset) +- `/v1/ControlPlane/CloudAppSources/{sourceId}/Datasets/{datasetId}` (FetchCloudAppDataset, PatchCloudAppDataset, DeleteCloudAppDataset) +- `/v1/ControlPlane/WarehouseSources/{sourceId}` (FetchWarehouseSource, PatchWarehouseSource, DeleteWarehouseSource) +- `/v1/ControlPlane/WarehouseSources/{sourceId}/Datasets` (ListWarehouseDatasets, CreateWarehouseDataset) +- ...and 6 more paths +- **Removed 16 path(s)**: +- `/v1/DataSyncs/{SyncId}` (FetchDataSync) +- `/v1/CloudAppSources/{SourceId}/Objects` (ListCloudAppObjects) +- `/v1/WarehouseSources/{SourceId}/Preview` (CreateWarehousePreview) +- `/v1/WarehouseSources/{SourceId}/Preview/{OperationId}` (FetchWarehousePreview) +- `/v1/DataSample/{OperationId}` (FetchDataSample) +- `/v1/ControlPlane/CloudAppSources/{SourceId}` (FetchCloudAppSource, PatchCloudAppSource, DeleteCloudAppSource) +- `/v1/ControlPlane/CloudAppSources/{SourceId}/Datasets` (ListCloudAppDatasets, CreateCloudAppDataset) +- `/v1/ControlPlane/CloudAppSources/{SourceId}/Datasets/{DatasetId}` (FetchCloudAppDataset, PatchCloudAppDataset, DeleteCloudAppDataset) +- `/v1/ControlPlane/WarehouseSources/{SourceId}` (FetchWarehouseSource, PatchWarehouseSource, DeleteWarehouseSource) +- `/v1/ControlPlane/WarehouseSources/{SourceId}/Datasets` (ListWarehouseDatasets, CreateWarehouseDataset) +- ...and 6 more paths +- ## 2026-06-11 +- **Added 3 new Signal API path(s) for public exposure (data plane)**: +- `/v1/EventSources/{sourceId}/Signals` (ListSignals) +- `/v1/EventSources/{sourceId}/Signals/{signalKey}` (GetSignalBySignalKey) +- `/v1/EventSources/{sourceId}/SignalStats` (ListSignalStats) +- **Added new Signal API schemas**: +- Signal, SignalListResponse, HourlyStats, SignalStatsResponse +- ## 2026-05-26 +- **Added 12 new path(s) for public exposure**: +- `/v1/ControlPlane/EventSources` (CreateEventSource, ListEventSources) +- `/v1/ControlPlane/EventSources/{SourceId}` (FetchEventSource, PatchEventSource, DeleteEventSource) +- `/v1/ControlPlane/EventSources/{SourceId}/WriteKeys` (CreateWriteKey, ListWriteKeys) +- `/v1/ControlPlane/EventSources/{SourceId}/WriteKeys/{WriteKey}` (DeleteWriteKey) +- `/v1/ControlPlane/EventSources/{SourceId}/Datasets` (CreateEventSourceDataset, ListEventSourceDatasets) +- `/v1/ControlPlane/EventSources/{SourceId}/Datasets/{DatasetId}` (FetchEventSourceDataset, PatchEventSourceDataset, DeleteEventSourceDataset) +- `/v1/ControlPlane/EventSources/{SourceId}/EventSchemas` (CreateEventSchema, ListEventSchemas) +- `/v1/ControlPlane/EventSources/{SourceId}/EventSchemas/{SchemaId}` (FetchEventSchema, PatchEventSchema, DeleteEventSchema) +- `/v1/ControlPlane/AutoInstrumentationRule` (CreateAutoInstrumentationRule, ListAutoInstrumentationRules) +- `/v1/ControlPlane/AutoInstrumentationRule/{AutoInstrumentationRuleId}` (FetchAutoInstrumentationRule, PatchAutoInstrumentationRule, DeleteAutoInstrumentationRule) +- `/v1/ControlPlane/AutoInstrumentationRule/{AutoInstrumentationRuleId}/Versions` (ListAutoInstrumentationRuleVersions) +- `/v1/ControlPlane/AutoInstrumentationRule/{AutoInstrumentationRuleId}/Versions/{Version}` (FetchAutoInstrumentationRuleVersion) +- **Added new schemas**: +- EventSource, EventSourceCreate, EventSourceUpdate +- WriteKey, WriteKeyCreate +- EventSourceDataset, EventSourceDatasetCreate, EventSourceDatasetUpdate +- EventSchema, EventSchemaCreate, EventSchemaUpdate, EventSchemaField, EventSchemaProperty +- AutoInstrumentationRule, AutoInstrumentationRuleCreate, AutoInstrumentationRuleUpdate +- AutoInstrumentationRuleVersion, AutoInstrumentationRuleVersionsResponse +- ## 2026-06-12 +- **Added 16 new path(s)**: +- `/v1/DataSyncs/{syncId}` (FetchDataSync) +- `/v1/CloudAppSources/{sourceId}/Objects` (ListCloudAppObjects) +- `/v1/WarehouseSources/{sourceId}/Preview` (CreateWarehousePreview) +- `/v1/WarehouseSources/{sourceId}/Preview/{operationId}` (FetchWarehousePreview) +- `/v1/DataSample/{operationId}` (FetchDataSample) +- `/v1/ControlPlane/CloudAppSources/{sourceId}` (FetchCloudAppSource, PatchCloudAppSource, DeleteCloudAppSource) +- `/v1/ControlPlane/CloudAppSources/{sourceId}/Datasets` (ListCloudAppDatasets, CreateCloudAppDataset) +- `/v1/ControlPlane/CloudAppSources/{sourceId}/Datasets/{datasetId}` (FetchCloudAppDataset, PatchCloudAppDataset, DeleteCloudAppDataset) +- `/v1/ControlPlane/WarehouseSources/{sourceId}` (FetchWarehouseSource, PatchWarehouseSource, DeleteWarehouseSource) +- `/v1/ControlPlane/WarehouseSources/{sourceId}/Datasets` (ListWarehouseDatasets, CreateWarehouseDataset) +- ...and 6 more paths +- **Removed 16 path(s)**: +- `/v1/DataSyncs/{SyncId}` (FetchDataSync) +- `/v1/CloudAppSources/{SourceId}/Objects` (ListCloudAppObjects) +- `/v1/WarehouseSources/{SourceId}/Preview` (CreateWarehousePreview) +- `/v1/WarehouseSources/{SourceId}/Preview/{OperationId}` (FetchWarehousePreview) +- `/v1/DataSample/{OperationId}` (FetchDataSample) +- `/v1/ControlPlane/CloudAppSources/{SourceId}` (FetchCloudAppSource, PatchCloudAppSource, DeleteCloudAppSource) +- `/v1/ControlPlane/CloudAppSources/{SourceId}/Datasets` (ListCloudAppDatasets, CreateCloudAppDataset) +- `/v1/ControlPlane/CloudAppSources/{SourceId}/Datasets/{DatasetId}` (FetchCloudAppDataset, PatchCloudAppDataset, DeleteCloudAppDataset) +- `/v1/ControlPlane/WarehouseSources/{SourceId}` (FetchWarehouseSource, PatchWarehouseSource, DeleteWarehouseSource) +- `/v1/ControlPlane/WarehouseSources/{SourceId}/Datasets` (ListWarehouseDatasets, CreateWarehouseDataset) +- ...and 6 more paths + +**Deletions** +- # API Changes +- ## 2026-06-23 +- Initial public Rest Proxy registration for the User Data Deletions API +- (`POST` / `GET /v1/UserDataDeletions`, `GET /v1/UserDataDeletions/{deletionId}`, +- `GET /v1/Operations/{operationId}`). +- A single request may mix identifier formats: E.164 phone numbers, email +- addresses, and profile IDs. + +**Destinations** +- # API Changes +- ## 2026-08-12 +- Minor updates (formatting, metadata) +- ## 2026-08-12 +- **Content updates**: +- Added properties to `DestinationType`: releaseStatus +- Removed properties from `DestinationType`: maturity +- ## 2026-08-07 +- **Content updates**: +- Updated summary for `ListDestinationSupportedEventTypes` +- ## 2026-08-07 +- **Content updates**: +- Updated summary for `ListDestinationSupportedEventTypes` +- ## 2026-08-07 +- **Added 3 new path(s)**: +- `/v1/Catalog/DestinationSupportedEventTypes` (ListDestinationSupportedEventTypes) +- `/v1/ControlPlane/Subscriptions/{subscriptionId}/EventTypes` (ListSubscribedEvents, CreateSubscribedEvent) +- `/v1/ControlPlane/Subscriptions/{subscriptionId}/EventTypes/{eventType}` (GetSubscribedEvent, UpdateSubscribedEvent, DeleteSubscribedEvent) +- **Removed 3 path(s)**: +- `/v1/ControlPlane/Subscriptions/{subscriptionId}/SubscribedEvents` (ListSubscribedEvents, CreateSubscribedEvent) +- `/v1/ControlPlane/Subscriptions/{subscriptionId}/SubscribedEvents/{eventType}` (GetSubscribedEvent, UpdateSubscribedEvent, DeleteSubscribedEvent) +- `/v1/Catalog/DestinationEventTypes` (ListDestinationEventTypes) +- ## 2026-08-04 +- Minor updates (formatting, metadata) +- ## 2026-08-04 +- Minor updates (formatting, metadata) +- ## 2026-08-04 +- Minor updates (formatting, metadata) +- ## 2026-08-04 +- Minor updates (formatting, metadata) +- ## 2026-08-04 +- **Content updates**: +- Added properties to `SubscriptionResponse`: eventTypes +- ## 2026-08-03 +- **Content updates**: +- Added properties to `DestinationType`: documentationUrl, maturity, tier, categories +- ## 2026-07-27 +- Minor updates (formatting, metadata) +- ## 2026-07-23 +- **Content updates**: +- `meta` is now a required property in the response of `ListDestinations`, `ListSubscriptions`, and `ListSubscribedEvents` +- `CreateSubscribedEvent` request body schema consolidated onto `SubscribedEventInput` (previously `SubscribedEventCreate`, a duplicate schema) +- Added response examples for `ListDestinations`, `ListSubscriptions`, and `ListSubscribedEvents` +- ## 2026-07-23 +- **Added 1 new path(s)**: +- `/v1/Catalog/DestinationEventTypes` (ListDestinationEventTypes) +- ## 2026-07-22 +- **Content updates**: +- Added parameter(s) to `ListDestinations`: namePrefix +- Updated description for `UpdateSubscription` +- Added properties to `SubscriptionUpdate`: eventTypes +- ## 2026-07-16 +- Initial release with 9 paths and 18 operations + +**Events** +- Add `stage-ie1` realm support for EventTypes and Schemas endpoints (datataps-catalog) + +**Memory** +- ## 2026-08-18 +- **Breaking change**: +- Removed the deprecated `CSV` and `DATASET` values from the `DataMappingType` enum. +- `INGRESS`, `DATASET_CLOUDAPP`, and `DATASET_WAREHOUSE` are the only valid values now. +- Removed the `DataMappingFromCSV` and `DataMappingFromDataSet` schemas and their +- `oneOf`/discriminator entries on `DataMappingFromTypes`, along with the corresponding +- `CSV`/`DATASET` discriminator mapping keys. +- Any caller still sending `type: CSV` or `type: DATASET` on `CreateDataMapping` or +- `UpdateDataMapping` (or filtering `ListDataMappings`/`ListDataMappingSuggestions` by +- those values) will get a 400. +- ## 2026-08-10 +- No path changes (updated metadata only) +- `DataMappingType` gains `INGRESS`, `DATASET_CLOUDAPP`, and `DATASET_WAREHOUSE`. +- `CSV` and `DATASET` remain valid and unchanged; they are deprecated aliases and +- will be removed in a follow-up change. +- `DataMappingFromTypes` gains three `oneOf` members and three discriminator keys: +- `DataMappingFromIngress` (renames `DataMappingFromCSV`), +- `DataMappingFromCloudAppDataSet` and `DataMappingFromWarehouseDataSet` +- (both split from `DataMappingFromDataSet`, distinguishing a cloud-app-backed +- TDI dataset from a warehouse-backed one). +- Additive and backwards compatible: existing `CSV` and `DATASET` payloads are +- unaffected. +- ## 2026-08-10 +- **Content updates**: +- Removed `Events` endpoints from the spec, as they were hidden, never implemented, and are not part of the public API +- ## 2026-08-07 +- **New functionality**: +- Added `pageSize`, `pageToken`, and `orderBy` query parameters to `ListProfileImportsV2`, plus a `meta` object in its response, to support pagination. +- **Content updates**: +- Updated the `ListProfileImportsV2` description to document the new pagination behavior. +- Corrected the example presigned upload URL on `CreateProfilesImportV2` to match the real S3 bucket naming convention. +- Corrected the `meta.key` example on `ListProfileTraits`'s response (was `profiles`, now `traits`) to accurately describe which response field it points to. +- ## 2026-08-07 +- **Content updates**: +- Updated `matchingRules` description in `IdentityResolutionSettingsCore` to remove compound `AND` rule documentation +- ## 2026-07-30 +- **Content updates**: +- Increased the maximum value for the Twilio error `code` from `99999` to `999999` +- ## 2026-07-28 +- **Content updates**: +- Updated the `pageSize` description on the pagination `Meta` schema to clarify it reflects the number of items actually returned, not the requested or default page size. +- ## 2026-07-13 +- **Content updates**: +- Renamed `ListProfiles` response schema references from `ProfileID`/`ProfilesMeta` to `IdentityProfileID`/`IdentityProfilesMeta` (new `IdentityProfilesMeta` schema added; `ProfileID`/`ProfilesMeta` retained for other operations). +- ## 2026-07-08 +- **Content updates**: +- Updated description for `CreateDataMappingSuggestion` +- Updated description for `FetchDataMappingSuggestion` +- ## 2026-07-06 +- **Added 2 new path(s)**: +- `/v1/ControlPlane/Stores/{storeId}/DataMappings/Suggestions` (ListDataMappingSuggestions, CreateDataMappingSuggestion) +- `/v1/ControlPlane/Stores/{storeId}/DataMappings/Suggestions/{suggestionId}` (FetchDataMappingSuggestion) +- ## 2026-06-26 +- **Content updates**: +- Minor updates (formatting, metadata) +- Updated x-twilio location parameter from `instance` to `list` for all endpoints that don't end with a /{param} +- Updated description for `UpdateProfileTraits` +- Updated summary for `UpdateProfileTraits` +- Removed properties from `MappingTraitItem`: fieldName +- Removed `additionalProperties` from `allof` schemas since it isn't supported and causes invalid lint errors on example blocks. +- matruity ga and libraryVisibility public +- ## 2026-06-24 +- **Content updates**: +- Add ConversationID as an optional query parameter for ListObservations and ListConversationSummaries +- ## 2026-05-01 +- Updated description & summary for `UpdateProfileTraits` +- Updated description for `FetchIdentityResolutionSettings` +- Removed properties from `MappingTraitItem`: fieldName +- Updated patch Observations to not require `occurredAt`, `content`, or `source` +- ## 2026-04-28 +- **Content updates**: +- Updated description for `UpdateProfileTraits` +- Updated summary for `UpdateProfileTraits` +- Added properties to `TraitDefinition`: validationRule +- Removed properties from `MappingTraitItem`: fieldName + +**Messaging_admin** +- Add Intelligent Alerts endpoints at `/v1/Messaging/IntelligentAlertsEvents/*`, routing to intelligent-alerts-api via messaging-monkey-backend. Account SID is a required query parameter (`accountSid`) on all three endpoints. + +**Voice** +- ## 2026-08-05 +- Added GET /v3/Transcriptions to list and filter transcriptions (status, sourceId, languageCode, createdAfter/createdBefore) with pageSize/pageToken pagination. createdAfter is inclusive and createdBefore exclusive. Returns 422 (error code 17535) when a sourceId's historical item count exceeds the service scan cap + +**Webhooks** +- # API Changes +- ## 2026-08-24 +- **Changed**: Created Webhooks Config API ( https://docs.google.com/document/d/1zkAJD8a8MgoxWifdYDl_d465Az3W6CcD9fuCC2xlSXE/edit?tab=t.0#heading=h.u9e0ry6oe89j ), that includes 7 new resource(s)**: SharedKeys, AuthProfiles, Settings, Rules, Operations, Tests, EdgeZones in /v1/Webhooks referencing webhooks-config downstream. + + [2026-05-07] Version 12.1.1 --------------------------- **Library - Chore** diff --git a/src/main/java/com/twilio/Domains.java b/src/main/java/com/twilio/Domains.java index df0878bfdb..7935387aa7 100644 --- a/src/main/java/com/twilio/Domains.java +++ b/src/main/java/com/twilio/Domains.java @@ -13,7 +13,6 @@ public enum Domains { ACCOUNTS("accounts"), API("api"), - ASSISTANTS("assistants"), BULKEXPORTS("bulkexports"), CHAT("chat"), CONTENT("content"), diff --git a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotionUpdater.java b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotionUpdater.java index f883996724..7a4db7e339 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotionUpdater.java +++ b/src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotionUpdater.java @@ -16,6 +16,9 @@ import com.twilio.base.TwilioResponse; import com.twilio.base.Updater; +import com.twilio.constant.EnumConstants; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.converter.Serializer; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -29,8 +32,17 @@ public class AuthTokenPromotionUpdater extends Updater { + private Boolean suppressEmailNotification; + public AuthTokenPromotionUpdater() {} + public AuthTokenPromotionUpdater setSuppressEmailNotification( + final Boolean suppressEmailNotification + ) { + this.suppressEmailNotification = suppressEmailNotification; + return this; + } + private Response makeRequest(final TwilioRestClient client) { String path = "/v1/AuthTokens/Promote"; @@ -39,6 +51,8 @@ private Response makeRequest(final TwilioRestClient client) { Domains.ACCOUNTS.toString(), path ); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + addPostParams(request); Response response = client.request(request); @@ -87,4 +101,15 @@ public TwilioResponse updateWithResponse( response.getHeaders() ); } + + private void addPostParams(final Request request) { + if (suppressEmailNotification != null) { + Serializer.toString( + request, + "SuppressEmailNotification", + suppressEmailNotification, + ParameterType.URLENCODED + ); + } + } } 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..c733e78f53 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } BulkConsents other = (BulkConsents) o; - return (Objects.equals(items, other.items)); + return Objects.equals(items, other.items); } @Override 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..04003ff8f4 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } BulkContacts other = (BulkContacts) o; - return (Objects.equals(items, other.items)); + return Objects.equals(items, other.items); } @Override 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..45a58a9950 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java +++ b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissions.java @@ -125,7 +125,7 @@ public boolean equals(final Object o) { } MessagingGeopermissions other = (MessagingGeopermissions) o; - return (Objects.equals(permissions, other.permissions)); + return Objects.equals(permissions, other.permissions); } @Override diff --git a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsFetcher.java b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsFetcher.java index 5148f87d1f..ea0c1eedf7 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsFetcher.java +++ b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class MessagingGeopermissionsFetcher - extends Fetcher { + extends Fetcher +{ private String countryCode; diff --git a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsUpdater.java b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsUpdater.java index 036662b522..61fda4885e 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsUpdater.java +++ b/src/main/java/com/twilio/rest/accounts/v1/MessagingGeopermissionsUpdater.java @@ -33,7 +33,8 @@ import java.util.List; public class MessagingGeopermissionsUpdater - extends Updater { + extends Updater +{ private List permissions; diff --git a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenCreator.java b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenCreator.java index 41b1d1c0dc..2521786507 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenCreator.java +++ b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenCreator.java @@ -16,6 +16,9 @@ import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; +import com.twilio.constant.EnumConstants; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.converter.Serializer; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -29,8 +32,17 @@ public class SecondaryAuthTokenCreator extends Creator { + private Boolean suppressEmailNotification; + public SecondaryAuthTokenCreator() {} + public SecondaryAuthTokenCreator setSuppressEmailNotification( + final Boolean suppressEmailNotification + ) { + this.suppressEmailNotification = suppressEmailNotification; + return this; + } + private Response makeRequest(final TwilioRestClient client) { String path = "/v1/AuthTokens/Secondary"; @@ -39,6 +51,8 @@ private Response makeRequest(final TwilioRestClient client) { Domains.ACCOUNTS.toString(), path ); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + addPostParams(request); Response response = client.request(request); @@ -87,4 +101,15 @@ public TwilioResponse createWithResponse( response.getHeaders() ); } + + private void addPostParams(final Request request) { + if (suppressEmailNotification != null) { + Serializer.toString( + request, + "SuppressEmailNotification", + suppressEmailNotification, + ParameterType.URLENCODED + ); + } + } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenDeleter.java b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenDeleter.java index bfe65d04c8..21c915ee1a 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenDeleter.java +++ b/src/main/java/com/twilio/rest/accounts/v1/SecondaryAuthTokenDeleter.java @@ -16,6 +16,8 @@ import com.twilio.base.Deleter; import com.twilio.base.TwilioResponse; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.converter.Serializer; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -30,8 +32,17 @@ public class SecondaryAuthTokenDeleter extends Deleter { + private Boolean suppressEmailNotification; + public SecondaryAuthTokenDeleter() {} + public SecondaryAuthTokenDeleter setSuppressEmailNotification( + final Boolean suppressEmailNotification + ) { + this.suppressEmailNotification = suppressEmailNotification; + return this; + } + private Response makeRequest(final TwilioRestClient client) { String path = "/v1/AuthTokens/Secondary"; @@ -42,6 +53,7 @@ private Response makeRequest(final TwilioRestClient client) { Domains.ACCOUNTS.toString(), path ); + addQueryParams(request); Response response = client.request(request); @@ -88,4 +100,15 @@ public TwilioResponse deleteWithResponse( response.getHeaders() ); } + + private void addQueryParams(final Request request) { + if (suppressEmailNotification != null) { + Serializer.toString( + request, + "SuppressEmailNotification", + suppressEmailNotification, + ParameterType.QUERY + ); + } + } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AddressCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/AddressCreator.java index 8244662207..ab3073ab01 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AddressCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AddressCreator.java @@ -137,11 +137,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AddressDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/AddressDeleter.java index c11cd3a409..863f8a04da 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AddressDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AddressDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AddressFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/AddressFetcher.java index 2941bc6d0c..b2a758c490 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AddressFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AddressFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AddressReader.java b/src/main/java/com/twilio/rest/api/v2010/account/AddressReader.java index 80548b8066..6df95351af 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AddressReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AddressReader.java @@ -103,11 +103,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AddressUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/AddressUpdater.java index fc2fd472d9..57080cbfc5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AddressUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AddressUpdater.java @@ -107,11 +107,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationCreator.java index c5b773f21c..3c890e6e89 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationCreator.java @@ -195,11 +195,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationDeleter.java index ee95efad24..5638352fb9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationFetcher.java index 6a55d5615c..0126e07e68 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationReader.java b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationReader.java index 5e826da305..6cf49117de 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationReader.java @@ -85,11 +85,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationUpdater.java index 54e1954ac5..1e8cbb4a24 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ApplicationUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ApplicationUpdater.java @@ -203,11 +203,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 51db2fc032..3fe7da13c2 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 @@ -210,9 +210,9 @@ private AuthorizedConnectApp( "connect_app_homepage_url" ) final URI connectAppHomepageUrl, @JsonProperty("connect_app_sid") final String connectAppSid, - @JsonProperty("permissions") final List< - AuthorizedConnectApp.Permission - > permissions, + @JsonProperty( + "permissions" + ) final List permissions, @JsonProperty("uri") final String uri ) { this.accountSid = accountSid; diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppFetcher.java index 6c7be1f852..a18603d594 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppFetcher.java @@ -52,16 +52,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConnectAppSid" + "}", - this.pathConnectAppSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConnectAppSid" + "}", + this.pathConnectAppSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppReader.java b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppReader.java index 25e51edeb4..e2d93843a1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AuthorizedConnectAppReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryFetcher.java index 9fe20484e1..2092c2a15d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AvailablePhoneNumberCountryFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathCountryCode; @@ -53,16 +54,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java index 3be6a31e78..e45c2ac33f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AvailablePhoneNumberCountryReader - extends Reader { + extends Reader +{ private String pathAccountSid; private Long pageSize; @@ -78,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/BalanceFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/BalanceFetcher.java index 44f4f4ffdf..051883d9f8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/BalanceFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/BalanceFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java index da524bbcc9..67153bc7ce 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java @@ -64,6 +64,7 @@ public class CallCreator extends Creator { private String asyncAmd; private URI asyncAmdStatusCallback; private HttpMethod asyncAmdStatusCallbackMethod; + private String passports; private String byoc; private String callReason; private String callToken; @@ -335,6 +336,11 @@ public CallCreator setAsyncAmdStatusCallbackMethod( return this; } + public CallCreator setPassports(final String passports) { + this.passports = passports; + return this; + } + public CallCreator setByoc(final String byoc) { this.byoc = byoc; return this; @@ -405,11 +411,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -716,6 +721,15 @@ private void addPostParams(final Request request) { ); } + if (passports != null) { + Serializer.toString( + request, + "Passports", + passports, + ParameterType.URLENCODED + ); + } + if (byoc != null) { Serializer.toString( request, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/CallDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/CallDeleter.java index b39753d912..d4e24582e6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/CallDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/CallDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/CallFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/CallFetcher.java index 136f156b34..e20e2b61f3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/CallFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/CallFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/CallReader.java b/src/main/java/com/twilio/rest/api/v2010/account/CallReader.java index 31510edebd..73a1e3db33 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/CallReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/CallReader.java @@ -145,11 +145,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/CallUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/CallUpdater.java index 3115e188c8..44805a193b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/CallUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/CallUpdater.java @@ -125,11 +125,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceFetcher.java index c89f9e82b9..e764f607f3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceReader.java b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceReader.java index e6f671096f..651f0da435 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceReader.java @@ -136,11 +136,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceUpdater.java index 4640e820d6..fe70b2e793 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConferenceUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConferenceUpdater.java @@ -81,11 +81,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 9425b42cf8..fd7e65c2b9 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 @@ -231,9 +231,9 @@ private ConnectApp( @JsonProperty("description") final String description, @JsonProperty("friendly_name") final String friendlyName, @JsonProperty("homepage_url") final URI homepageUrl, - @JsonProperty("permissions") final List< - ConnectApp.Permission - > permissions, + @JsonProperty( + "permissions" + ) final List permissions, @JsonProperty("sid") final String sid, @JsonProperty("uri") final String uri ) { diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppDeleter.java index c408f65804..ddd0d8daae 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppFetcher.java index 7d9a7cdff6..0b87896561 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppReader.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppReader.java index 5667518e51..0dfcdc55b7 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppUpdater.java index b83e38b156..aa641eade0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ConnectAppUpdater.java @@ -140,11 +140,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberCreator.java index 457d8266a1..ee8435d65d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberCreator.java @@ -274,11 +274,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberDeleter.java index d4f81bf039..f5c403c748 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberFetcher.java index 60e5a1cf3e..ee2b55b9e8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberReader.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberReader.java index 90c9928b0d..4336852e28 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberReader.java @@ -113,11 +113,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberUpdater.java index 4d7915d0f1..5e9e38b0cc 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberUpdater.java @@ -249,11 +249,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/KeyDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/KeyDeleter.java index 2c2d119cb8..5f2c7bf269 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/KeyDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/KeyDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/KeyFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/KeyFetcher.java index ea13ba4db3..121ec10230 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/KeyFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/KeyFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/KeyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/KeyReader.java index 9e357edd54..ccef52355a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/KeyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/KeyReader.java @@ -75,11 +75,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/KeyUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/KeyUpdater.java index 02f23abe51..11f3e64ad8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/KeyUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/KeyUpdater.java @@ -57,11 +57,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java index fe1da24129..7b76fc986b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java @@ -326,11 +326,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageDeleter.java index ec272b92e3..7284624c15 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageFetcher.java index 8dbd359268..eae611d78a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageReader.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageReader.java index 9c3ed2327c..a220d383d0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageReader.java @@ -119,11 +119,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageUpdater.java index 2eec751308..bc48e9d3d2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageUpdater.java @@ -63,11 +63,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewKeyCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/NewKeyCreator.java index 1ff9251839..b39e01e9e6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewKeyCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewKeyCreator.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKeyCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKeyCreator.java index 9ccb6322b6..0a59aea887 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKeyCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NewSigningKeyCreator.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NotificationFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/NotificationFetcher.java index e41c48abdf..f2bdb63765 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NotificationFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NotificationFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/NotificationReader.java b/src/main/java/com/twilio/rest/api/v2010/account/NotificationReader.java index 2a33c3bb77..116e386c42 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/NotificationReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/NotificationReader.java @@ -108,11 +108,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdDeleter.java index 5d2e2b23d7..e14ba5def0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdFetcher.java index ec6230e0c5..5e07ddb95f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdReader.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdReader.java index bf24716ff1..3e6b1e52ea 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdReader.java @@ -99,11 +99,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdUpdater.java index eb605aaf97..f41eaf8056 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/OutgoingCallerIdUpdater.java @@ -61,11 +61,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/QueueCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/QueueCreator.java index ca676770fe..6935e38be4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/QueueCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/QueueCreator.java @@ -65,11 +65,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/QueueDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/QueueDeleter.java index 77068c012a..93b737ad8d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/QueueDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/QueueDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/QueueFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/QueueFetcher.java index de97303810..6350636564 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/QueueFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/QueueFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/QueueReader.java b/src/main/java/com/twilio/rest/api/v2010/account/QueueReader.java index 000d93c5c8..ed3529f0b5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/QueueReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/QueueReader.java @@ -75,11 +75,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/QueueUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/QueueUpdater.java index af13cc0c4b..021abc489c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/QueueUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/QueueUpdater.java @@ -63,11 +63,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/RecordingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/RecordingDeleter.java index 1fd4f160f9..057b96df1f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/RecordingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/RecordingDeleter.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/RecordingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/RecordingFetcher.java index e06cffd4ae..8b8e36bfbb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/RecordingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/RecordingFetcher.java @@ -58,11 +58,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/RecordingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/RecordingReader.java index 82493abcef..a79f23ce75 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/RecordingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/RecordingReader.java @@ -122,11 +122,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeFetcher.java index f096eeab69..08d2df465e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeFetcher.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeReader.java b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeReader.java index 3f2d77903d..7ab49915af 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeReader.java @@ -91,11 +91,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeUpdater.java index 1948e922c4..4906240bfd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ShortCodeUpdater.java @@ -100,11 +100,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyDeleter.java index 412475d6b3..4576b6367b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyFetcher.java index cfcf671be3..18e9c45d99 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyReader.java index dc7cae9591..0e4a5b70a6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyUpdater.java index 060b37a3ec..2852b51f91 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/SigningKeyUpdater.java @@ -61,11 +61,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/TokenCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/TokenCreator.java index f3ddcf6b3c..51a695a0fa 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/TokenCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/TokenCreator.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionDeleter.java index f844ea89f9..ff47c036cb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionFetcher.java index b0de7e5985..4564cd6a84 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionReader.java b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionReader.java index a7b8c3d0fb..161693c79c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/TranscriptionReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java index dfb51e27e8..71dc82cd42 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java @@ -110,11 +110,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumberReader.java b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumberReader.java index c10bc7f79b..4b0e6a9489 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumberReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumberReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "AddressSid" + "}", - this.pathAddressSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "AddressSid" + "}", + this.pathAddressSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/LocalReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/LocalReader.java index 0e800da128..ebc6e1abc0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/LocalReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/LocalReader.java @@ -204,16 +204,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachineReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachineReader.java index 1fa6aaef2d..1803d51d94 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachineReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MachineToMachineReader.java @@ -208,16 +208,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MobileReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MobileReader.java index ad7ab20f0f..3627e23617 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MobileReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/MobileReader.java @@ -204,16 +204,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/NationalReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/NationalReader.java index 45b02a0be8..1e59775634 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/NationalReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/NationalReader.java @@ -208,16 +208,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCostReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCostReader.java index b4a4f1262b..4eeb920274 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCostReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/SharedCostReader.java @@ -208,16 +208,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFreeReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFreeReader.java index ebac9c5bcb..2c8ff57e8a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFreeReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/TollFreeReader.java @@ -208,16 +208,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/VoipReader.java b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/VoipReader.java index 4ed2f671be..9a4c80a169 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/VoipReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/availablephonenumbercountry/VoipReader.java @@ -204,16 +204,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CountryCode" + "}", - this.pathCountryCode.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CountryCode" + "}", + this.pathCountryCode.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/EventReader.java b/src/main/java/com/twilio/rest/api/v2010/account/call/EventReader.java index 40282d8bd7..d1c0645905 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/EventReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/EventReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationFetcher.java index c2617c1a08..8d3c5ad11d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationFetcher.java @@ -56,11 +56,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationReader.java b/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationReader.java index bf546c3db2..bb413dd9b4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/NotificationReader.java @@ -116,11 +116,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java index 46e2c11a91..523ca79485 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java @@ -191,11 +191,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentUpdater.java index 7072a02685..61fda204cc 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentUpdater.java @@ -100,11 +100,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingCreator.java index 6432c4b34c..4c4f11bd42 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingCreator.java @@ -126,11 +126,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingDeleter.java index a46e4b2e59..8db11ceffe 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingDeleter.java @@ -57,11 +57,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingFetcher.java index 4d40e893c6..489463b26d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingFetcher.java @@ -56,11 +56,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingReader.java index 941948b024..e7bf5c27c4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingReader.java @@ -110,11 +110,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingUpdater.java index 81d47b1aa5..a02855a02d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/RecordingUpdater.java @@ -78,11 +78,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecCreator.java index ff89062bcb..345bade20c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecCreator.java @@ -1281,11 +1281,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecUpdater.java index d0ea566c15..2b5133b4f1 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/SiprecUpdater.java @@ -72,11 +72,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/StreamCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/StreamCreator.java index 9f79947850..4db954fc71 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/StreamCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/StreamCreator.java @@ -1288,11 +1288,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/StreamUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/call/StreamUpdater.java index efbbc971dc..3ed0d3b9a6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/StreamUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/StreamUpdater.java @@ -72,11 +72,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionCreator.java index 4549086f29..a7afe79779 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionCreator.java @@ -195,11 +195,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionUpdater.java index 1d70a443ad..b00b6c36e2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/TranscriptionUpdater.java @@ -74,11 +74,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageCreator.java index 8604b6266b..b3f95ccc55 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageCreator.java @@ -75,11 +75,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionCreator.java index 72c1115491..c128ffea26 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionCreator.java @@ -33,7 +33,8 @@ import java.net.URI; public class UserDefinedMessageSubscriptionCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathCallSid; @@ -94,11 +95,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionDeleter.java index 45348e8948..9c1c65b590 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/UserDefinedMessageSubscriptionDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class UserDefinedMessageSubscriptionDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathCallSid; @@ -61,11 +62,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantCreator.java index 79fa96ffab..5a6c2b1e8c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantCreator.java @@ -86,8 +86,17 @@ public class ParticipantCreator extends Creator { private HttpMethod amdStatusCallbackMethod; private String trim; private String callToken; + private String passports; private URI clientNotificationUrl; private String callerDisplayName; + private String emergencyCallerPosition; + private String emergencyCallerLocation; + private String emergencyName; + private String emergencyAddress; + private String emergencyZipCode; + private String emergencyCity; + private String emergencyState; + private String emergencyCountry; public ParticipantCreator( final String pathConferenceSid, @@ -478,6 +487,11 @@ public ParticipantCreator setCallToken(final String callToken) { return this; } + public ParticipantCreator setPassports(final String passports) { + this.passports = passports; + return this; + } + public ParticipantCreator setClientNotificationUrl( final URI clientNotificationUrl ) { @@ -500,6 +514,56 @@ public ParticipantCreator setCallerDisplayName( return this; } + public ParticipantCreator setEmergencyCallerPosition( + final String emergencyCallerPosition + ) { + this.emergencyCallerPosition = emergencyCallerPosition; + return this; + } + + public ParticipantCreator setEmergencyCallerLocation( + final String emergencyCallerLocation + ) { + this.emergencyCallerLocation = emergencyCallerLocation; + return this; + } + + public ParticipantCreator setEmergencyName(final String emergencyName) { + this.emergencyName = emergencyName; + return this; + } + + public ParticipantCreator setEmergencyAddress( + final String emergencyAddress + ) { + this.emergencyAddress = emergencyAddress; + return this; + } + + public ParticipantCreator setEmergencyZipCode( + final String emergencyZipCode + ) { + this.emergencyZipCode = emergencyZipCode; + return this; + } + + public ParticipantCreator setEmergencyCity(final String emergencyCity) { + this.emergencyCity = emergencyCity; + return this; + } + + public ParticipantCreator setEmergencyState(final String emergencyState) { + this.emergencyState = emergencyState; + return this; + } + + public ParticipantCreator setEmergencyCountry( + final String emergencyCountry + ) { + this.emergencyCountry = emergencyCountry; + return this; + } + private Response makeRequest(final TwilioRestClient client) { String path = "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json"; @@ -508,16 +572,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -1020,6 +1082,15 @@ private void addPostParams(final Request request) { ); } + if (passports != null) { + Serializer.toString( + request, + "Passports", + passports, + ParameterType.URLENCODED + ); + } + if (clientNotificationUrl != null) { Serializer.toString( request, @@ -1037,5 +1108,77 @@ private void addPostParams(final Request request) { ParameterType.URLENCODED ); } + + if (emergencyCallerPosition != null) { + Serializer.toString( + request, + "EmergencyCallerPosition", + emergencyCallerPosition, + ParameterType.URLENCODED + ); + } + + if (emergencyCallerLocation != null) { + Serializer.toString( + request, + "EmergencyCallerLocation", + emergencyCallerLocation, + ParameterType.URLENCODED + ); + } + + if (emergencyName != null) { + Serializer.toString( + request, + "EmergencyName", + emergencyName, + ParameterType.URLENCODED + ); + } + + if (emergencyAddress != null) { + Serializer.toString( + request, + "EmergencyAddress", + emergencyAddress, + ParameterType.URLENCODED + ); + } + + if (emergencyZipCode != null) { + Serializer.toString( + request, + "EmergencyZipCode", + emergencyZipCode, + ParameterType.URLENCODED + ); + } + + if (emergencyCity != null) { + Serializer.toString( + request, + "EmergencyCity", + emergencyCity, + ParameterType.URLENCODED + ); + } + + if (emergencyState != null) { + Serializer.toString( + request, + "EmergencyState", + emergencyState, + ParameterType.URLENCODED + ); + } + + if (emergencyCountry != null) { + Serializer.toString( + request, + "EmergencyCountry", + emergencyCountry, + ParameterType.URLENCODED + ); + } } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantDeleter.java index c5973d1f20..aba1ee4962 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantFetcher.java index 7502bea975..28f42cef3c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantReader.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantReader.java index 9caf958924..205bf29b5d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantReader.java @@ -105,16 +105,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantUpdater.java index 7de6473e27..ab2ddd9df5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/ParticipantUpdater.java @@ -152,16 +152,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingDeleter.java index cf20e69370..d457f4c975 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingFetcher.java index 23cdf81c77..9d48b5466f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingReader.java index afd3c850c5..08f5851952 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingReader.java @@ -110,16 +110,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingUpdater.java index 82808daa3b..65fd301ea3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/conference/RecordingUpdater.java @@ -78,16 +78,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnCreator.java index 67f856b3b4..2133155857 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnCreator.java @@ -69,16 +69,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnDeleter.java index 95f6fb495d..38a9898e95 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnFetcher.java index f50e2229f1..30e832d2ef 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnReader.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnReader.java index 4c1ecd371c..6e3e10b62d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/AssignedAddOnReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java index 50e459ed51..ba9c34892c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java @@ -236,11 +236,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalReader.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalReader.java index 7b902239b1..86bcad8b08 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java index c23e0bb2e1..e3060a8a13 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java @@ -236,11 +236,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileReader.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileReader.java index cb01b44d16..5e84485d73 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java index b5424c6b78..e3a43c6ac9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java @@ -238,11 +238,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeReader.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeReader.java index df67b31c6f..5b7dc35898 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeReader.java @@ -111,11 +111,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionFetcher.java index fb618999fc..b4114b0a06 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AssignedAddOnExtensionFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathResourceSid; @@ -65,21 +66,18 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); - path = - path.replace( - "{" + "AssignedAddOnSid" + "}", - this.pathAssignedAddOnSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); + path = path.replace( + "{" + "AssignedAddOnSid" + "}", + this.pathAssignedAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionReader.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionReader.java index 4213d8daaa..48c4fd07d2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/assignedaddon/AssignedAddOnExtensionReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AssignedAddOnExtensionReader - extends Reader { + extends Reader +{ private String pathAccountSid; private String pathResourceSid; @@ -95,21 +96,18 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ResourceSid" + "}", - this.pathResourceSid.toString() - ); - path = - path.replace( - "{" + "AssignedAddOnSid" + "}", - this.pathAssignedAddOnSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ResourceSid" + "}", + this.pathResourceSid.toString() + ); + path = path.replace( + "{" + "AssignedAddOnSid" + "}", + this.pathAssignedAddOnSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/FeedbackCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/message/FeedbackCreator.java index 7fa80b534b..d9be40be94 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/FeedbackCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/FeedbackCreator.java @@ -61,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaDeleter.java index b22199dccd..a1378e7df8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaDeleter.java @@ -57,16 +57,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaFetcher.java index 00d9678307..e44ccb9ca2 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaFetcher.java @@ -56,16 +56,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaReader.java b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaReader.java index 9190b69d36..898141faa9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/message/MediaReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/message/MediaReader.java @@ -106,16 +106,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberFetcher.java index 6f778029a4..d8e0bfbff5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberFetcher.java @@ -56,13 +56,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace("{" + "QueueSid" + "}", this.pathQueueSid.toString()); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "QueueSid" + "}", + this.pathQueueSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberReader.java b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberReader.java index 9336ddf59c..624551f27a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberReader.java @@ -83,13 +83,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace("{" + "QueueSid" + "}", this.pathQueueSid.toString()); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "QueueSid" + "}", + this.pathQueueSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberUpdater.java index 6acab6489f..77cba4a0cc 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/queue/MemberUpdater.java @@ -84,13 +84,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace("{" + "QueueSid" + "}", this.pathQueueSid.toString()); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "QueueSid" + "}", + this.pathQueueSid.toString() + ); path = path.replace("{" + "CallSid" + "}", this.pathCallSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultDeleter.java index 876097b3b6..a30ec3e6db 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultFetcher.java index 48db653710..e60c89cd86 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultReader.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultReader.java index 42af5c0b77..019cdb4fbf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/AddOnResultReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionDeleter.java index 42a91aee3a..57b88b4316 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "RecordingSid" + "}", - this.pathRecordingSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "RecordingSid" + "}", + this.pathRecordingSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionFetcher.java index 9c14c300d7..2167c3c112 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "RecordingSid" + "}", - this.pathRecordingSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "RecordingSid" + "}", + this.pathRecordingSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionReader.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionReader.java index 99917650a4..620ae78e58 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/TranscriptionReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "RecordingSid" + "}", - this.pathRecordingSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "RecordingSid" + "}", + this.pathRecordingSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadDeleter.java index d017658783..f153299694 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadDeleter.java @@ -65,21 +65,18 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); - path = - path.replace( - "{" + "AddOnResultSid" + "}", - this.pathAddOnResultSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); + path = path.replace( + "{" + "AddOnResultSid" + "}", + this.pathAddOnResultSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadFetcher.java index 1bf86c78b4..154a87840a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadFetcher.java @@ -64,21 +64,18 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); - path = - path.replace( - "{" + "AddOnResultSid" + "}", - this.pathAddOnResultSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); + path = path.replace( + "{" + "AddOnResultSid" + "}", + this.pathAddOnResultSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadReader.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadReader.java index 102d40b713..d2bab74030 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/PayloadReader.java @@ -94,21 +94,18 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); - path = - path.replace( - "{" + "AddOnResultSid" + "}", - this.pathAddOnResultSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); + path = path.replace( + "{" + "AddOnResultSid" + "}", + this.pathAddOnResultSid.toString() + ); Request request = new Request( HttpMethod.GET, 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..48e398611d 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 @@ -139,7 +139,7 @@ public boolean equals(final Object o) { } Data other = (Data) o; - return (Objects.equals(redirectTo, other.redirectTo)); + return Objects.equals(redirectTo, other.redirectTo); } @Override diff --git a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/DataFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/DataFetcher.java index e5853e53c6..4d8db17bfb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/DataFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/recording/addonresult/payload/DataFetcher.java @@ -64,26 +64,22 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "ReferenceSid" + "}", - this.pathReferenceSid.toString() - ); - path = - path.replace( - "{" + "AddOnResultSid" + "}", - this.pathAddOnResultSid.toString() - ); - path = - path.replace( - "{" + "PayloadSid" + "}", - this.pathPayloadSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "ReferenceSid" + "}", + this.pathReferenceSid.toString() + ); + path = path.replace( + "{" + "AddOnResultSid" + "}", + this.pathAddOnResultSid.toString() + ); + path = path.replace( + "{" + "PayloadSid" + "}", + this.pathPayloadSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListCreator.java index 5f94be375e..3ee762d905 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListCreator.java @@ -60,11 +60,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListDeleter.java index 6e5577ad44..254b1c352d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListFetcher.java index 1ac8a2cdb6..b8e7636eff 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListReader.java index 192702d22d..9900ca57f4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListUpdater.java index 03268a3064..e80f93796e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/CredentialListUpdater.java @@ -67,11 +67,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainCreator.java index 3218774507..dad8a775d0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainCreator.java @@ -156,11 +156,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainDeleter.java index 4d4d608c49..177ea75328 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainDeleter.java @@ -50,11 +50,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainFetcher.java index ee1e80ba36..f40625100b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainFetcher.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainReader.java index b6c3a49e8b..5fff7a4b83 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainReader.java @@ -75,11 +75,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainUpdater.java index 4da73479f9..62d8d990cf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/DomainUpdater.java @@ -158,11 +158,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListCreator.java index 0d9204d5e0..aab865126c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListCreator.java @@ -62,11 +62,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListDeleter.java index 23159d2bdc..631de0dc95 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListDeleter.java @@ -53,11 +53,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListFetcher.java index ce5032301c..08df677e57 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListFetcher.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListReader.java index 3d99a5aabe..80f691fdfb 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListUpdater.java index df83fde45a..b032d17f95 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/IpAccessControlListUpdater.java @@ -69,11 +69,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialCreator.java index 8655b46e82..79ffce9bed 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialCreator.java @@ -77,16 +77,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CredentialListSid" + "}", - this.pathCredentialListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CredentialListSid" + "}", + this.pathCredentialListSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialDeleter.java index fbc64314ff..66a8ad868d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CredentialListSid" + "}", - this.pathCredentialListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CredentialListSid" + "}", + this.pathCredentialListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialFetcher.java index 5abe154985..22cf0261bf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CredentialListSid" + "}", - this.pathCredentialListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CredentialListSid" + "}", + this.pathCredentialListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialReader.java index ecc99405d6..7c34a39c54 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CredentialListSid" + "}", - this.pathCredentialListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CredentialListSid" + "}", + this.pathCredentialListSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialUpdater.java index 033c94ccd2..5c399e9415 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/credentiallist/CredentialUpdater.java @@ -68,16 +68,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "CredentialListSid" + "}", - this.pathCredentialListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "CredentialListSid" + "}", + this.pathCredentialListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingCreator.java index 0ee052db83..c108179bed 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class CredentialListMappingCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathDomainSid; @@ -70,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingDeleter.java index b790909a80..641c66cd74 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class CredentialListMappingDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathDomainSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingFetcher.java index dbaaf82b6a..32b7600f99 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class CredentialListMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathDomainSid; @@ -60,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingReader.java index 82f52e0a04..ac54586884 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/CredentialListMappingReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingCreator.java index 0c4b52bf24..a79340c72b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class IpAccessControlListMappingCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathDomainSid; @@ -70,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingDeleter.java index e241fd6630..e0f329247e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class IpAccessControlListMappingDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathDomainSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingFetcher.java index 7dd683392a..ba1c7c641f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class IpAccessControlListMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathDomainSid; @@ -60,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingReader.java index 101a11cdf3..a2f6cb6eca 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/IpAccessControlListMappingReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class IpAccessControlListMappingReader - extends Reader { + extends Reader +{ private String pathAccountSid; private String pathDomainSid; @@ -88,16 +89,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingCreator.java index a822617595..f0cd88b285 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class AuthCallsCredentialListMappingCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathDomainSid; @@ -70,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingDeleter.java index 863aeb0152..230b78285c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class AuthCallsCredentialListMappingDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathDomainSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingFetcher.java index 9708045173..92fbb89a55 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AuthCallsCredentialListMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathDomainSid; @@ -60,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingReader.java index 1a0cdeb623..0ec6f1df57 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsCredentialListMappingReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AuthCallsCredentialListMappingReader - extends Reader { + extends Reader +{ private String pathAccountSid; private String pathDomainSid; @@ -87,16 +88,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingCreator.java index e1f4905400..4bbf959c18 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class AuthCallsIpAccessControlListMappingCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathDomainSid; @@ -70,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -124,9 +123,9 @@ public AuthCallsIpAccessControlListMapping create( } @Override - public TwilioResponse< - AuthCallsIpAccessControlListMapping - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); AuthCallsIpAccessControlListMapping content = AuthCallsIpAccessControlListMapping.fromJson( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingDeleter.java index 6a6faff18f..7fe87871e3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class AuthCallsIpAccessControlListMappingDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathDomainSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingFetcher.java index 0668fa7f26..164d4ac7d8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AuthCallsIpAccessControlListMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathDomainSid; @@ -60,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( @@ -113,9 +112,9 @@ public AuthCallsIpAccessControlListMapping fetch( } @Override - public TwilioResponse< - AuthCallsIpAccessControlListMapping - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); AuthCallsIpAccessControlListMapping content = AuthCallsIpAccessControlListMapping.fromJson( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingReader.java index bf459c2839..d287181c3e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtypecalls/AuthCallsIpAccessControlListMappingReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AuthCallsIpAccessControlListMappingReader - extends Reader { + extends Reader +{ private String pathAccountSid; private String pathDomainSid; @@ -61,9 +62,9 @@ public AuthCallsIpAccessControlListMappingReader setPageSize( return this; } - public ResourceSetResponse< - AuthCallsIpAccessControlListMapping - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -89,16 +90,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingCreator.java index 223ff1001f..5147d01836 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class AuthRegistrationsCredentialListMappingCreator - extends Creator { + extends Creator +{ private String pathAccountSid; private String pathDomainSid; @@ -70,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -124,9 +123,9 @@ public AuthRegistrationsCredentialListMapping create( } @Override - public TwilioResponse< - AuthRegistrationsCredentialListMapping - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); AuthRegistrationsCredentialListMapping content = AuthRegistrationsCredentialListMapping.fromJson( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingDeleter.java index 14aa5fa85d..69de6c4a1c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class AuthRegistrationsCredentialListMappingDeleter - extends Deleter { + extends Deleter +{ private String pathAccountSid; private String pathDomainSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingFetcher.java index 4332736d89..bc091ed769 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AuthRegistrationsCredentialListMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathAccountSid; private String pathDomainSid; @@ -60,16 +61,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( @@ -113,9 +112,9 @@ public AuthRegistrationsCredentialListMapping fetch( } @Override - public TwilioResponse< - AuthRegistrationsCredentialListMapping - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); AuthRegistrationsCredentialListMapping content = AuthRegistrationsCredentialListMapping.fromJson( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingReader.java index 56acf4243a..ab51b2e275 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/domain/authtypes/authtyperegistrations/AuthRegistrationsCredentialListMappingReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AuthRegistrationsCredentialListMappingReader - extends Reader { + extends Reader +{ private String pathAccountSid; private String pathDomainSid; @@ -61,9 +62,9 @@ public AuthRegistrationsCredentialListMappingReader setPageSize( return this; } - public ResourceSetResponse< - AuthRegistrationsCredentialListMapping - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -89,16 +90,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressCreator.java index 7371c88ccd..98de9097a6 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressCreator.java @@ -85,16 +85,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "IpAccessControlListSid" + "}", - this.pathIpAccessControlListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "IpAccessControlListSid" + "}", + this.pathIpAccessControlListSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressDeleter.java index 9fe6df1ca2..0278b83796 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressDeleter.java @@ -60,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "IpAccessControlListSid" + "}", - this.pathIpAccessControlListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "IpAccessControlListSid" + "}", + this.pathIpAccessControlListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressFetcher.java index f3e60fa164..a1b13bf284 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressFetcher.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "IpAccessControlListSid" + "}", - this.pathIpAccessControlListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "IpAccessControlListSid" + "}", + this.pathIpAccessControlListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressReader.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressReader.java index eada202e2c..05b7ab441f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "IpAccessControlListSid" + "}", - this.pathIpAccessControlListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "IpAccessControlListSid" + "}", + this.pathIpAccessControlListSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressUpdater.java index 31f521537e..326c392217 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/sip/ipaccesscontrollist/IpAddressUpdater.java @@ -82,16 +82,14 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); - path = - path.replace( - "{" + "IpAccessControlListSid" + "}", - this.pathIpAccessControlListSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); + path = path.replace( + "{" + "IpAccessControlListSid" + "}", + this.pathIpAccessControlListSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java index 5cfcb3d921..b50073ae16 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java @@ -102,11 +102,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java index e38ba5f842..359dfca89c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java @@ -111,11 +111,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerDeleter.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerDeleter.java index 24bfff0b14..773f5493ee 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerDeleter.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerDeleter.java @@ -50,11 +50,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerFetcher.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerFetcher.java index 10ff8003ac..e091b79f1f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerFetcher.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerFetcher.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java index dbde230bc2..9314b9520d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java @@ -97,11 +97,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerUpdater.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerUpdater.java index bced031d86..28ea2346cf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerUpdater.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerUpdater.java @@ -76,11 +76,10 @@ private Response makeRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java index adcb385a22..c38522e41d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java index 0cc040ba46..6b1f383e0c 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java @@ -101,11 +101,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java index 7918f0918d..91c7b58b4d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java index 91f84a7b56..e4763eda2e 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java index c0da63798d..07188beffd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java index 1e3a243006..37f69b0fcf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java @@ -101,11 +101,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java index a5a64630d6..50c967a33f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java @@ -103,11 +103,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java index 2c81b5888a..770a65b8ef 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java @@ -107,11 +107,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java deleted file mode 100644 index f8953a77b1..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java +++ /dev/null @@ -1,1242 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -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.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.twilio.base.Resource; -import com.twilio.base.Resource; -import com.twilio.exception.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; -import java.util.Objects; -import lombok.Builder; -import lombok.Getter; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Assistant extends Resource { - - public static AssistantCreator creator( - final Assistant.AssistantsV1ServiceCreateAssistantRequest assistantsV1ServiceCreateAssistantRequest - ) { - return new AssistantCreator(assistantsV1ServiceCreateAssistantRequest); - } - - public static AssistantDeleter deleter(final String pathId) { - return new AssistantDeleter(pathId); - } - - public static AssistantFetcher fetcher(final String pathId) { - return new AssistantFetcher(pathId); - } - - public static AssistantReader reader() { - return new AssistantReader(); - } - - public static AssistantUpdater updater(final String pathId) { - return new AssistantUpdater(pathId); - } - - @JsonDeserialize(builder = AssistantsV1ServiceTool.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceTool { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - @Getter - private final String accountSid; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("enabled") - @Getter - private final Boolean enabled; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("meta") - @Getter - private final Object meta; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("requires_auth") - @Getter - private final Boolean requiresAuth; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - @Getter - private final String url; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_created") - @Getter - private final ZonedDateTime dateCreated; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_updated") - @Getter - private final ZonedDateTime dateUpdated; - - private AssistantsV1ServiceTool(Builder builder) { - this.accountSid = builder.accountSid; - this.description = builder.description; - this.enabled = builder.enabled; - this.id = builder.id; - this.meta = builder.meta; - this.name = builder.name; - this.requiresAuth = builder.requiresAuth; - this.type = builder.type; - this.url = builder.url; - this.dateCreated = builder.dateCreated; - this.dateUpdated = builder.dateUpdated; - } - - public static Builder builder( - final String description, - final Boolean enabled, - final String id, - final Object meta, - final String name, - final Boolean requiresAuth, - final String type, - final ZonedDateTime dateCreated, - final ZonedDateTime dateUpdated - ) { - return new Builder( - description, - enabled, - id, - meta, - name, - requiresAuth, - type, - dateCreated, - dateUpdated - ); - } - - public static AssistantsV1ServiceTool fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue(jsonString, AssistantsV1ServiceTool.class); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("account_sid") - private String accountSid; - - @JsonProperty("description") - private String description; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("id") - private String id; - - @JsonProperty("meta") - private Object meta; - - @JsonProperty("name") - private String name; - - @JsonProperty("requires_auth") - private Boolean requiresAuth; - - @JsonProperty("type") - private String type; - - @JsonProperty("url") - private String url; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_created") - private ZonedDateTime dateCreated; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_updated") - private ZonedDateTime dateUpdated; - - @JsonCreator - public Builder( - @JsonProperty("description") final String description, - @JsonProperty("enabled") final Boolean enabled, - @JsonProperty("id") final String id, - @JsonProperty("meta") final Object meta, - @JsonProperty("name") final String name, - @JsonProperty("requires_auth") final Boolean requiresAuth, - @JsonProperty("type") final String type, - @JsonProperty("date_created") final ZonedDateTime dateCreated, - @JsonProperty("date_updated") final ZonedDateTime dateUpdated - ) { - this.description = description; - this.enabled = enabled; - this.id = id; - this.meta = meta; - this.name = name; - this.requiresAuth = requiresAuth; - this.type = type; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - public Builder accountSid(String accountSid) { - this.accountSid = accountSid; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - public Builder url(String url) { - this.url = url; - return this; - } - - public AssistantsV1ServiceTool build() { - return new AssistantsV1ServiceTool(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceTool other = (AssistantsV1ServiceTool) o; - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(description, other.description) && - Objects.equals(enabled, other.enabled) && - Objects.equals(id, other.id) && - Objects.equals(meta, other.meta) && - Objects.equals(name, other.name) && - Objects.equals(requiresAuth, other.requiresAuth) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - accountSid, - description, - enabled, - id, - meta, - name, - requiresAuth, - type, - url, - dateCreated, - dateUpdated - ); - } - } - - @JsonDeserialize(builder = AssistantsV1ServiceCustomerAi.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCustomerAi { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("perception_engine_enabled") - @Getter - private final Boolean perceptionEngineEnabled; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("personalization_engine_enabled") - @Getter - private final Boolean personalizationEngineEnabled; - - private AssistantsV1ServiceCustomerAi(Builder builder) { - this.perceptionEngineEnabled = builder.perceptionEngineEnabled; - this.personalizationEngineEnabled = - builder.personalizationEngineEnabled; - } - - public static Builder builder( - final Boolean perceptionEngineEnabled, - final Boolean personalizationEngineEnabled - ) { - return new Builder( - perceptionEngineEnabled, - personalizationEngineEnabled - ); - } - - public static AssistantsV1ServiceCustomerAi fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCustomerAi.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("perception_engine_enabled") - private Boolean perceptionEngineEnabled; - - @JsonProperty("personalization_engine_enabled") - private Boolean personalizationEngineEnabled; - - @JsonCreator - public Builder( - @JsonProperty( - "perception_engine_enabled" - ) final Boolean perceptionEngineEnabled, - @JsonProperty( - "personalization_engine_enabled" - ) final Boolean personalizationEngineEnabled - ) { - this.perceptionEngineEnabled = perceptionEngineEnabled; - this.personalizationEngineEnabled = - personalizationEngineEnabled; - } - - public AssistantsV1ServiceCustomerAi build() { - return new AssistantsV1ServiceCustomerAi(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCustomerAi other = - (AssistantsV1ServiceCustomerAi) o; - return ( - Objects.equals( - perceptionEngineEnabled, - other.perceptionEngineEnabled - ) && - Objects.equals( - personalizationEngineEnabled, - other.personalizationEngineEnabled - ) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - perceptionEngineEnabled, - personalizationEngineEnabled - ); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceUpdateAssistantRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceUpdateAssistantRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("customer_ai") - @Getter - private final AssistantsV1ServiceCustomerAi customerAi; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("owner") - @Getter - private final String owner; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("personality_prompt") - @Getter - private final String personalityPrompt; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("segment_credential") - @Getter - private final AssistantsV1ServiceSegmentCredential segmentCredential; - - private AssistantsV1ServiceUpdateAssistantRequest(Builder builder) { - this.customerAi = builder.customerAi; - this.name = builder.name; - this.owner = builder.owner; - this.personalityPrompt = builder.personalityPrompt; - this.segmentCredential = builder.segmentCredential; - } - - public static Builder builder() { - return new Builder(); - } - - public static AssistantsV1ServiceUpdateAssistantRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceUpdateAssistantRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("customer_ai") - private AssistantsV1ServiceCustomerAi customerAi; - - @JsonProperty("name") - private String name; - - @JsonProperty("owner") - private String owner; - - @JsonProperty("personality_prompt") - private String personalityPrompt; - - @JsonProperty("segment_credential") - private AssistantsV1ServiceSegmentCredential segmentCredential; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("customer_ai") - public Builder customerAi( - AssistantsV1ServiceCustomerAi customerAi - ) { - this.customerAi = customerAi; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("owner") - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("personality_prompt") - public Builder personalityPrompt(String personalityPrompt) { - this.personalityPrompt = personalityPrompt; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("segment_credential") - public Builder segmentCredential( - AssistantsV1ServiceSegmentCredential segmentCredential - ) { - this.segmentCredential = segmentCredential; - return this; - } - - public AssistantsV1ServiceUpdateAssistantRequest build() { - return new AssistantsV1ServiceUpdateAssistantRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceUpdateAssistantRequest other = - (AssistantsV1ServiceUpdateAssistantRequest) o; - return ( - Objects.equals(customerAi, other.customerAi) && - Objects.equals(name, other.name) && - Objects.equals(owner, other.owner) && - Objects.equals(personalityPrompt, other.personalityPrompt) && - Objects.equals(segmentCredential, other.segmentCredential) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - customerAi, - name, - owner, - personalityPrompt, - segmentCredential - ); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceCreateAssistantRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCreateAssistantRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("customer_ai") - @Getter - private final AssistantsV1ServiceCustomerAi customerAi; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("owner") - @Getter - private final String owner; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("personality_prompt") - @Getter - private final String personalityPrompt; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("segment_credential") - @Getter - private final AssistantsV1ServiceSegmentCredential segmentCredential; - - private AssistantsV1ServiceCreateAssistantRequest(Builder builder) { - this.customerAi = builder.customerAi; - this.name = builder.name; - this.owner = builder.owner; - this.personalityPrompt = builder.personalityPrompt; - this.segmentCredential = builder.segmentCredential; - } - - public static Builder builder(final String name) { - return new Builder(name); - } - - public static AssistantsV1ServiceCreateAssistantRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCreateAssistantRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("customer_ai") - private AssistantsV1ServiceCustomerAi customerAi; - - @JsonProperty("name") - private String name; - - @JsonProperty("owner") - private String owner; - - @JsonProperty("personality_prompt") - private String personalityPrompt; - - @JsonProperty("segment_credential") - private AssistantsV1ServiceSegmentCredential segmentCredential; - - @JsonCreator - public Builder(@JsonProperty("name") final String name) { - this.name = name; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("customer_ai") - public Builder customerAi( - AssistantsV1ServiceCustomerAi customerAi - ) { - this.customerAi = customerAi; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("owner") - public Builder owner(String owner) { - this.owner = owner; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("personality_prompt") - public Builder personalityPrompt(String personalityPrompt) { - this.personalityPrompt = personalityPrompt; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("segment_credential") - public Builder segmentCredential( - AssistantsV1ServiceSegmentCredential segmentCredential - ) { - this.segmentCredential = segmentCredential; - return this; - } - - public AssistantsV1ServiceCreateAssistantRequest build() { - return new AssistantsV1ServiceCreateAssistantRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCreateAssistantRequest other = - (AssistantsV1ServiceCreateAssistantRequest) o; - return ( - Objects.equals(customerAi, other.customerAi) && - Objects.equals(name, other.name) && - Objects.equals(owner, other.owner) && - Objects.equals(personalityPrompt, other.personalityPrompt) && - Objects.equals(segmentCredential, other.segmentCredential) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - customerAi, - name, - owner, - personalityPrompt, - segmentCredential - ); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceSegmentCredential.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceSegmentCredential { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("profile_api_key") - @Getter - private final String profileApiKey; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("space_id") - @Getter - private final String spaceId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("write_key") - @Getter - private final String writeKey; - - private AssistantsV1ServiceSegmentCredential(Builder builder) { - this.profileApiKey = builder.profileApiKey; - this.spaceId = builder.spaceId; - this.writeKey = builder.writeKey; - } - - public static Builder builder() { - return new Builder(); - } - - public static AssistantsV1ServiceSegmentCredential fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceSegmentCredential.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("profile_api_key") - private String profileApiKey; - - @JsonProperty("space_id") - private String spaceId; - - @JsonProperty("write_key") - private String writeKey; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("profile_api_key") - public Builder profileApiKey(String profileApiKey) { - this.profileApiKey = profileApiKey; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("space_id") - public Builder spaceId(String spaceId) { - this.spaceId = spaceId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("write_key") - public Builder writeKey(String writeKey) { - this.writeKey = writeKey; - return this; - } - - public AssistantsV1ServiceSegmentCredential build() { - return new AssistantsV1ServiceSegmentCredential(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceSegmentCredential other = - (AssistantsV1ServiceSegmentCredential) o; - return ( - Objects.equals(profileApiKey, other.profileApiKey) && - Objects.equals(spaceId, other.spaceId) && - Objects.equals(writeKey, other.writeKey) - ); - } - - @Override - public int hashCode() { - return Objects.hash(profileApiKey, spaceId, writeKey); - } - } - - @JsonDeserialize(builder = AssistantsV1ServiceKnowledge.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceKnowledge { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - @Getter - private final String accountSid; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - @Getter - private final Object knowledgeSourceDetails; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("status") - @Getter - private final String status; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - @Getter - private final String url; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - @Getter - private final String embeddingModel; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_created") - @Getter - private final ZonedDateTime dateCreated; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_updated") - @Getter - private final ZonedDateTime dateUpdated; - - private AssistantsV1ServiceKnowledge(Builder builder) { - this.description = builder.description; - this.id = builder.id; - this.accountSid = builder.accountSid; - this.knowledgeSourceDetails = builder.knowledgeSourceDetails; - this.name = builder.name; - this.status = builder.status; - this.type = builder.type; - this.url = builder.url; - this.embeddingModel = builder.embeddingModel; - this.dateCreated = builder.dateCreated; - this.dateUpdated = builder.dateUpdated; - } - - public static Builder builder( - final String id, - final String name, - final String type, - final ZonedDateTime dateCreated, - final ZonedDateTime dateUpdated - ) { - return new Builder(id, name, type, dateCreated, dateUpdated); - } - - public static AssistantsV1ServiceKnowledge fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceKnowledge.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("description") - private String description; - - @JsonProperty("id") - private String id; - - @JsonProperty("account_sid") - private String accountSid; - - @JsonProperty("knowledge_source_details") - private Object knowledgeSourceDetails; - - @JsonProperty("name") - private String name; - - @JsonProperty("status") - private String status; - - @JsonProperty("type") - private String type; - - @JsonProperty("url") - private String url; - - @JsonProperty("embedding_model") - private String embeddingModel; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_created") - private ZonedDateTime dateCreated; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_updated") - private ZonedDateTime dateUpdated; - - @JsonCreator - public Builder( - @JsonProperty("id") final String id, - @JsonProperty("name") final String name, - @JsonProperty("type") final String type, - @JsonProperty("date_created") final ZonedDateTime dateCreated, - @JsonProperty("date_updated") final ZonedDateTime dateUpdated - ) { - this.id = id; - this.name = name; - this.type = type; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - public Builder accountSid(String accountSid) { - this.accountSid = accountSid; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - public Builder knowledgeSourceDetails( - Object knowledgeSourceDetails - ) { - this.knowledgeSourceDetails = knowledgeSourceDetails; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("status") - public Builder status(String status) { - this.status = status; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - public Builder url(String url) { - this.url = url; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - public Builder embeddingModel(String embeddingModel) { - this.embeddingModel = embeddingModel; - return this; - } - - public AssistantsV1ServiceKnowledge build() { - return new AssistantsV1ServiceKnowledge(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceKnowledge other = - (AssistantsV1ServiceKnowledge) o; - return ( - Objects.equals(description, other.description) && - Objects.equals(id, other.id) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && - Objects.equals(status, other.status) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) && - Objects.equals(embeddingModel, other.embeddingModel) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - description, - id, - accountSid, - knowledgeSourceDetails, - name, - status, - type, - url, - embeddingModel, - dateCreated, - dateUpdated - ); - } - } - - /** - * Converts a JSON String into a Assistant object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Assistant object represented by the provided JSON - */ - public static Assistant fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Assistant.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Assistant object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Assistant object represented by the provided JSON - */ - public static Assistant fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Assistant.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException 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); - } - } - - @Getter - private final String accountSid; - - @Getter - private final Object customerAi; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateCreated; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateUpdated; - - @Getter - private final String id; - - @Getter - private final List knowledge; - - @Getter - private final String model; - - @Getter - private final String name; - - @Getter - private final String owner; - - @Getter - private final String personalityPrompt; - - @Getter - private final List tools; - - @Getter - private final String url; - - @JsonCreator - private Assistant( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("customer_ai") final Object customerAi, - @JsonProperty("date_created") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateCreated, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, - @JsonProperty("id") final String id, - @JsonProperty("knowledge") final List< - AssistantsV1ServiceKnowledge - > knowledge, - @JsonProperty("model") final String model, - @JsonProperty("name") final String name, - @JsonProperty("owner") final String owner, - @JsonProperty("personality_prompt") final String personalityPrompt, - @JsonProperty("tools") final List tools, - @JsonProperty("url") final String url - ) { - this.accountSid = accountSid; - this.customerAi = customerAi; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - this.id = id; - this.knowledge = knowledge; - this.model = model; - this.name = name; - this.owner = owner; - this.personalityPrompt = personalityPrompt; - this.tools = tools; - this.url = url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Assistant other = (Assistant) o; - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(customerAi, other.customerAi) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(id, other.id) && - Objects.equals(knowledge, other.knowledge) && - Objects.equals(model, other.model) && - Objects.equals(name, other.name) && - Objects.equals(owner, other.owner) && - Objects.equals(personalityPrompt, other.personalityPrompt) && - Objects.equals(tools, other.tools) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - accountSid, - customerAi, - dateCreated, - dateUpdated, - id, - knowledge, - model, - name, - owner, - personalityPrompt, - tools, - url - ); - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantReader.java b/src/main/java/com/twilio/rest/assistants/v1/AssistantReader.java deleted file mode 100644 index d7d9da9637..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantReader.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class AssistantReader extends Reader { - - private Integer pageSize; - - public AssistantReader() {} - - public AssistantReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "assistants", - response.getContent(), - Assistant.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Assistants"; - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "assistants", - response.getContent(), - Assistant.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Assistant read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "assistants", - response.getContent(), - Assistant.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java deleted file mode 100644 index 87aa839461..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java +++ /dev/null @@ -1,733 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -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.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.twilio.base.Resource; -import com.twilio.base.Resource; -import com.twilio.exception.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; -import lombok.Builder; -import lombok.Getter; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Knowledge extends Resource { - - public static KnowledgeCreator creator( - final Knowledge.AssistantsV1ServiceCreateKnowledgeRequest assistantsV1ServiceCreateKnowledgeRequest - ) { - return new KnowledgeCreator(assistantsV1ServiceCreateKnowledgeRequest); - } - - public static KnowledgeDeleter deleter(final String pathId) { - return new KnowledgeDeleter(pathId); - } - - public static KnowledgeFetcher fetcher(final String pathId) { - return new KnowledgeFetcher(pathId); - } - - public static KnowledgeReader reader() { - return new KnowledgeReader(); - } - - public static KnowledgeUpdater updater(final String pathId) { - return new KnowledgeUpdater(pathId); - } - - @JsonDeserialize( - builder = AssistantsV1ServiceUpdateKnowledgeRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceUpdateKnowledgeRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - @Getter - private final Object knowledgeSourceDetails; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - private final AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - @Getter - private final String embeddingModel; - - private AssistantsV1ServiceUpdateKnowledgeRequest(Builder builder) { - this.description = builder.description; - this.knowledgeSourceDetails = builder.knowledgeSourceDetails; - this.name = builder.name; - this.policy = builder.policy; - this.type = builder.type; - this.embeddingModel = builder.embeddingModel; - } - - public static Builder builder() { - return new Builder(); - } - - public static AssistantsV1ServiceUpdateKnowledgeRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceUpdateKnowledgeRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("description") - private String description; - - @JsonProperty("knowledge_source_details") - private Object knowledgeSourceDetails; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy") - private AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonProperty("type") - private String type; - - @JsonProperty("embedding_model") - private String embeddingModel; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - public Builder knowledgeSourceDetails( - Object knowledgeSourceDetails - ) { - this.knowledgeSourceDetails = knowledgeSourceDetails; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - public Builder policy( - AssistantsV1ServiceCreatePolicyRequest policy - ) { - this.policy = policy; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(String type) { - this.type = type; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - public Builder embeddingModel(String embeddingModel) { - this.embeddingModel = embeddingModel; - return this; - } - - public AssistantsV1ServiceUpdateKnowledgeRequest build() { - return new AssistantsV1ServiceUpdateKnowledgeRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceUpdateKnowledgeRequest other = - (AssistantsV1ServiceUpdateKnowledgeRequest) o; - return ( - Objects.equals(description, other.description) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && - Objects.equals(policy, other.policy) && - Objects.equals(type, other.type) && - Objects.equals(embeddingModel, other.embeddingModel) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - description, - knowledgeSourceDetails, - name, - policy, - type, - embeddingModel - ); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceCreatePolicyRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCreatePolicyRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy_details") - @Getter - private final Object policyDetails; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - private AssistantsV1ServiceCreatePolicyRequest(Builder builder) { - this.description = builder.description; - this.id = builder.id; - this.name = builder.name; - this.policyDetails = builder.policyDetails; - this.type = builder.type; - } - - public static Builder builder(final Object policyDetails) { - return new Builder(policyDetails); - } - - public static AssistantsV1ServiceCreatePolicyRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCreatePolicyRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("description") - private String description; - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy_details") - private Object policyDetails; - - @JsonProperty("type") - private String type; - - @JsonCreator - public Builder( - @JsonProperty("policy_details") final Object policyDetails - ) { - this.policyDetails = policyDetails; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - public Builder id(String id) { - this.id = id; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(String type) { - this.type = type; - return this; - } - - public AssistantsV1ServiceCreatePolicyRequest build() { - return new AssistantsV1ServiceCreatePolicyRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCreatePolicyRequest other = - (AssistantsV1ServiceCreatePolicyRequest) o; - return ( - Objects.equals(description, other.description) && - Objects.equals(id, other.id) && - Objects.equals(name, other.name) && - Objects.equals(policyDetails, other.policyDetails) && - Objects.equals(type, other.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash(description, id, name, policyDetails, type); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceCreateKnowledgeRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCreateKnowledgeRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - @Getter - private final String assistantId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - @Getter - private final Object knowledgeSourceDetails; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - private final AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - @Getter - private final String embeddingModel; - - private AssistantsV1ServiceCreateKnowledgeRequest(Builder builder) { - this.assistantId = builder.assistantId; - this.description = builder.description; - this.knowledgeSourceDetails = builder.knowledgeSourceDetails; - this.name = builder.name; - this.policy = builder.policy; - this.type = builder.type; - this.embeddingModel = builder.embeddingModel; - } - - public static Builder builder(final String name, final String type) { - return new Builder(name, type); - } - - public static AssistantsV1ServiceCreateKnowledgeRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCreateKnowledgeRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("assistant_id") - private String assistantId; - - @JsonProperty("description") - private String description; - - @JsonProperty("knowledge_source_details") - private Object knowledgeSourceDetails; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy") - private AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonProperty("type") - private String type; - - @JsonProperty("embedding_model") - private String embeddingModel; - - @JsonCreator - public Builder( - @JsonProperty("name") final String name, - @JsonProperty("type") final String type - ) { - this.name = name; - this.type = type; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - public Builder assistantId(String assistantId) { - this.assistantId = assistantId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - public Builder knowledgeSourceDetails( - Object knowledgeSourceDetails - ) { - this.knowledgeSourceDetails = knowledgeSourceDetails; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - public Builder policy( - AssistantsV1ServiceCreatePolicyRequest policy - ) { - this.policy = policy; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - public Builder embeddingModel(String embeddingModel) { - this.embeddingModel = embeddingModel; - return this; - } - - public AssistantsV1ServiceCreateKnowledgeRequest build() { - return new AssistantsV1ServiceCreateKnowledgeRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCreateKnowledgeRequest other = - (AssistantsV1ServiceCreateKnowledgeRequest) o; - return ( - Objects.equals(assistantId, other.assistantId) && - Objects.equals(description, other.description) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && - Objects.equals(policy, other.policy) && - Objects.equals(type, other.type) && - Objects.equals(embeddingModel, other.embeddingModel) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - assistantId, - description, - knowledgeSourceDetails, - name, - policy, - type, - embeddingModel - ); - } - } - - /** - * Converts a JSON String into a Knowledge object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Knowledge object represented by the provided JSON - */ - public static Knowledge fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Knowledge object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Knowledge object represented by the provided JSON - */ - public static Knowledge fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException 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); - } - } - - @Getter - private final String accountSid; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateCreated; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateUpdated; - - @Getter - private final String description; - - @Getter - private final String embeddingModel; - - @Getter - private final String id; - - @Getter - private final Object knowledgeSourceDetails; - - @Getter - private final String name; - - @Getter - private final String status; - - @Getter - private final String type; - - @Getter - private final String url; - - @JsonCreator - private Knowledge( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("date_created") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateCreated, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, - @JsonProperty("description") final String description, - @JsonProperty("embedding_model") final String embeddingModel, - @JsonProperty("id") final String id, - @JsonProperty( - "knowledge_source_details" - ) final Object knowledgeSourceDetails, - @JsonProperty("name") final String name, - @JsonProperty("status") final String status, - @JsonProperty("type") final String type, - @JsonProperty("url") final String url - ) { - this.accountSid = accountSid; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - this.description = description; - this.embeddingModel = embeddingModel; - this.id = id; - this.knowledgeSourceDetails = knowledgeSourceDetails; - this.name = name; - this.status = status; - this.type = type; - this.url = url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Knowledge other = (Knowledge) o; - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(description, other.description) && - Objects.equals(embeddingModel, other.embeddingModel) && - Objects.equals(id, other.id) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && - Objects.equals(status, other.status) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - accountSid, - dateCreated, - dateUpdated, - description, - embeddingModel, - id, - knowledgeSourceDetails, - name, - status, - type, - url - ); - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeReader.java b/src/main/java/com/twilio/rest/assistants/v1/KnowledgeReader.java deleted file mode 100644 index d2c973754f..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeReader.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class KnowledgeReader extends Reader { - - private String assistantId; - private Integer pageSize; - - public KnowledgeReader() {} - - public KnowledgeReader setAssistantId(final String assistantId) { - this.assistantId = assistantId; - return this; - } - - public KnowledgeReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "knowledge", - response.getContent(), - Knowledge.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge"; - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "knowledge", - response.getContent(), - Knowledge.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Knowledge read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "knowledge", - response.getContent(), - Knowledge.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (assistantId != null) { - Serializer.toString( - request, - "AssistantId", - assistantId, - ParameterType.QUERY - ); - } - - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/SessionReader.java b/src/main/java/com/twilio/rest/assistants/v1/SessionReader.java deleted file mode 100644 index 8fceea373f..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/SessionReader.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class SessionReader extends Reader { - - private Integer pageSize; - - public SessionReader() {} - - public SessionReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "sessions", - response.getContent(), - Session.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Sessions"; - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "sessions", - response.getContent(), - Session.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Session read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "sessions", - response.getContent(), - Session.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/Tool.java b/src/main/java/com/twilio/rest/assistants/v1/Tool.java deleted file mode 100644 index 5e64133147..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/Tool.java +++ /dev/null @@ -1,977 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -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.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.twilio.base.Resource; -import com.twilio.base.Resource; -import com.twilio.exception.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; -import java.util.Objects; -import lombok.Builder; -import lombok.Getter; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Tool extends Resource { - - public static ToolCreator creator( - final Tool.AssistantsV1ServiceCreateToolRequest assistantsV1ServiceCreateToolRequest - ) { - return new ToolCreator(assistantsV1ServiceCreateToolRequest); - } - - public static ToolDeleter deleter(final String pathId) { - return new ToolDeleter(pathId); - } - - public static ToolFetcher fetcher(final String pathId) { - return new ToolFetcher(pathId); - } - - public static ToolReader reader() { - return new ToolReader(); - } - - public static ToolUpdater updater(final String pathId) { - return new ToolUpdater(pathId); - } - - @JsonDeserialize( - builder = AssistantsV1ServiceCreatePolicyRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCreatePolicyRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy_details") - @Getter - private final Object policyDetails; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - private AssistantsV1ServiceCreatePolicyRequest(Builder builder) { - this.description = builder.description; - this.id = builder.id; - this.name = builder.name; - this.policyDetails = builder.policyDetails; - this.type = builder.type; - } - - public static Builder builder(final Object policyDetails) { - return new Builder(policyDetails); - } - - public static AssistantsV1ServiceCreatePolicyRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCreatePolicyRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("description") - private String description; - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy_details") - private Object policyDetails; - - @JsonProperty("type") - private String type; - - @JsonCreator - public Builder( - @JsonProperty("policy_details") final Object policyDetails - ) { - this.policyDetails = policyDetails; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - public Builder id(String id) { - this.id = id; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(String type) { - this.type = type; - return this; - } - - public AssistantsV1ServiceCreatePolicyRequest build() { - return new AssistantsV1ServiceCreatePolicyRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCreatePolicyRequest other = - (AssistantsV1ServiceCreatePolicyRequest) o; - return ( - Objects.equals(description, other.description) && - Objects.equals(id, other.id) && - Objects.equals(name, other.name) && - Objects.equals(policyDetails, other.policyDetails) && - Objects.equals(type, other.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash(description, id, name, policyDetails, type); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceUpdateToolRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceUpdateToolRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - @Getter - private final String assistantId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("enabled") - @Getter - private final Boolean enabled; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("meta") - @Getter - private final Object meta; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - private final AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - private AssistantsV1ServiceUpdateToolRequest(Builder builder) { - this.assistantId = builder.assistantId; - this.description = builder.description; - this.enabled = builder.enabled; - this.meta = builder.meta; - this.name = builder.name; - this.policy = builder.policy; - this.type = builder.type; - } - - public static Builder builder() { - return new Builder(); - } - - public static AssistantsV1ServiceUpdateToolRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceUpdateToolRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("assistant_id") - private String assistantId; - - @JsonProperty("description") - private String description; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("meta") - private Object meta; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy") - private AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonProperty("type") - private String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - public Builder assistantId(String assistantId) { - this.assistantId = assistantId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("enabled") - public Builder enabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("meta") - public Builder meta(Object meta) { - this.meta = meta; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - public Builder policy( - AssistantsV1ServiceCreatePolicyRequest policy - ) { - this.policy = policy; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(String type) { - this.type = type; - return this; - } - - public AssistantsV1ServiceUpdateToolRequest build() { - return new AssistantsV1ServiceUpdateToolRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceUpdateToolRequest other = - (AssistantsV1ServiceUpdateToolRequest) o; - return ( - Objects.equals(assistantId, other.assistantId) && - Objects.equals(description, other.description) && - Objects.equals(enabled, other.enabled) && - Objects.equals(meta, other.meta) && - Objects.equals(name, other.name) && - Objects.equals(policy, other.policy) && - Objects.equals(type, other.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - assistantId, - description, - enabled, - meta, - name, - policy, - type - ); - } - } - - @JsonDeserialize( - builder = AssistantsV1ServiceCreateToolRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceCreateToolRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - @Getter - private final String assistantId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("enabled") - @Getter - private final Boolean enabled; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("meta") - @Getter - private final Object meta; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - private final AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - private AssistantsV1ServiceCreateToolRequest(Builder builder) { - this.assistantId = builder.assistantId; - this.description = builder.description; - this.enabled = builder.enabled; - this.meta = builder.meta; - this.name = builder.name; - this.policy = builder.policy; - this.type = builder.type; - } - - public static Builder builder( - final Boolean enabled, - final String name, - final String type - ) { - return new Builder(enabled, name, type); - } - - public static AssistantsV1ServiceCreateToolRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceCreateToolRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("assistant_id") - private String assistantId; - - @JsonProperty("description") - private String description; - - @JsonProperty("enabled") - private Boolean enabled; - - @JsonProperty("meta") - private Object meta; - - @JsonProperty("name") - private String name; - - @JsonProperty("policy") - private AssistantsV1ServiceCreatePolicyRequest policy; - - @JsonProperty("type") - private String type; - - @JsonCreator - public Builder( - @JsonProperty("enabled") final Boolean enabled, - @JsonProperty("name") final String name, - @JsonProperty("type") final String type - ) { - this.enabled = enabled; - this.name = name; - this.type = type; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("assistant_id") - public Builder assistantId(String assistantId) { - this.assistantId = assistantId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("meta") - public Builder meta(Object meta) { - this.meta = meta; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - public Builder policy( - AssistantsV1ServiceCreatePolicyRequest policy - ) { - this.policy = policy; - return this; - } - - public AssistantsV1ServiceCreateToolRequest build() { - return new AssistantsV1ServiceCreateToolRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceCreateToolRequest other = - (AssistantsV1ServiceCreateToolRequest) o; - return ( - Objects.equals(assistantId, other.assistantId) && - Objects.equals(description, other.description) && - Objects.equals(enabled, other.enabled) && - Objects.equals(meta, other.meta) && - Objects.equals(name, other.name) && - Objects.equals(policy, other.policy) && - Objects.equals(type, other.type) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - assistantId, - description, - enabled, - meta, - name, - policy, - type - ); - } - } - - @JsonDeserialize(builder = AssistantsV1ServicePolicy.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServicePolicy { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - private final String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - @Getter - private final String accountSid; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("user_sid") - @Getter - private final String userSid; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy_details") - @Getter - private final Object policyDetails; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_created") - @Getter - private final ZonedDateTime dateCreated; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_updated") - @Getter - private final ZonedDateTime dateUpdated; - - private AssistantsV1ServicePolicy(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.description = builder.description; - this.accountSid = builder.accountSid; - this.userSid = builder.userSid; - this.type = builder.type; - this.policyDetails = builder.policyDetails; - this.dateCreated = builder.dateCreated; - this.dateUpdated = builder.dateUpdated; - } - - public static Builder builder( - final String type, - final Object policyDetails - ) { - return new Builder(type, policyDetails); - } - - public static AssistantsV1ServicePolicy fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServicePolicy.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("description") - private String description; - - @JsonProperty("account_sid") - private String accountSid; - - @JsonProperty("user_sid") - private String userSid; - - @JsonProperty("type") - private String type; - - @JsonProperty("policy_details") - private Object policyDetails; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_created") - private ZonedDateTime dateCreated; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("date_updated") - private ZonedDateTime dateUpdated; - - @JsonCreator - public Builder( - @JsonProperty("type") final String type, - @JsonProperty("policy_details") final Object policyDetails - ) { - this.type = type; - this.policyDetails = policyDetails; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - public Builder id(String id) { - this.id = id; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - public Builder name(String name) { - this.name = name; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("account_sid") - public Builder accountSid(String accountSid) { - this.accountSid = accountSid; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("user_sid") - public Builder userSid(String userSid) { - this.userSid = userSid; - return this; - } - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_created") - public Builder dateCreated(ZonedDateTime dateCreated) { - this.dateCreated = dateCreated; - return this; - } - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("date_updated") - public Builder dateUpdated(ZonedDateTime dateUpdated) { - this.dateUpdated = dateUpdated; - return this; - } - - public AssistantsV1ServicePolicy build() { - return new AssistantsV1ServicePolicy(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServicePolicy other = (AssistantsV1ServicePolicy) o; - return ( - Objects.equals(id, other.id) && - Objects.equals(name, other.name) && - Objects.equals(description, other.description) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals(userSid, other.userSid) && - Objects.equals(type, other.type) && - Objects.equals(policyDetails, other.policyDetails) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - name, - description, - accountSid, - userSid, - type, - policyDetails, - dateCreated, - dateUpdated - ); - } - } - - /** - * Converts a JSON String into a Tool object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Tool object represented by the provided JSON - */ - public static Tool fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Tool.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Tool object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Tool object represented by the provided JSON - */ - public static Tool fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Tool.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException 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); - } - } - - @Getter - private final String accountSid; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateCreated; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateUpdated; - - @Getter - private final String description; - - @Getter - private final Boolean enabled; - - @Getter - private final String id; - - @Getter - private final Object meta; - - @Getter - private final String name; - - @Getter - private final List policies; - - @Getter - private final Boolean requiresAuth; - - @Getter - private final String type; - - @Getter - private final String url; - - @JsonCreator - private Tool( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("date_created") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateCreated, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, - @JsonProperty("description") final String description, - @JsonProperty("enabled") final Boolean enabled, - @JsonProperty("id") final String id, - @JsonProperty("meta") final Object meta, - @JsonProperty("name") final String name, - @JsonProperty("policies") final List< - AssistantsV1ServicePolicy - > policies, - @JsonProperty("requires_auth") final Boolean requiresAuth, - @JsonProperty("type") final String type, - @JsonProperty("url") final String url - ) { - this.accountSid = accountSid; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - this.description = description; - this.enabled = enabled; - this.id = id; - this.meta = meta; - this.name = name; - this.policies = policies; - this.requiresAuth = requiresAuth; - this.type = type; - this.url = url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Tool other = (Tool) o; - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(description, other.description) && - Objects.equals(enabled, other.enabled) && - Objects.equals(id, other.id) && - Objects.equals(meta, other.meta) && - Objects.equals(name, other.name) && - Objects.equals(policies, other.policies) && - Objects.equals(requiresAuth, other.requiresAuth) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - accountSid, - dateCreated, - dateUpdated, - description, - enabled, - id, - meta, - name, - policies, - requiresAuth, - type, - url - ); - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolReader.java b/src/main/java/com/twilio/rest/assistants/v1/ToolReader.java deleted file mode 100644 index 1638c7cc97..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolReader.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class ToolReader extends Reader { - - private String assistantId; - private Integer pageSize; - - public ToolReader() {} - - public ToolReader setAssistantId(final String assistantId) { - this.assistantId = assistantId; - return this; - } - - public ToolReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "tools", - response.getContent(), - Tool.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>(this, client, page); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Tools"; - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "tools", - response.getContent(), - Tool.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Tool read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "tools", - response.getContent(), - Tool.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (assistantId != null) { - Serializer.toString( - request, - "AssistantId", - assistantId, - ParameterType.QUERY - ); - } - - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeDeleter.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeDeleter.java deleted file mode 100644 index 39860c8e59..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeDeleter.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.assistant; - -import com.twilio.base.Deleter; -import com.twilio.base.TwilioResponse; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; -import java.util.function.Predicate; - -public class AssistantsKnowledgeDeleter extends Deleter { - - private String pathAssistantId; - private String pathId; - - public AssistantsKnowledgeDeleter( - final String pathAssistantId, - final String pathId - ) { - this.pathAssistantId = pathAssistantId; - this.pathId = pathId; - } - - private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Knowledge/{id}"; - - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Predicate deleteStatuses = i -> - i != null && i >= 200 && i < 300; - Request request = new Request( - HttpMethod.DELETE, - Domains.ASSISTANTS.toString(), - path - ); - - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AssistantsKnowledge delete failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - @Override - public boolean delete(final TwilioRestClient client) { - Response response = makeRequest(client); - Predicate deleteStatuses = i -> - i != null && i >= 200 && i < 300; - return deleteStatuses.test(response.getStatusCode()); - } - - @Override - public TwilioResponse deleteWithResponse( - final TwilioRestClient client - ) { - Response response = makeRequest(client); - Predicate deleteStatuses = i -> - i != null && i >= 200 && i < 300; - Boolean deleted = deleteStatuses.test(response.getStatusCode()); - return new TwilioResponse<>( - deleted, - response.getStatusCode(), - response.getHeaders() - ); - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeReader.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeReader.java deleted file mode 100644 index 65bff40a62..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeReader.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.assistant; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class AssistantsKnowledgeReader extends Reader { - - private String pathAssistantId; - private Integer pageSize; - - public AssistantsKnowledgeReader(final String pathAssistantId) { - this.pathAssistantId = pathAssistantId; - } - - public AssistantsKnowledgeReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "knowledge", - response.getContent(), - AssistantsKnowledge.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Knowledge"; - - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read( - final TwilioRestClient client - ) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "knowledge", - response.getContent(), - AssistantsKnowledge.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "AssistantsKnowledge read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "knowledge", - response.getContent(), - AssistantsKnowledge.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolReader.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolReader.java deleted file mode 100644 index 14d6f222e9..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolReader.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.assistant; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class AssistantsToolReader extends Reader { - - private String pathAssistantId; - private Integer pageSize; - - public AssistantsToolReader(final String pathAssistantId) { - this.pathAssistantId = pathAssistantId; - } - - public AssistantsToolReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "tools", - response.getContent(), - AssistantsTool.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Tools"; - - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "tools", - response.getContent(), - AssistantsTool.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "AssistantsTool read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "tools", - response.getContent(), - AssistantsTool.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackReader.java b/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackReader.java deleted file mode 100644 index 4ac08add56..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackReader.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.assistant; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class FeedbackReader extends Reader { - - private String pathId; - private Integer pageSize; - - public FeedbackReader(final String pathId) { - this.pathId = pathId; - } - - public FeedbackReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "feedbacks", - response.getContent(), - Feedback.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}/Feedbacks"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "feedbacks", - response.getContent(), - Feedback.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Feedback read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "feedbacks", - response.getContent(), - Feedback.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} 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 deleted file mode 100644 index ce9d9fa670..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Message.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.assistant; - -import com.fasterxml.jackson.annotation.JsonCreator; -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 com.twilio.base.Resource; -import com.twilio.exception.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; -import lombok.Getter; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Message extends Resource { - - public static MessageCreator creator( - final String pathId, - final Message.AssistantsV1ServiceAssistantSendMessageRequest assistantsV1ServiceAssistantSendMessageRequest - ) { - return new MessageCreator( - pathId, - assistantsV1ServiceAssistantSendMessageRequest - ); - } - - @JsonDeserialize( - builder = AssistantsV1ServiceAssistantSendMessageRequest.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class AssistantsV1ServiceAssistantSendMessageRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("identity") - @Getter - private final String identity; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("session_id") - @Getter - private final String sessionId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("body") - @Getter - private final String body; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("webhook") - @Getter - private final String webhook; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("mode") - @Getter - private final String mode; - - private AssistantsV1ServiceAssistantSendMessageRequest( - Builder builder - ) { - this.identity = builder.identity; - this.sessionId = builder.sessionId; - this.body = builder.body; - this.webhook = builder.webhook; - this.mode = builder.mode; - } - - public static Builder builder( - final String identity, - final String body - ) { - return new Builder(identity, body); - } - - public static AssistantsV1ServiceAssistantSendMessageRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - AssistantsV1ServiceAssistantSendMessageRequest.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("identity") - private String identity; - - @JsonProperty("session_id") - private String sessionId; - - @JsonProperty("body") - private String body; - - @JsonProperty("webhook") - private String webhook; - - @JsonProperty("mode") - private String mode; - - @JsonCreator - public Builder( - @JsonProperty("identity") final String identity, - @JsonProperty("body") final String body - ) { - this.identity = identity; - this.body = body; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("session_id") - public Builder sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("webhook") - public Builder webhook(String webhook) { - this.webhook = webhook; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("mode") - public Builder mode(String mode) { - this.mode = mode; - return this; - } - - public AssistantsV1ServiceAssistantSendMessageRequest build() { - return new AssistantsV1ServiceAssistantSendMessageRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssistantsV1ServiceAssistantSendMessageRequest other = - (AssistantsV1ServiceAssistantSendMessageRequest) o; - return ( - Objects.equals(identity, other.identity) && - Objects.equals(sessionId, other.sessionId) && - Objects.equals(body, other.body) && - Objects.equals(webhook, other.webhook) && - Objects.equals(mode, other.mode) - ); - } - - @Override - public int hashCode() { - return Objects.hash(identity, sessionId, body, webhook, mode); - } - } - - /** - * Converts a JSON String into a Message object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Message object represented by the provided JSON - */ - public static Message fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Message object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Message object represented by the provided JSON - */ - public static Message fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Message.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException 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); - } - } - - @Getter - private final Boolean aborted; - - @Getter - private final String accountSid; - - @Getter - private final String body; - - @Getter - private final String error; - - @Getter - private final Boolean flagged; - - @Getter - private final String sessionId; - - @Getter - private final String status; - - @JsonCreator - private Message( - @JsonProperty("aborted") final Boolean aborted, - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("body") final String body, - @JsonProperty("error") final String error, - @JsonProperty("flagged") final Boolean flagged, - @JsonProperty("session_id") final String sessionId, - @JsonProperty("status") final String status - ) { - this.aborted = aborted; - this.accountSid = accountSid; - this.body = body; - this.error = error; - this.flagged = flagged; - this.sessionId = sessionId; - this.status = status; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Message other = (Message) o; - return ( - Objects.equals(aborted, other.aborted) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals(body, other.body) && - Objects.equals(error, other.error) && - Objects.equals(flagged, other.flagged) && - Objects.equals(sessionId, other.sessionId) && - Objects.equals(status, other.status) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - aborted, - accountSid, - body, - error, - flagged, - sessionId, - status - ); - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/ChunkReader.java b/src/main/java/com/twilio/rest/assistants/v1/knowledge/ChunkReader.java deleted file mode 100644 index b5a362d6e0..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/ChunkReader.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.knowledge; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class ChunkReader extends Reader { - - private String pathId; - private Integer pageSize; - - public ChunkReader(final String pathId) { - this.pathId = pathId; - } - - public ChunkReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "chunks", - response.getContent(), - Chunk.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>(this, client, page); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}/Chunks"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "chunks", - response.getContent(), - Chunk.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Chunk read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "chunks", - response.getContent(), - Chunk.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/assistants/v1/session/MessageReader.java b/src/main/java/com/twilio/rest/assistants/v1/session/MessageReader.java deleted file mode 100644 index b966aef85a..0000000000 --- a/src/main/java/com/twilio/rest/assistants/v1/session/MessageReader.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Assistants - * This is the public Twilio REST API. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.assistants.v1.session; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.base.ResourceSetResponse; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants.ParameterType; -import com.twilio.converter.Serializer; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class MessageReader extends Reader { - - private String pathSessionId; - private Integer pageSize; - - public MessageReader(final String pathSessionId) { - this.pathSessionId = pathSessionId; - } - - public MessageReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public ResourceSetResponse readWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "messages", - response.getContent(), - Message.class, - client.getObjectMapper() - ); - ResourceSet resourceSet = new ResourceSet<>( - this, - client, - page - ); - return new ResourceSetResponse<>( - resourceSet, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Sessions/{sessionId}/Messages"; - - path = - path.replace( - "{" + "sessionId" + "}", - this.pathSessionId.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), - path - ); - addQueryParams(request); - return request; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - Request request = buildFirstPageRequest(client); - return pageForRequest(client, request); - } - - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { - Request request = buildFirstPageRequest(client); - Response response = makeRequest(client, request); - Page page = Page.fromJson( - "messages", - response.getContent(), - Message.class, - client.getObjectMapper() - ); - return new TwilioResponse<>( - page, - response.getStatusCode(), - response.getHeaders() - ); - } - - private Response makeRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Message read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = makeRequest(client, request); - return Page.fromJson( - "messages", - response.getContent(), - Message.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - if (!com.twilio.http.HttpUtility.isValidTwilioUrl(targetUrl)) { - throw new ApiException( - "Invalid URL: URL must be a valid Twilio domain" - ); - } - Request request = new Request(HttpMethod.GET, targetUrl); - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - Serializer.toString( - request, - "PageSize", - pageSize, - ParameterType.QUERY - ); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationFetcher.java b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationFetcher.java index fd0c722eff..4bed8b8bf0 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationFetcher.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationFetcher.java @@ -38,11 +38,10 @@ public ExportConfigurationFetcher(final String pathResourceType) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Configuration"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationUpdater.java b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationUpdater.java index cee82b6c9d..db509ae057 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/ExportConfigurationUpdater.java @@ -67,11 +67,10 @@ public ExportConfigurationUpdater setWebhookMethod( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Configuration"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/ExportFetcher.java b/src/main/java/com/twilio/rest/bulkexports/v1/ExportFetcher.java index a766c9d1c8..068d5e421c 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/ExportFetcher.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/ExportFetcher.java @@ -38,11 +38,10 @@ public ExportFetcher(final String pathResourceType) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/DayFetcher.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/DayFetcher.java index e6c86c9819..150139cabc 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/DayFetcher.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/DayFetcher.java @@ -40,11 +40,10 @@ public DayFetcher(final String pathResourceType, final String pathDay) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Days/{Day}"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); path = path.replace("{" + "Day" + "}", this.pathDay.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/DayReader.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/DayReader.java index 8c164604a9..df604d90e7 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/DayReader.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/DayReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Days"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobCreator.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobCreator.java index b5778f4188..8fc2acf317 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobCreator.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobCreator.java @@ -85,11 +85,10 @@ public ExportCustomJobCreator setEmail(final String email) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Jobs"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobReader.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobReader.java index 42d4d16f2c..7d322cdbbd 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobReader.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJobReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Exports/{ResourceType}/Jobs"; - path = - path.replace( - "{" + "ResourceType" + "}", - this.pathResourceType.toString() - ); + path = path.replace( + "{" + "ResourceType" + "}", + this.pathResourceType.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/ChannelCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/ChannelCreator.java index 52ece86916..e43a713bcb 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/ChannelCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/ChannelCreator.java @@ -65,11 +65,10 @@ public ChannelCreator setType(final Channel.ChannelType type) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/ChannelDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/ChannelDeleter.java index 2e76c8f054..00d5ead66b 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/ChannelDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/ChannelDeleter.java @@ -41,11 +41,10 @@ public ChannelDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/ChannelFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/ChannelFetcher.java index 9cb1c03b8f..3837984ed8 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/ChannelFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/ChannelFetcher.java @@ -40,11 +40,10 @@ public ChannelFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/ChannelReader.java b/src/main/java/com/twilio/rest/chat/v1/service/ChannelReader.java index 94d289a48f..fe1c91936f 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/ChannelReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/ChannelReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/ChannelUpdater.java b/src/main/java/com/twilio/rest/chat/v1/service/ChannelUpdater.java index f8fa464bd4..d5e00e46e1 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/ChannelUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/ChannelUpdater.java @@ -61,11 +61,10 @@ public ChannelUpdater setAttributes(final String attributes) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/RoleCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/RoleCreator.java index 51b5f30e34..5dbc389945 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/RoleCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/RoleCreator.java @@ -73,11 +73,10 @@ public RoleCreator setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/RoleDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/RoleDeleter.java index 159729d2b8..79e80a1ed8 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/RoleDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/RoleDeleter.java @@ -41,11 +41,10 @@ public RoleDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/RoleFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/RoleFetcher.java index 848a23aa91..8276bc261f 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/RoleFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/RoleFetcher.java @@ -40,11 +40,10 @@ public RoleFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/RoleReader.java b/src/main/java/com/twilio/rest/chat/v1/service/RoleReader.java index 9e6b0eb8d6..836dfb4c2a 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/RoleReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/RoleReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/RoleUpdater.java b/src/main/java/com/twilio/rest/chat/v1/service/RoleUpdater.java index 7e2b9ddcfd..cbea3898dd 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/RoleUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/RoleUpdater.java @@ -60,11 +60,10 @@ public RoleUpdater setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/UserCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/UserCreator.java index 0b5b311d74..7ee3720f74 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/UserCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/UserCreator.java @@ -66,11 +66,10 @@ public UserCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/UserDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/UserDeleter.java index 6d0fb2a629..455122530b 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/UserDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/UserDeleter.java @@ -41,11 +41,10 @@ public UserDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/UserFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/UserFetcher.java index 2cdfdb3bfd..3d637ac0cc 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/UserFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/UserFetcher.java @@ -40,11 +40,10 @@ public UserFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/UserReader.java b/src/main/java/com/twilio/rest/chat/v1/service/UserReader.java index ae5e95f5e9..71931a620d 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/UserReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/UserUpdater.java b/src/main/java/com/twilio/rest/chat/v1/service/UserUpdater.java index 21e3567f77..ed6540ba22 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/UserUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/UserUpdater.java @@ -61,11 +61,10 @@ public UserUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteCreator.java index d377f3e509..35c6f89dda 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteCreator.java @@ -60,16 +60,14 @@ public InviteCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteDeleter.java index 0461a32ccf..2ded83b30d 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteFetcher.java index 5f71bdf903..4259a4325e 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteReader.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteReader.java index beace15874..a3fc541651 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/InviteReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberCreator.java index e146df5a49..13eb5a5299 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberCreator.java @@ -60,16 +60,14 @@ public MemberCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberDeleter.java index 8cfa35cce3..675ce33b31 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberFetcher.java index b74f8905a9..e8abca336a 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberReader.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberReader.java index 16dbd471ac..44e731ebd4 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberUpdater.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberUpdater.java index 6e5e55d6b6..0e1ca0d50a 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MemberUpdater.java @@ -64,16 +64,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageCreator.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageCreator.java index c5ca653376..e0e676647f 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageCreator.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageCreator.java @@ -67,16 +67,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageDeleter.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageDeleter.java index 319305e932..0e5a8250ee 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageFetcher.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageFetcher.java index 882e9c471a..a4ecbe91f8 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageReader.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageReader.java index 8df50cd132..51ec223605 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageReader.java @@ -85,16 +85,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageUpdater.java b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageUpdater.java index 3ed97f9467..53f0bb9063 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/channel/MessageUpdater.java @@ -62,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannelReader.java b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannelReader.java index fcac5d247a..5d97dca27d 100644 --- a/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannelReader.java +++ b/src/main/java/com/twilio/rest/chat/v1/service/user/UserChannelReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/BindingDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/BindingDeleter.java index 72d24b293e..166702dfcd 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/BindingDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/BindingDeleter.java @@ -41,11 +41,10 @@ public BindingDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/BindingFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/BindingFetcher.java index 0db7414289..b0475a9032 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/BindingFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/BindingFetcher.java @@ -40,11 +40,10 @@ public BindingFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/BindingReader.java b/src/main/java/com/twilio/rest/chat/v2/service/BindingReader.java index 9a0a74ad5d..c4592b722d 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/BindingReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/BindingReader.java @@ -97,11 +97,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/ChannelCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/ChannelCreator.java index 5ae297ed03..825071e750 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/ChannelCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/ChannelCreator.java @@ -92,11 +92,10 @@ public ChannelCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/ChannelDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/ChannelDeleter.java index ecf0437df6..6d6d5b8169 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/ChannelDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/ChannelDeleter.java @@ -51,11 +51,10 @@ public ChannelDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/ChannelFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/ChannelFetcher.java index b2dde850df..4624d48556 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/ChannelFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/ChannelFetcher.java @@ -40,11 +40,10 @@ public ChannelFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/ChannelReader.java b/src/main/java/com/twilio/rest/chat/v2/service/ChannelReader.java index 46c91ef81e..1e7083eb3c 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/ChannelReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/ChannelReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/ChannelUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/ChannelUpdater.java index 1166ac938c..645abf2985 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/ChannelUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/ChannelUpdater.java @@ -88,11 +88,10 @@ public ChannelUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/RoleCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/RoleCreator.java index d9721ebdf0..306329cf95 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/RoleCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/RoleCreator.java @@ -73,11 +73,10 @@ public RoleCreator setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/RoleDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/RoleDeleter.java index 02b655c40f..2eddaeb4dc 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/RoleDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/RoleDeleter.java @@ -41,11 +41,10 @@ public RoleDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/RoleFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/RoleFetcher.java index 36f13e4945..b5f15fddf2 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/RoleFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/RoleFetcher.java @@ -40,11 +40,10 @@ public RoleFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/RoleReader.java b/src/main/java/com/twilio/rest/chat/v2/service/RoleReader.java index 60b6795f52..a5a182eefc 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/RoleReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/RoleReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/RoleUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/RoleUpdater.java index 290399e73a..20fe24a399 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/RoleUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/RoleUpdater.java @@ -60,11 +60,10 @@ public RoleUpdater setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/UserCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/UserCreator.java index ad9d6be427..6d7316419c 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/UserCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/UserCreator.java @@ -74,11 +74,10 @@ public UserCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/UserDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/UserDeleter.java index 7bcfa98514..b6e006570e 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/UserDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/UserDeleter.java @@ -41,11 +41,10 @@ public UserDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/UserFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/UserFetcher.java index 4c1f513883..4300f62cda 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/UserFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/UserFetcher.java @@ -40,11 +40,10 @@ public UserFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/UserReader.java b/src/main/java/com/twilio/rest/chat/v2/service/UserReader.java index 5ab7249203..a23ac618a3 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/UserReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/UserUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/UserUpdater.java index 60cc7ef560..3336943da6 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/UserUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/UserUpdater.java @@ -69,11 +69,10 @@ public UserUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteCreator.java index e6a091b852..8162415e72 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteCreator.java @@ -60,16 +60,14 @@ public InviteCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteDeleter.java index 1ed5792825..e9a286695e 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteFetcher.java index 4036045e43..6ec41dc6f7 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteReader.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteReader.java index 08bf091d9e..b6c69fb43b 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/InviteReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberCreator.java index 069a19b092..fa598db0f2 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberCreator.java @@ -103,16 +103,14 @@ public MemberCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberDeleter.java index 1cb5acad06..7339a59b84 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberFetcher.java index 87ba30037f..786f57b531 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberReader.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberReader.java index 26e239d82c..54e1c7d8ff 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberUpdater.java index 95e74088d5..1b4e3721da 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MemberUpdater.java @@ -99,16 +99,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageCreator.java index 3a9476ecfd..7b6bf10dee 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageCreator.java @@ -98,16 +98,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageDeleter.java index f307fba68a..1ca096ceed 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageFetcher.java index cf4b4a8ac4..955f91d45d 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageReader.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageReader.java index 191a46e7c3..13daec6b34 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageReader.java @@ -85,16 +85,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageUpdater.java index ca58a6711f..df550655f9 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/MessageUpdater.java @@ -95,16 +95,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookCreator.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookCreator.java index 2a0f8e52d2..5aaf8882c3 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookCreator.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookCreator.java @@ -119,16 +119,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookDeleter.java index f93b2a4f80..152f49e174 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookFetcher.java index 40a1683826..fa0b57358b 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookReader.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookReader.java index 8503870297..361ce71b3c 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookUpdater.java index 1e67f9d7ea..2d171d6ee1 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookUpdater.java @@ -114,16 +114,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingDeleter.java index 649d5aacfc..0822e19020 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingDeleter.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingFetcher.java index f4be1e1187..84747c7b27 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingFetcher.java @@ -47,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingReader.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingReader.java index 981efa1d63..90abf3654e 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserBindingReader.java @@ -94,11 +94,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelDeleter.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelDeleter.java index 372e67ace3..dedddd2a82 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelDeleter.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelDeleter.java @@ -58,17 +58,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelFetcher.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelFetcher.java index 0ec33c77be..ec692ae7df 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelFetcher.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelFetcher.java @@ -47,17 +47,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelReader.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelReader.java index 6a8c15ce85..1672978c91 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelReader.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelUpdater.java b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelUpdater.java index a8c3b9c4dc..427435da7e 100644 --- a/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v2/service/user/UserChannelUpdater.java @@ -75,17 +75,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/chat/v3/ChannelUpdater.java b/src/main/java/com/twilio/rest/chat/v3/ChannelUpdater.java index efd7026526..72bfd972b4 100644 --- a/src/main/java/com/twilio/rest/chat/v3/ChannelUpdater.java +++ b/src/main/java/com/twilio/rest/chat/v3/ChannelUpdater.java @@ -65,11 +65,10 @@ public ChannelUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v3/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 cc982b0899..d48f5cfc58 100644 --- a/src/main/java/com/twilio/rest/content/v1/Content.java +++ b/src/main/java/com/twilio/rest/content/v1/Content.java @@ -195,7 +195,8 @@ public enum CallToActionActionType { PHONE_NUMBER("PHONE_NUMBER"), COPY_CODE("COPY_CODE"), VOICE_CALL("VOICE_CALL"), - VOICE_CALL_REQUEST("VOICE_CALL_REQUEST"); + VOICE_CALL_REQUEST("VOICE_CALL_REQUEST"), + REQUEST_CONTACT_INFO("REQUEST_CONTACT_INFO"); private final String value; @@ -218,6 +219,7 @@ public static CallToActionActionType forValue(final String value) { } @JsonDeserialize(builder = FlowsPage.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class FlowsPage { @@ -263,13 +265,12 @@ public static Builder builder( return new Builder(id, title, layout); } - public static FlowsPage fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { + public static FlowsPage fromJson(String jsonString, ObjectMapper mapper) + throws IOException { return mapper.readValue(jsonString, FlowsPage.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -345,6 +346,7 @@ public int hashCode() { } @JsonDeserialize(builder = Types.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Types { @@ -445,6 +447,7 @@ public static Types fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Types.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -651,6 +654,7 @@ public int hashCode() { } @JsonDeserialize(builder = CallToActionAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CallToActionAction { @@ -695,10 +699,9 @@ private CallToActionAction(Builder builder) { } public static Builder builder( - final Content.CallToActionActionType type, - final String title + final Content.CallToActionActionType type ) { - return new Builder(type, title); + return new Builder(type); } public static CallToActionAction fromJson( @@ -708,6 +711,7 @@ public static CallToActionAction fromJson( return mapper.readValue(jsonString, CallToActionAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -731,11 +735,16 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("type") final Content.CallToActionActionType type, - @JsonProperty("title") final String title + @JsonProperty("type") final Content.CallToActionActionType type ) { this.type = type; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("title") + public Builder title(String title) { this.title = title; + return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) @@ -799,6 +808,7 @@ public int hashCode() { } @JsonDeserialize(builder = CarouselAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CarouselAction { @@ -850,6 +860,7 @@ public static CarouselAction fromJson( return mapper.readValue(jsonString, CarouselAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -930,6 +941,7 @@ public int hashCode() { } @JsonDeserialize(builder = WhatsappCard.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class WhatsappCard { @@ -978,6 +990,7 @@ public static WhatsappCard fromJson( return mapper.readValue(jsonString, WhatsappCard.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1061,6 +1074,7 @@ public int hashCode() { } @JsonDeserialize(builder = WhatsappAuthentication.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class WhatsappAuthentication { @@ -1099,6 +1113,7 @@ public static WhatsappAuthentication fromJson( return mapper.readValue(jsonString, WhatsappAuthentication.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1113,9 +1128,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("actions") final List< - AuthenticationAction - > actions + @JsonProperty( + "actions" + ) final List actions ) { this.actions = actions; } @@ -1178,6 +1193,7 @@ public int hashCode() { } @JsonDeserialize(builder = QuickReplyAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class QuickReplyAction { @@ -1214,6 +1230,7 @@ public static QuickReplyAction fromJson( return mapper.readValue(jsonString, QuickReplyAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1275,6 +1292,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioCard.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioCard { @@ -1317,6 +1335,7 @@ public static TwilioCard fromJson( return mapper.readValue(jsonString, TwilioCard.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1391,6 +1410,7 @@ public int hashCode() { } @JsonDeserialize(builder = AuthenticationAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AuthenticationAction { @@ -1424,6 +1444,7 @@ public static AuthenticationAction fromJson( return mapper.readValue(jsonString, AuthenticationAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1473,6 +1494,7 @@ public int hashCode() { } @JsonDeserialize(builder = ContentCreateRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ContentCreateRequest { @@ -1518,6 +1540,7 @@ public static ContentCreateRequest fromJson( return mapper.readValue(jsonString, ContentCreateRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1587,6 +1610,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioCallToAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioCallToAction { @@ -1620,6 +1644,7 @@ public static TwilioCallToAction fromJson( return mapper.readValue(jsonString, TwilioCallToAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1667,6 +1692,7 @@ public int hashCode() { } @JsonDeserialize(builder = ContentUpdateRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ContentUpdateRequest { @@ -1709,6 +1735,7 @@ public static ContentUpdateRequest fromJson( return mapper.readValue(jsonString, ContentUpdateRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1781,6 +1808,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioQuickReply.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioQuickReply { @@ -1814,6 +1842,7 @@ public static TwilioQuickReply fromJson( return mapper.readValue(jsonString, TwilioQuickReply.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1861,6 +1890,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioMedia.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioMedia { @@ -1891,6 +1921,7 @@ public static TwilioMedia fromJson( return mapper.readValue(jsonString, TwilioMedia.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1941,6 +1972,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioFlows.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioFlows { @@ -2000,6 +2032,7 @@ public static TwilioFlows fromJson( return mapper.readValue(jsonString, TwilioFlows.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2088,6 +2121,7 @@ public int hashCode() { } @JsonDeserialize(builder = FlowsPageComponent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class FlowsPageComponent { @@ -2118,6 +2152,7 @@ public static FlowsPageComponent fromJson( return mapper.readValue(jsonString, FlowsPageComponent.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2168,6 +2203,7 @@ public int hashCode() { } @JsonDeserialize(builder = WhatsappFlows.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class WhatsappFlows { @@ -2238,6 +2274,7 @@ public static WhatsappFlows fromJson( return mapper.readValue(jsonString, WhatsappFlows.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2360,6 +2397,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioListPicker.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioListPicker { @@ -2400,6 +2438,7 @@ public static TwilioListPicker fromJson( return mapper.readValue(jsonString, TwilioListPicker.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2453,6 +2492,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioCatalog.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioCatalog { @@ -2507,6 +2547,7 @@ public static TwilioCatalog fromJson( return mapper.readValue(jsonString, TwilioCatalog.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2601,6 +2642,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioText.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioText { @@ -2625,6 +2667,7 @@ public static TwilioText fromJson( return mapper.readValue(jsonString, TwilioText.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2652,7 +2695,7 @@ public boolean equals(final Object o) { } TwilioText other = (TwilioText) o; - return (Objects.equals(body, other.body)); + return Objects.equals(body, other.body); } @Override @@ -2662,6 +2705,7 @@ public int hashCode() { } @JsonDeserialize(builder = CatalogItem.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CatalogItem { @@ -2716,6 +2760,7 @@ public static CatalogItem fromJson( return mapper.readValue(jsonString, CatalogItem.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2819,6 +2864,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioSchedule.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioSchedule { @@ -2859,6 +2905,7 @@ public static TwilioSchedule fromJson( return mapper.readValue(jsonString, TwilioSchedule.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2912,6 +2959,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioCarousel.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioCarousel { @@ -2945,6 +2993,7 @@ public static TwilioCarousel fromJson( return mapper.readValue(jsonString, TwilioCarousel.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2992,6 +3041,7 @@ public int hashCode() { } @JsonDeserialize(builder = CardAction.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CardAction { @@ -3055,6 +3105,7 @@ public static CardAction fromJson( return mapper.readValue(jsonString, CardAction.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -3157,6 +3208,7 @@ public int hashCode() { } @JsonDeserialize(builder = CarouselCard.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CarouselCard { @@ -3203,6 +3255,7 @@ public static CarouselCard fromJson( return mapper.readValue(jsonString, CarouselCard.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -3267,6 +3320,7 @@ public int hashCode() { } @JsonDeserialize(builder = TwilioLocation.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TwilioLocation { @@ -3318,6 +3372,7 @@ public static TwilioLocation fromJson( return mapper.readValue(jsonString, TwilioLocation.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -3398,6 +3453,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListItem.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListItem { @@ -3432,6 +3488,7 @@ public static ListItem fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, ListItem.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..1e3ecdb571 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 @@ -53,6 +53,7 @@ public static ApprovalCreateCreator creator( } @JsonDeserialize(builder = ContentApprovalRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ContentApprovalRequest { @@ -67,9 +68,15 @@ public static class ContentApprovalRequest { @Getter private final String category; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("send_ttl_seconds") + @Getter + private final Integer sendTtlSeconds; + private ContentApprovalRequest(Builder builder) { this.name = builder.name; this.category = builder.category; + this.sendTtlSeconds = builder.sendTtlSeconds; } public static Builder builder( @@ -86,6 +93,7 @@ public static ContentApprovalRequest fromJson( return mapper.readValue(jsonString, ContentApprovalRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -95,6 +103,9 @@ public static class Builder { @JsonProperty("category") private String category; + @JsonProperty("send_ttl_seconds") + private Integer sendTtlSeconds; + @JsonCreator public Builder( @JsonProperty("name") final String name, @@ -104,6 +115,13 @@ public Builder( this.category = category; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("send_ttl_seconds") + public Builder sendTtlSeconds(Integer sendTtlSeconds) { + this.sendTtlSeconds = sendTtlSeconds; + return this; + } + public ContentApprovalRequest build() { return new ContentApprovalRequest(this); } @@ -122,13 +140,14 @@ public boolean equals(final Object o) { ContentApprovalRequest other = (ContentApprovalRequest) o; return ( Objects.equals(name, other.name) && - Objects.equals(category, other.category) + Objects.equals(category, other.category) && + Objects.equals(sendTtlSeconds, other.sendTtlSeconds) ); } @Override public int hashCode() { - return Objects.hash(name, category); + return Objects.hash(name, category, sendTtlSeconds); } } @@ -202,6 +221,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String rejectionReason; + @Getter + private final Integer sendTtlSeconds; + @Getter private final String status; @@ -214,6 +236,7 @@ private ApprovalCreate( @JsonProperty("content_type") final String contentType, @JsonProperty("name") final String name, @JsonProperty("rejection_reason") final String rejectionReason, + @JsonProperty("send_ttl_seconds") final Integer sendTtlSeconds, @JsonProperty("status") final String status ) { this.allowCategoryChange = allowCategoryChange; @@ -221,6 +244,7 @@ private ApprovalCreate( this.contentType = contentType; this.name = name; this.rejectionReason = rejectionReason; + this.sendTtlSeconds = sendTtlSeconds; this.status = status; } @@ -241,6 +265,7 @@ public boolean equals(final Object o) { Objects.equals(contentType, other.contentType) && Objects.equals(name, other.name) && Objects.equals(rejectionReason, other.rejectionReason) && + Objects.equals(sendTtlSeconds, other.sendTtlSeconds) && Objects.equals(status, other.status) ); } @@ -253,6 +278,7 @@ public int hashCode() { contentType, name, rejectionReason, + sendTtlSeconds, status ); } 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..95c438a09c 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 @@ -52,11 +52,10 @@ public ApprovalCreateCreator setContentApprovalRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Content/{ContentSid}/ApprovalRequests/whatsapp"; - path = - path.replace( - "{" + "ContentSid" + "}", - this.pathContentSid.toString() - ); + path = path.replace( + "{" + "ContentSid" + "}", + this.pathContentSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipantsCreator.java b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipantsCreator.java index f1f672dada..35e43afe3c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipantsCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipantsCreator.java @@ -34,7 +34,8 @@ import java.util.List; public class ConversationWithParticipantsCreator - extends Creator { + extends Creator +{ private ConversationWithParticipants.WebhookEnabledType xTwilioWebhookEnabled; private String friendlyName; diff --git a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversationReader.java b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversationReader.java index db9a600cf2..4aa7ba4e83 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ParticipantConversationReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class ParticipantConversationReader - extends Reader { + extends Reader +{ private String identity; private String address; diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageCreator.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageCreator.java index 3f0934f498..fc9fe830af 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageCreator.java @@ -104,11 +104,10 @@ public MessageCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageDeleter.java index 0057a5074c..83e096b621 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageDeleter.java @@ -54,11 +54,10 @@ public MessageDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageFetcher.java index 0c99d64ffb..e54ccd9ee4 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageFetcher.java @@ -43,11 +43,10 @@ public MessageFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageReader.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageReader.java index 3eb3aef474..4bcbc8dae7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageReader.java @@ -79,11 +79,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageUpdater.java index 33cfb8198e..f18fd0c213 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/MessageUpdater.java @@ -91,11 +91,10 @@ public MessageUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantCreator.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantCreator.java index ee32b65a83..c2d4dd6f1c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantCreator.java @@ -105,11 +105,10 @@ public ParticipantCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantDeleter.java index dd06bc0b94..da0adddc6f 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantDeleter.java @@ -54,11 +54,10 @@ public ParticipantDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantFetcher.java index ef58598f58..1b7d24db83 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantFetcher.java @@ -43,11 +43,10 @@ public ParticipantFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantReader.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantReader.java index 0de6f0b9c7..9b6716f686 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantUpdater.java index cf7d0769b9..5de7b802e7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/ParticipantUpdater.java @@ -118,11 +118,10 @@ public ParticipantUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java index 65d7277b1f..f6c716248a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java @@ -115,11 +115,10 @@ public WebhookCreator setConfigurationReplayAfter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Webhooks"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookDeleter.java index 203d8ff4e7..3371cbbbf9 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookDeleter.java @@ -44,11 +44,10 @@ public WebhookDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookFetcher.java index ef8db1957b..2955f87972 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookFetcher.java @@ -43,11 +43,10 @@ public WebhookFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookReader.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookReader.java index 92b21a3829..7cf331efe1 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Webhooks"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookUpdater.java index 125ae42fc7..605449b36c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookUpdater.java @@ -102,11 +102,10 @@ public WebhookUpdater setConfigurationFlowSid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptFetcher.java index 817482df36..6774df35df 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptReader.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptReader.java index 937e681fbf..64e8b1835d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/message/DeliveryReceiptReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/BindingDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/BindingDeleter.java index b6b0396a0f..ffd723d782 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/BindingDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/BindingDeleter.java @@ -44,11 +44,10 @@ public BindingDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/BindingFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/BindingFetcher.java index 56d220c95b..165ad751b1 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/BindingFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/BindingFetcher.java @@ -43,11 +43,10 @@ public BindingFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/BindingReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/BindingReader.java index eed3430617..a56b6db0f9 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/BindingReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/BindingReader.java @@ -97,11 +97,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Bindings"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationFetcher.java index f7cb969141..144845c58d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationFetcher.java @@ -38,11 +38,10 @@ public ConfigurationFetcher(final String pathChatServiceSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationUpdater.java index 00eb6b4825..5b5e58b703 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConfigurationUpdater.java @@ -74,11 +74,10 @@ public ConfigurationUpdater setReachabilityEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationCreator.java index a900342565..a4008d3cd7 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationCreator.java @@ -122,11 +122,10 @@ public ConversationCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationDeleter.java index 32735ac862..77f7b2f9a5 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationDeleter.java @@ -54,11 +54,10 @@ public ConversationDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationFetcher.java index 9d2f848f48..79496e3b35 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationFetcher.java @@ -43,11 +43,10 @@ public ConversationFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationReader.java index 55a5e54323..9b07204fdf 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationReader.java @@ -91,11 +91,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationUpdater.java index baf7c87626..ee97afcb8a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationUpdater.java @@ -127,11 +127,10 @@ public ConversationUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipantsCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipantsCreator.java index 5e2a1d237a..09808489ab 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipantsCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipantsCreator.java @@ -34,7 +34,8 @@ import java.util.List; public class ConversationWithParticipantsCreator - extends Creator { + extends Creator +{ private String pathChatServiceSid; private ConversationWithParticipants.WebhookEnabledType xTwilioWebhookEnabled; @@ -158,11 +159,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/ConversationWithParticipants"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversationReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversationReader.java index c82d702fa0..5fbe716c8d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ParticipantConversationReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class ParticipantConversationReader - extends Reader { + extends Reader +{ private String pathChatServiceSid; private String identity; @@ -86,11 +87,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/ParticipantConversations"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/RoleCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/RoleCreator.java index 2941ac5252..80cfe7aa2d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/RoleCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/RoleCreator.java @@ -73,11 +73,10 @@ public RoleCreator setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Roles"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/RoleDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/RoleDeleter.java index 8c5027f2c3..add33bf891 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/RoleDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/RoleDeleter.java @@ -41,11 +41,10 @@ public RoleDeleter(final String pathChatServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/RoleFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/RoleFetcher.java index 8752ad461b..20c18b7a92 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/RoleFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/RoleFetcher.java @@ -40,11 +40,10 @@ public RoleFetcher(final String pathChatServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/RoleReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/RoleReader.java index 7d79d0f633..5b93638f8c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/RoleReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/RoleReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Roles"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/RoleUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/RoleUpdater.java index 634a91b150..a5b6fd7486 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/RoleUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/RoleUpdater.java @@ -60,11 +60,10 @@ public RoleUpdater setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/UserCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/UserCreator.java index 93eaee117e..e72bec5499 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/UserCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/UserCreator.java @@ -74,11 +74,10 @@ public UserCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/UserDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/UserDeleter.java index e35d277ee3..c8c6e9da27 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/UserDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/UserDeleter.java @@ -51,11 +51,10 @@ public UserDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/UserFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/UserFetcher.java index cc4ec9837d..a62bc1baf4 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/UserFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/UserFetcher.java @@ -40,11 +40,10 @@ public UserFetcher(final String pathChatServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/UserReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/UserReader.java index f3c8b2a307..df2d11b8bc 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/UserReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/UserUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/UserUpdater.java index 73784f3024..18989ee164 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/UserUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/UserUpdater.java @@ -69,11 +69,10 @@ public UserUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationFetcher.java index 843f0cba65..4842c28a4c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationFetcher.java @@ -39,11 +39,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration/Notifications"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationUpdater.java index 57562515cd..a52f5b5034 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/NotificationUpdater.java @@ -144,11 +144,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration/Notifications"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookFetcher.java index 7d2c58a8e4..e4ccbc06c3 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookFetcher.java @@ -38,11 +38,10 @@ public WebhookFetcher(final String pathChatServiceSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration/Webhooks"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookUpdater.java index d4c9f799f8..ab11418767 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/configuration/WebhookUpdater.java @@ -80,11 +80,10 @@ public WebhookUpdater setMethod(final String method) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Configuration/Webhooks"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageCreator.java index 1b1bbea79b..8ebd8c678a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageCreator.java @@ -110,16 +110,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageDeleter.java index ff0c1fff56..1ee20a782a 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageFetcher.java index 923c8aad55..e2e7a93180 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageReader.java index bdc95c084f..b2c31cbc37 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageReader.java @@ -85,16 +85,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageUpdater.java index 1ae00c9cf6..20d351d6a5 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/MessageUpdater.java @@ -95,16 +95,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantCreator.java index 00ab9ee072..f15dc30663 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantCreator.java @@ -111,16 +111,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantDeleter.java index 1706b64eab..ff9007b048 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantFetcher.java index c8762dad10..9a41e7d2d1 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantReader.java index 2b5a0ab1fe..7f3315bd74 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantUpdater.java index a0294bb27f..31ecf18516 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/ParticipantUpdater.java @@ -122,16 +122,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookCreator.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookCreator.java index 6ab3803cc9..c751ed0444 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookCreator.java @@ -119,16 +119,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookDeleter.java index 709d249149..a049770101 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookFetcher.java index 5c4debde02..6b40737c2c 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookReader.java index 68b7d4b164..405d6fc201 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookUpdater.java index 52ce9ac0f1..490021422e 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/WebhookUpdater.java @@ -106,16 +106,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptFetcher.java index c5d8a87676..98678bcf22 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptFetcher.java @@ -50,21 +50,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptReader.java index 0f9d27c9ae..7b9e966597 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/message/DeliveryReceiptReader.java @@ -82,21 +82,18 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = - path.replace( - "{" + "MessageSid" + "}", - this.pathMessageSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); + path = path.replace( + "{" + "MessageSid" + "}", + this.pathMessageSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationDeleter.java index 02d16fec30..cd1f91792b 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationDeleter.java @@ -48,17 +48,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations/{ConversationSid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationFetcher.java index 8f57e883ce..efadcebf15 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationFetcher.java @@ -47,17 +47,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations/{ConversationSid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationReader.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationReader.java index 2af8c815a7..f9f6735b70 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationUpdater.java index c79f213409..472defc171 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/user/UserConversationUpdater.java @@ -75,17 +75,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations/{ConversationSid}"; - path = - path.replace( - "{" + "ChatServiceSid" + "}", - this.pathChatServiceSid.toString() - ); + path = path.replace( + "{" + "ChatServiceSid" + "}", + this.pathChatServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationDeleter.java b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationDeleter.java index 6ffc1ef3e0..c7e7ed7f16 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationDeleter.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Users/{UserSid}/Conversations/{ConversationSid}"; path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationFetcher.java b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationFetcher.java index 7fcd62d41d..5cd4a9224d 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Users/{UserSid}/Conversations/{ConversationSid}"; path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationUpdater.java b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationUpdater.java index b9919e305a..3db8f98cdb 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v1/user/UserConversationUpdater.java @@ -72,11 +72,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Users/{UserSid}/Conversations/{ConversationSid}"; path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationSid" + "}", + this.pathConversationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v2/Action.java b/src/main/java/com/twilio/rest/conversations/v2/Action.java index 131325748c..4d4527410d 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Action.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Action.java @@ -67,7 +67,7 @@ public static class CreateActionResponse extends Resource { private final Map related; @Getter - private final Action.Status status; + private final Action.ConversationsV2ActionStatus status; @Getter private final String type; @@ -82,7 +82,9 @@ private CreateActionResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("related") final Map related, - @JsonProperty("status") final Action.Status status, + @JsonProperty( + "status" + ) final Action.ConversationsV2ActionStatus status, @JsonProperty("type") final String type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { @@ -177,7 +179,7 @@ public boolean equals(final Object o) { return false; } UpdateActionResponse other = (UpdateActionResponse) o; - return (true); + return true; } @Override @@ -255,7 +257,7 @@ public boolean equals(final Object o) { return false; } ListActionResponse other = (ListActionResponse) o; - return (true); + return true; } @Override @@ -322,7 +324,7 @@ public static class FetchActionResponse extends Resource { private final Map related; @Getter - private final Action.Status status; + private final Action.ConversationsV2ActionStatus status; @Getter private final String type; @@ -337,7 +339,9 @@ private FetchActionResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("related") final Map related, - @JsonProperty("status") final Action.Status status, + @JsonProperty( + "status" + ) final Action.ConversationsV2ActionStatus status, @JsonProperty("type") final String type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { @@ -419,14 +423,16 @@ public static ActionFetcher fetcher( return new ActionFetcher(pathConversationId, pathActionId); } - public enum Status { - PENDING("PENDING"), - COMPLETED("COMPLETED"), - FAILED("FAILED"); + public enum ConversationsV2Channel { + VOICE("VOICE"), + SMS("SMS"), + RCS("RCS"), + WHATSAPP("WHATSAPP"), + CHAT("CHAT"); private final String value; - private Status(final String value) { + private ConversationsV2Channel(final String value) { this.value = value; } @@ -436,21 +442,22 @@ public String toString() { } @JsonCreator - public static Status forValue(final String value) { - return Promoter.enumFromString(value, Status.values()); + public static ConversationsV2Channel forValue(final String value) { + return Promoter.enumFromString( + value, + ConversationsV2Channel.values() + ); } } - public enum Channel { - VOICE("VOICE"), - SMS("SMS"), - RCS("RCS"), - WHATSAPP("WHATSAPP"), - CHAT("CHAT"); + public enum ConversationsV2ActionStatus { + PENDING("PENDING"), + COMPLETED("COMPLETED"), + FAILED("FAILED"); private final String value; - private Channel(final String value) { + private ConversationsV2ActionStatus(final String value) { this.value = value; } @@ -460,12 +467,16 @@ public String toString() { } @JsonCreator - public static Channel forValue(final String value) { - return Promoter.enumFromString(value, Channel.values()); + public static ConversationsV2ActionStatus forValue(final String value) { + return Promoter.enumFromString( + value, + ConversationsV2ActionStatus.values() + ); } } @JsonDeserialize(builder = CreateConversationActionRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConversationActionRequest { @@ -502,6 +513,7 @@ public static CreateConversationActionRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -552,6 +564,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2SendMessagePayload.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2SendMessagePayload { @@ -601,6 +614,7 @@ public static ConversationsV2SendMessagePayload fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -621,9 +635,9 @@ public Builder( @JsonProperty( "from" ) final ConversationsV2SendMessageParticipant from, - @JsonProperty("to") final List< - ConversationsV2SendMessageParticipant - > to, + @JsonProperty( + "to" + ) final List to, @JsonProperty( "content" ) final ConversationsV2SendMessageContent content @@ -674,6 +688,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2SendMessageContent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2SendMessageContent { @@ -719,6 +734,7 @@ public static ConversationsV2SendMessageContent fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -796,6 +812,7 @@ public int hashCode() { @JsonDeserialize( builder = ConversationsV2SendMessageParticipant.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2SendMessageParticipant { @@ -813,7 +830,7 @@ public static class ConversationsV2SendMessageParticipant { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") @Getter - private final Action.Channel channel; + private final Action.ConversationsV2Channel channel; private ConversationsV2SendMessageParticipant(Builder builder) { this.participantId = builder.participantId; @@ -835,6 +852,7 @@ public static ConversationsV2SendMessageParticipant fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -845,7 +863,7 @@ public static class Builder { private String address; @JsonProperty("channel") - private Action.Channel channel; + private Action.ConversationsV2Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participantId") @@ -863,7 +881,7 @@ public Builder address(String address) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") - public Builder channel(Action.Channel channel) { + public Builder channel(Action.ConversationsV2Channel channel) { this.channel = channel; return this; } diff --git a/src/main/java/com/twilio/rest/conversations/v2/ActionCreator.java b/src/main/java/com/twilio/rest/conversations/v2/ActionCreator.java index d2e937ce35..216e7a4e13 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ActionCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ActionCreator.java @@ -52,11 +52,10 @@ public ActionCreator setCreateConversationActionRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Conversations/{ConversationId}/Actions"; - path = - path.replace( - "{" + "ConversationId" + "}", - this.pathConversationId.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/conversations/v2/ActionFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/ActionFetcher.java index c38b60867a..879069e43b 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ActionFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ActionFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -44,13 +43,14 @@ public ActionFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Conversations/{ConversationId}/Actions/{ActionId}"; - path = - path.replace( - "{" + "ConversationId" + "}", - this.pathConversationId.toString() - ); - path = - path.replace("{" + "ActionId" + "}", this.pathActionId.toString()); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); + path = path.replace( + "{" + "ActionId" + "}", + this.pathActionId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -66,16 +66,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/conversations/v2/Communication.java b/src/main/java/com/twilio/rest/conversations/v2/Communication.java index 21ed22918b..140118ab5e 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Communication.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Communication.java @@ -76,9 +76,7 @@ public static class CreateCommunicationResponse extends Resource { private final ZonedDateTime occurredAt; @Getter - private final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients; + private final List recipients; @Getter private final String resourceId; @@ -100,9 +98,9 @@ private CreateCommunicationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("occurredAt") final ZonedDateTime occurredAt, - @JsonProperty("recipients") final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients, + @JsonProperty( + "recipients" + ) final List recipients, @JsonProperty("resourceId") final String resourceId, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { @@ -212,7 +210,7 @@ public boolean equals(final Object o) { return false; } UpdateCommunicationResponse other = (UpdateCommunicationResponse) o; - return (true); + return true; } @Override @@ -291,9 +289,7 @@ public static class ListCommunicationResponse extends Resource { private final ZonedDateTime occurredAt; @Getter - private final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients; + private final List recipients; @Getter private final String resourceId; @@ -315,9 +311,9 @@ private ListCommunicationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("occurredAt") final ZonedDateTime occurredAt, - @JsonProperty("recipients") final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients, + @JsonProperty( + "recipients" + ) final List recipients, @JsonProperty("resourceId") final String resourceId, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { @@ -464,9 +460,7 @@ public static class FetchCommunicationResponse extends Resource { private final ZonedDateTime occurredAt; @Getter - private final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients; + private final List recipients; @Getter private final String resourceId; @@ -488,9 +482,9 @@ private FetchCommunicationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("occurredAt") final ZonedDateTime occurredAt, - @JsonProperty("recipients") final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients, + @JsonProperty( + "recipients" + ) final List recipients, @JsonProperty("resourceId") final String resourceId, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { @@ -568,24 +562,25 @@ public int hashCode() { } public static CommunicationCreator creator( - final String pathConversationSid + final String pathConversationId ) { - return new CommunicationCreator(pathConversationSid); + return new CommunicationCreator(pathConversationId); } public static CommunicationFetcher fetcher( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - return new CommunicationFetcher(pathConversationSid, pathSid); + return new CommunicationFetcher(pathConversationId, pathId); } - public static CommunicationReader reader(final String pathConversationSid) { - return new CommunicationReader(pathConversationSid); + public static CommunicationReader reader(final String pathConversationId) { + return new CommunicationReader(pathConversationId); } public enum Type { - TEXT("TEXT"); + TEXT("TEXT"), + TRANSCRIPTION("TRANSCRIPTION"); private final String value; @@ -604,6 +599,33 @@ public static Type forValue(final String value) { } } + public enum ConversationsV2Channel { + VOICE("VOICE"), + SMS("SMS"), + RCS("RCS"), + WHATSAPP("WHATSAPP"), + CHAT("CHAT"); + + private final String value; + + private ConversationsV2Channel(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2Channel forValue(final String value) { + return Promoter.enumFromString( + value, + ConversationsV2Channel.values() + ); + } + } + public enum Channel { VOICE("VOICE"), SMS("SMS"), @@ -628,7 +650,7 @@ public static Channel forValue(final String value) { } } - public enum DeliveryStatus { + public enum ConversationsV2RecipientDeliveryStatus { INITIATED("INITIATED"), IN_PROGRESS("IN_PROGRESS"), DELIVERED("DELIVERED"), @@ -637,7 +659,7 @@ public enum DeliveryStatus { private final String value; - private DeliveryStatus(final String value) { + private ConversationsV2RecipientDeliveryStatus(final String value) { this.value = value; } @@ -647,12 +669,18 @@ public String toString() { } @JsonCreator - public static DeliveryStatus forValue(final String value) { - return Promoter.enumFromString(value, DeliveryStatus.values()); + public static ConversationsV2RecipientDeliveryStatus forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2RecipientDeliveryStatus.values() + ); } } @JsonDeserialize(builder = ConversationsV2ParticipantAddress.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2ParticipantAddress { @@ -665,7 +693,7 @@ public static class ConversationsV2ParticipantAddress { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") @Getter - private final Communication.Channel channel; + private final Communication.ConversationsV2Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participantId") @@ -680,7 +708,7 @@ private ConversationsV2ParticipantAddress(Builder builder) { public static Builder builder( final String address, - final Communication.Channel channel + final Communication.ConversationsV2Channel channel ) { return new Builder(address, channel); } @@ -695,6 +723,7 @@ public static ConversationsV2ParticipantAddress fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -702,7 +731,7 @@ public static class Builder { private String address; @JsonProperty("channel") - private Communication.Channel channel; + private Communication.ConversationsV2Channel channel; @JsonProperty("participantId") private String participantId; @@ -710,7 +739,9 @@ public static class Builder { @JsonCreator public Builder( @JsonProperty("address") final String address, - @JsonProperty("channel") final Communication.Channel channel + @JsonProperty( + "channel" + ) final Communication.ConversationsV2Channel channel ) { this.address = address; this.channel = channel; @@ -754,236 +785,84 @@ public int hashCode() { } @JsonDeserialize( - builder = CreateCommunicationInConversationRequest.Builder.class + builder = CreateCommunicationInConversationRequestRecipients.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class CreateCommunicationInConversationRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("author") - @Getter - private final CreateCommunicationInConversationRequestAuthor author; + public static class CreateCommunicationInConversationRequestRecipients { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("content") + @JsonProperty("address") @Getter - private final CreateCommunicationInConversationRequestContent content; + private final String address; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") + @JsonProperty("channel") @Getter - private final String channelId; + private final Communication.Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("recipients") + @JsonProperty("participantId") @Getter - private final List< - CreateCommunicationInConversationRequestAuthor - > recipients; + private final String participantId; - private CreateCommunicationInConversationRequest(Builder builder) { - this.author = builder.author; - this.content = builder.content; - this.channelId = builder.channelId; - this.recipients = builder.recipients; + private CreateCommunicationInConversationRequestRecipients( + Builder builder + ) { + this.address = builder.address; + this.channel = builder.channel; + this.participantId = builder.participantId; } public static Builder builder( - final CreateCommunicationInConversationRequestAuthor author, - final CreateCommunicationInConversationRequestContent content, - final List< - CreateCommunicationInConversationRequestAuthor - > recipients + final String address, + final Communication.Channel channel ) { - return new Builder(author, content, recipients); + return new Builder(address, channel); } - public static CreateCommunicationInConversationRequest fromJson( + public static CreateCommunicationInConversationRequestRecipients fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - CreateCommunicationInConversationRequest.class + CreateCommunicationInConversationRequestRecipients.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("author") - private CreateCommunicationInConversationRequestAuthor author; - - @JsonProperty("content") - private CreateCommunicationInConversationRequestContent content; + @JsonProperty("address") + private String address; - @JsonProperty("channelId") - private String channelId; + @JsonProperty("channel") + private Communication.Channel channel; - @JsonProperty("recipients") - private List< - CreateCommunicationInConversationRequestAuthor - > recipients; + @JsonProperty("participantId") + private String participantId; @JsonCreator public Builder( - @JsonProperty( - "author" - ) final CreateCommunicationInConversationRequestAuthor author, - @JsonProperty( - "content" - ) final CreateCommunicationInConversationRequestContent content, - @JsonProperty("recipients") final List< - CreateCommunicationInConversationRequestAuthor - > recipients + @JsonProperty("address") final String address, + @JsonProperty("channel") final Communication.Channel channel ) { - this.author = author; - this.content = content; - this.recipients = recipients; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") - public Builder channelId(String channelId) { - this.channelId = channelId; - return this; - } - - public CreateCommunicationInConversationRequest build() { - return new CreateCommunicationInConversationRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - CreateCommunicationInConversationRequest other = - (CreateCommunicationInConversationRequest) o; - return ( - Objects.equals(author, other.author) && - Objects.equals(content, other.content) && - Objects.equals(channelId, other.channelId) && - Objects.equals(recipients, other.recipients) - ); - } - - @Override - public int hashCode() { - return Objects.hash(author, content, channelId, recipients); - } - } - - @JsonDeserialize( - builder = ConversationsV2ContentTranscriptionTranscription.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class ConversationsV2ContentTranscriptionTranscription { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channel") - @Getter - private final Integer channel; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("confidence") - @Getter - private final Float confidence; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("engine") - @Getter - private final String engine; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("words") - @Getter - private final List< - ConversationsV2ContentTranscriptionTranscriptionWords - > words; - - private ConversationsV2ContentTranscriptionTranscription( - Builder builder - ) { - this.channel = builder.channel; - this.confidence = builder.confidence; - this.engine = builder.engine; - this.words = builder.words; - } - - public static Builder builder() { - return new Builder(); - } - - public static ConversationsV2ContentTranscriptionTranscription fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - ConversationsV2ContentTranscriptionTranscription.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("channel") - private Integer channel; - - @JsonProperty("confidence") - private Float confidence; - - @JsonProperty("engine") - private String engine; - - @JsonProperty("words") - private List< - ConversationsV2ContentTranscriptionTranscriptionWords - > words; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channel") - public Builder channel(Integer channel) { + this.address = address; this.channel = channel; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("confidence") - public Builder confidence(Float confidence) { - this.confidence = confidence; - return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("engine") - public Builder engine(String engine) { - this.engine = engine; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("words") - public Builder words( - List< - ConversationsV2ContentTranscriptionTranscriptionWords - > words - ) { - this.words = words; + @JsonProperty("participantId") + public Builder participantId(String participantId) { + this.participantId = participantId; return this; } - public ConversationsV2ContentTranscriptionTranscription build() { - return new ConversationsV2ContentTranscriptionTranscription( + public CreateCommunicationInConversationRequestRecipients build() { + return new CreateCommunicationInConversationRequestRecipients( this ); } @@ -999,25 +878,25 @@ public boolean equals(final Object o) { return false; } - ConversationsV2ContentTranscriptionTranscription other = - (ConversationsV2ContentTranscriptionTranscription) o; + CreateCommunicationInConversationRequestRecipients other = + (CreateCommunicationInConversationRequestRecipients) o; return ( + Objects.equals(address, other.address) && Objects.equals(channel, other.channel) && - Objects.equals(confidence, other.confidence) && - Objects.equals(engine, other.engine) && - Objects.equals(words, other.words) + Objects.equals(participantId, other.participantId) ); } @Override public int hashCode() { - return Objects.hash(channel, confidence, engine, words); + return Objects.hash(address, channel, participantId); } } @JsonDeserialize( builder = ConversationsV2ContentTranscriptionTranscriptionWords.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2ContentTranscriptionTranscriptionWords { @@ -1063,6 +942,7 @@ public static ConversationsV2ContentTranscriptionTranscriptionWords fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1143,82 +1023,90 @@ public int hashCode() { } @JsonDeserialize( - builder = CreateCommunicationInConversationRequestAuthor.Builder.class + builder = ListCommunicationByConversation200ResponseCommunicationsContent.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class CreateCommunicationInConversationRequestAuthor { + public static class ListCommunicationByConversation200ResponseCommunicationsContent { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("address") + @JsonProperty("type") @Getter - private final String address; + private final Communication.Type type; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channel") + @JsonProperty("text") @Getter - private final Communication.Channel channel; + private final String text; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") + @JsonProperty("transcription") @Getter - private final String participantId; + private final ConversationsV2ContentTranscriptionTranscription transcription; - private CreateCommunicationInConversationRequestAuthor( + private ListCommunicationByConversation200ResponseCommunicationsContent( Builder builder ) { - this.address = builder.address; - this.channel = builder.channel; - this.participantId = builder.participantId; + this.type = builder.type; + this.text = builder.text; + this.transcription = builder.transcription; } - public static Builder builder( - final String address, - final Communication.Channel channel - ) { - return new Builder(address, channel); + public static Builder builder() { + return new Builder(); } - public static CreateCommunicationInConversationRequestAuthor fromJson( + public static ListCommunicationByConversation200ResponseCommunicationsContent fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - CreateCommunicationInConversationRequestAuthor.class + ListCommunicationByConversation200ResponseCommunicationsContent.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("address") - private String address; + @JsonProperty("type") + private Communication.Type type; - @JsonProperty("channel") - private Communication.Channel channel; + @JsonProperty("text") + private String text; - @JsonProperty("participantId") - private String participantId; + @JsonProperty("transcription") + private ConversationsV2ContentTranscriptionTranscription transcription; - @JsonCreator - public Builder( - @JsonProperty("address") final String address, - @JsonProperty("channel") final Communication.Channel channel - ) { - this.address = address; - this.channel = channel; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + public Builder type(Communication.Type type) { + this.type = type; + return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") - public Builder participantId(String participantId) { - this.participantId = participantId; + @JsonProperty("text") + public Builder text(String text) { + this.text = text; return this; } - public CreateCommunicationInConversationRequestAuthor build() { - return new CreateCommunicationInConversationRequestAuthor(this); + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription") + public Builder transcription( + ConversationsV2ContentTranscriptionTranscription transcription + ) { + this.transcription = transcription; + return this; + } + + public ListCommunicationByConversation200ResponseCommunicationsContent build() { + return new ListCommunicationByConversation200ResponseCommunicationsContent( + this + ); } } @@ -1232,247 +1120,426 @@ public boolean equals(final Object o) { return false; } - CreateCommunicationInConversationRequestAuthor other = - (CreateCommunicationInConversationRequestAuthor) o; + ListCommunicationByConversation200ResponseCommunicationsContent other = + (ListCommunicationByConversation200ResponseCommunicationsContent) o; return ( - Objects.equals(address, other.address) && - Objects.equals(channel, other.channel) && - Objects.equals(participantId, other.participantId) + Objects.equals(type, other.type) && + Objects.equals(text, other.text) && + Objects.equals(transcription, other.transcription) ); } @Override public int hashCode() { - return Objects.hash(address, channel, participantId); + return Objects.hash(type, text, transcription); } } @JsonDeserialize( - builder = ListCommunicationByConversation200ResponseCommunicationsRecipients.Builder.class + builder = ListCommunicationByConversation200ResponseCommunications.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ListCommunicationByConversation200ResponseCommunicationsRecipients { + public static class ListCommunicationByConversation200ResponseCommunications { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("address") + @JsonProperty("id") @Getter - private final String address; + private final String id; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channel") + @JsonProperty("conversationId") @Getter - private final Communication.Channel channel; + private final String conversationId; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") + @JsonProperty("accountId") @Getter - private final String participantId; + private final String accountId; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("deliveryStatus") + @JsonProperty("author") + @Getter + private final ConversationsV2ParticipantAddress author; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("content") @Getter - private final Communication.DeliveryStatus deliveryStatus; + private final ListCommunicationByConversation200ResponseCommunicationsContent content; - private ListCommunicationByConversation200ResponseCommunicationsRecipients( + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channelId") + @Getter + private final String channelId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("resourceId") + @Getter + private final String resourceId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("recipients") + @Getter + private final List recipients; + + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("createdAt") + @Getter + private final ZonedDateTime createdAt; + + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("updatedAt") + @Getter + private final ZonedDateTime updatedAt; + + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("occurredAt") + @Getter + private final ZonedDateTime occurredAt; + + private ListCommunicationByConversation200ResponseCommunications( Builder builder ) { - this.address = builder.address; - this.channel = builder.channel; - this.participantId = builder.participantId; - this.deliveryStatus = builder.deliveryStatus; + this.id = builder.id; + this.conversationId = builder.conversationId; + this.accountId = builder.accountId; + this.author = builder.author; + this.content = builder.content; + this.channelId = builder.channelId; + this.resourceId = builder.resourceId; + this.recipients = builder.recipients; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + this.occurredAt = builder.occurredAt; } public static Builder builder( - final String address, - final Communication.Channel channel + final String id, + final String conversationId, + final String accountId, + final ConversationsV2ParticipantAddress author, + final ListCommunicationByConversation200ResponseCommunicationsContent content, + final List recipients ) { - return new Builder(address, channel); + return new Builder( + id, + conversationId, + accountId, + author, + content, + recipients + ); } - public static ListCommunicationByConversation200ResponseCommunicationsRecipients fromJson( + public static ListCommunicationByConversation200ResponseCommunications fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - ListCommunicationByConversation200ResponseCommunicationsRecipients.class + ListCommunicationByConversation200ResponseCommunications.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("address") - private String address; + @JsonProperty("id") + private String id; - @JsonProperty("channel") - private Communication.Channel channel; + @JsonProperty("conversationId") + private String conversationId; - @JsonProperty("participantId") - private String participantId; + @JsonProperty("accountId") + private String accountId; - @JsonProperty("deliveryStatus") - private Communication.DeliveryStatus deliveryStatus; + @JsonProperty("author") + private ConversationsV2ParticipantAddress author; + + @JsonProperty("content") + private ListCommunicationByConversation200ResponseCommunicationsContent content; + + @JsonProperty("channelId") + private String channelId; + + @JsonProperty("resourceId") + private String resourceId; + + @JsonProperty("recipients") + private List recipients; + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonProperty("createdAt") + private ZonedDateTime createdAt; + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonProperty("updatedAt") + private ZonedDateTime updatedAt; + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonProperty("occurredAt") + private ZonedDateTime occurredAt; @JsonCreator public Builder( - @JsonProperty("address") final String address, - @JsonProperty("channel") final Communication.Channel channel + @JsonProperty("id") final String id, + @JsonProperty("conversationId") final String conversationId, + @JsonProperty("accountId") final String accountId, + @JsonProperty( + "author" + ) final ConversationsV2ParticipantAddress author, + @JsonProperty( + "content" + ) final ListCommunicationByConversation200ResponseCommunicationsContent content, + @JsonProperty( + "recipients" + ) final List recipients ) { - this.address = address; - this.channel = channel; + this.id = id; + this.conversationId = conversationId; + this.accountId = accountId; + this.author = author; + this.content = content; + this.recipients = recipients; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") - public Builder participantId(String participantId) { - this.participantId = participantId; + @JsonProperty("channelId") + public Builder channelId(String channelId) { + this.channelId = channelId; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("deliveryStatus") - public Builder deliveryStatus( - Communication.DeliveryStatus deliveryStatus - ) { - this.deliveryStatus = deliveryStatus; + @JsonProperty("resourceId") + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; return this; } - public ListCommunicationByConversation200ResponseCommunicationsRecipients build() { - return new ListCommunicationByConversation200ResponseCommunicationsRecipients( - this - ); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("createdAt") + public Builder createdAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("updatedAt") + public Builder updatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("occurredAt") + public Builder occurredAt(ZonedDateTime occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + public ListCommunicationByConversation200ResponseCommunications build() { + return new ListCommunicationByConversation200ResponseCommunications( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; } if (o == null || getClass() != o.getClass()) { return false; } - ListCommunicationByConversation200ResponseCommunicationsRecipients other = - (ListCommunicationByConversation200ResponseCommunicationsRecipients) o; + ListCommunicationByConversation200ResponseCommunications other = + (ListCommunicationByConversation200ResponseCommunications) o; return ( - Objects.equals(address, other.address) && - Objects.equals(channel, other.channel) && - Objects.equals(participantId, other.participantId) && - Objects.equals(deliveryStatus, other.deliveryStatus) + Objects.equals(id, other.id) && + Objects.equals(conversationId, other.conversationId) && + Objects.equals(accountId, other.accountId) && + Objects.equals(author, other.author) && + Objects.equals(content, other.content) && + Objects.equals(channelId, other.channelId) && + Objects.equals(resourceId, other.resourceId) && + Objects.equals(recipients, other.recipients) && + Objects.equals(createdAt, other.createdAt) && + Objects.equals(updatedAt, other.updatedAt) && + Objects.equals(occurredAt, other.occurredAt) ); } @Override public int hashCode() { return Objects.hash( - address, - channel, - participantId, - deliveryStatus + id, + conversationId, + accountId, + author, + content, + channelId, + resourceId, + recipients, + createdAt, + updatedAt, + occurredAt ); } } @JsonDeserialize( - builder = ListCommunicationByConversation200ResponseMeta.Builder.class + builder = CreateCommunicationInConversationRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ListCommunicationByConversation200ResponseMeta { + public static class CreateCommunicationInConversationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("key") + @JsonProperty("author") @Getter - private final String key; + private final CreateCommunicationInConversationRequestAuthor author; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pageSize") + @JsonProperty("content") @Getter - private final Integer pageSize; + private final CreateCommunicationInConversationRequestContent content; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("previousToken") + @JsonProperty("channelId") @Getter - private final String previousToken; + private final String channelId; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("nextToken") + @JsonProperty("recipients") @Getter - private final String nextToken; + private final List recipients; - private ListCommunicationByConversation200ResponseMeta( - Builder builder - ) { - this.key = builder.key; - this.pageSize = builder.pageSize; - this.previousToken = builder.previousToken; - this.nextToken = builder.nextToken; + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("occurredAt") + @Getter + private final ZonedDateTime occurredAt; + + private CreateCommunicationInConversationRequest(Builder builder) { + this.author = builder.author; + this.content = builder.content; + this.channelId = builder.channelId; + this.recipients = builder.recipients; + this.occurredAt = builder.occurredAt; } - public static Builder builder() { - return new Builder(); + public static Builder builder( + final CreateCommunicationInConversationRequestAuthor author, + final CreateCommunicationInConversationRequestContent content, + final List recipients + ) { + return new Builder(author, content, recipients); } - public static ListCommunicationByConversation200ResponseMeta fromJson( + public static CreateCommunicationInConversationRequest fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - ListCommunicationByConversation200ResponseMeta.class + CreateCommunicationInConversationRequest.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("key") - private String key; + @JsonProperty("author") + private CreateCommunicationInConversationRequestAuthor author; - @JsonProperty("pageSize") - private Integer pageSize; + @JsonProperty("content") + private CreateCommunicationInConversationRequestContent content; - @JsonProperty("previousToken") - private String previousToken; + @JsonProperty("channelId") + private String channelId; - @JsonProperty("nextToken") - private String nextToken; + @JsonProperty("recipients") + private List recipients; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("key") - public Builder key(String key) { - this.key = key; - return this; - } + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonProperty("occurredAt") + private ZonedDateTime occurredAt; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pageSize") - public Builder pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; + @JsonCreator + public Builder( + @JsonProperty( + "author" + ) final CreateCommunicationInConversationRequestAuthor author, + @JsonProperty( + "content" + ) final CreateCommunicationInConversationRequestContent content, + @JsonProperty( + "recipients" + ) final List recipients + ) { + this.author = author; + this.content = content; + this.recipients = recipients; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("previousToken") - public Builder previousToken(String previousToken) { - this.previousToken = previousToken; + @JsonProperty("channelId") + public Builder channelId(String channelId) { + this.channelId = channelId; return this; } + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("nextToken") - public Builder nextToken(String nextToken) { - this.nextToken = nextToken; + @JsonProperty("occurredAt") + public Builder occurredAt(ZonedDateTime occurredAt) { + this.occurredAt = occurredAt; return this; } - public ListCommunicationByConversation200ResponseMeta build() { - return new ListCommunicationByConversation200ResponseMeta(this); + public CreateCommunicationInConversationRequest build() { + return new CreateCommunicationInConversationRequest(this); } } @@ -1486,26 +1553,36 @@ public boolean equals(final Object o) { return false; } - ListCommunicationByConversation200ResponseMeta other = - (ListCommunicationByConversation200ResponseMeta) o; + CreateCommunicationInConversationRequest other = + (CreateCommunicationInConversationRequest) o; return ( - Objects.equals(key, other.key) && - Objects.equals(pageSize, other.pageSize) && - Objects.equals(previousToken, other.previousToken) && - Objects.equals(nextToken, other.nextToken) + Objects.equals(author, other.author) && + Objects.equals(content, other.content) && + Objects.equals(channelId, other.channelId) && + Objects.equals(recipients, other.recipients) && + Objects.equals(occurredAt, other.occurredAt) ); } @Override public int hashCode() { - return Objects.hash(key, pageSize, previousToken, nextToken); + return Objects.hash( + author, + content, + channelId, + recipients, + occurredAt + ); } } - @JsonDeserialize(builder = ContentTranscriptionTranscription.Builder.class) + @JsonDeserialize( + builder = ConversationsV2ContentTranscriptionTranscription.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ContentTranscriptionTranscription { + public static class ConversationsV2ContentTranscriptionTranscription { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") @@ -1515,33 +1592,42 @@ public static class ContentTranscriptionTranscription { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("confidence") @Getter - private final BigDecimal confidence; + private final Float confidence; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("engine") @Getter private final String engine; - private ContentTranscriptionTranscription(Builder builder) { + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + @Getter + private final List words; + + private ConversationsV2ContentTranscriptionTranscription( + Builder builder + ) { this.channel = builder.channel; this.confidence = builder.confidence; this.engine = builder.engine; + this.words = builder.words; } public static Builder builder() { return new Builder(); } - public static ContentTranscriptionTranscription fromJson( + public static ConversationsV2ContentTranscriptionTranscription fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - ContentTranscriptionTranscription.class + ConversationsV2ContentTranscriptionTranscription.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1549,11 +1635,14 @@ public static class Builder { private Integer channel; @JsonProperty("confidence") - private BigDecimal confidence; + private Float confidence; @JsonProperty("engine") private String engine; + @JsonProperty("words") + private List words; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") public Builder channel(Integer channel) { @@ -1563,7 +1652,7 @@ public Builder channel(Integer channel) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("confidence") - public Builder confidence(BigDecimal confidence) { + public Builder confidence(Float confidence) { this.confidence = confidence; return this; } @@ -1575,119 +1664,127 @@ public Builder engine(String engine) { return this; } - public ContentTranscriptionTranscription build() { - return new ContentTranscriptionTranscription(this); + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + public Builder words( + List words + ) { + this.words = words; + return this; } - } - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; + public ConversationsV2ContentTranscriptionTranscription build() { + return new ConversationsV2ContentTranscriptionTranscription( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; } if (o == null || getClass() != o.getClass()) { return false; } - ContentTranscriptionTranscription other = - (ContentTranscriptionTranscription) o; + ConversationsV2ContentTranscriptionTranscription other = + (ConversationsV2ContentTranscriptionTranscription) o; return ( Objects.equals(channel, other.channel) && Objects.equals(confidence, other.confidence) && - Objects.equals(engine, other.engine) + Objects.equals(engine, other.engine) && + Objects.equals(words, other.words) ); } @Override public int hashCode() { - return Objects.hash(channel, confidence, engine); + return Objects.hash(channel, confidence, engine, words); } } @JsonDeserialize( - builder = CreateCommunicationInConversationRequestContent.Builder.class + builder = CreateCommunicationInConversationRequestAuthor.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class CreateCommunicationInConversationRequestContent { + public static class CreateCommunicationInConversationRequestAuthor { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") + @JsonProperty("address") @Getter - private final String text; + private final String address; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcription") + @JsonProperty("channel") @Getter - private final ContentTranscriptionTranscription transcription; + private final Communication.Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") + @JsonProperty("participantId") @Getter - private final Communication.Type type; + private final String participantId; - private CreateCommunicationInConversationRequestContent( + private CreateCommunicationInConversationRequestAuthor( Builder builder ) { - this.text = builder.text; - this.transcription = builder.transcription; - this.type = builder.type; + this.address = builder.address; + this.channel = builder.channel; + this.participantId = builder.participantId; } - public static Builder builder() { - return new Builder(); + public static Builder builder( + final String address, + final Communication.Channel channel + ) { + return new Builder(address, channel); } - public static CreateCommunicationInConversationRequestContent fromJson( + public static CreateCommunicationInConversationRequestAuthor fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - CreateCommunicationInConversationRequestContent.class + CreateCommunicationInConversationRequestAuthor.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("text") - private String text; - - @JsonProperty("transcription") - private ContentTranscriptionTranscription transcription; + @JsonProperty("address") + private String address; - @JsonProperty("type") - private Communication.Type type; + @JsonProperty("channel") + private Communication.Channel channel; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") - public Builder text(String text) { - this.text = text; - return this; - } + @JsonProperty("participantId") + private String participantId; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcription") - public Builder transcription( - ContentTranscriptionTranscription transcription + @JsonCreator + public Builder( + @JsonProperty("address") final String address, + @JsonProperty("channel") final Communication.Channel channel ) { - this.transcription = transcription; - return this; + this.address = address; + this.channel = channel; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(Communication.Type type) { - this.type = type; + @JsonProperty("participantId") + public Builder participantId(String participantId) { + this.participantId = participantId; return this; } - public CreateCommunicationInConversationRequestContent build() { - return new CreateCommunicationInConversationRequestContent( - this - ); + public CreateCommunicationInConversationRequestAuthor build() { + return new CreateCommunicationInConversationRequestAuthor(this); } } @@ -1701,102 +1798,120 @@ public boolean equals(final Object o) { return false; } - CreateCommunicationInConversationRequestContent other = - (CreateCommunicationInConversationRequestContent) o; + CreateCommunicationInConversationRequestAuthor other = + (CreateCommunicationInConversationRequestAuthor) o; return ( - Objects.equals(text, other.text) && - Objects.equals(transcription, other.transcription) && - Objects.equals(type, other.type) + Objects.equals(address, other.address) && + Objects.equals(channel, other.channel) && + Objects.equals(participantId, other.participantId) ); } @Override public int hashCode() { - return Objects.hash(text, transcription, type); + return Objects.hash(address, channel, participantId); } } @JsonDeserialize( - builder = ListCommunicationByConversation200ResponseCommunicationsContent.Builder.class + builder = ListCommunicationByConversation200ResponseCommunicationsRecipients.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ListCommunicationByConversation200ResponseCommunicationsContent { + public static class ListCommunicationByConversation200ResponseCommunicationsRecipients { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") + @JsonProperty("address") @Getter - private final String text; + private final String address; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcription") + @JsonProperty("channel") @Getter - private final ConversationsV2ContentTranscriptionTranscription transcription; + private final Communication.ConversationsV2Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") + @JsonProperty("participantId") @Getter - private final Communication.Type type; + private final String participantId; - private ListCommunicationByConversation200ResponseCommunicationsContent( + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("deliveryStatus") + @Getter + private final Communication.ConversationsV2RecipientDeliveryStatus deliveryStatus; + + private ListCommunicationByConversation200ResponseCommunicationsRecipients( Builder builder ) { - this.text = builder.text; - this.transcription = builder.transcription; - this.type = builder.type; + this.address = builder.address; + this.channel = builder.channel; + this.participantId = builder.participantId; + this.deliveryStatus = builder.deliveryStatus; } - public static Builder builder() { - return new Builder(); + public static Builder builder( + final String address, + final Communication.ConversationsV2Channel channel + ) { + return new Builder(address, channel); } - public static ListCommunicationByConversation200ResponseCommunicationsContent fromJson( + public static ListCommunicationByConversation200ResponseCommunicationsRecipients fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - ListCommunicationByConversation200ResponseCommunicationsContent.class + ListCommunicationByConversation200ResponseCommunicationsRecipients.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("text") - private String text; + @JsonProperty("address") + private String address; - @JsonProperty("transcription") - private ConversationsV2ContentTranscriptionTranscription transcription; + @JsonProperty("channel") + private Communication.ConversationsV2Channel channel; - @JsonProperty("type") - private Communication.Type type; + @JsonProperty("participantId") + private String participantId; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") - public Builder text(String text) { - this.text = text; - return this; + @JsonProperty("deliveryStatus") + private Communication.ConversationsV2RecipientDeliveryStatus deliveryStatus; + + @JsonCreator + public Builder( + @JsonProperty("address") final String address, + @JsonProperty( + "channel" + ) final Communication.ConversationsV2Channel channel + ) { + this.address = address; + this.channel = channel; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcription") - public Builder transcription( - ConversationsV2ContentTranscriptionTranscription transcription - ) { - this.transcription = transcription; + @JsonProperty("participantId") + public Builder participantId(String participantId) { + this.participantId = participantId; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(Communication.Type type) { - this.type = type; + @JsonProperty("deliveryStatus") + public Builder deliveryStatus( + Communication.ConversationsV2RecipientDeliveryStatus deliveryStatus + ) { + this.deliveryStatus = deliveryStatus; return this; } - public ListCommunicationByConversation200ResponseCommunicationsContent build() { - return new ListCommunicationByConversation200ResponseCommunicationsContent( + public ListCommunicationByConversation200ResponseCommunicationsRecipients build() { + return new ListCommunicationByConversation200ResponseCommunicationsRecipients( this ); } @@ -1812,259 +1927,341 @@ public boolean equals(final Object o) { return false; } - ListCommunicationByConversation200ResponseCommunicationsContent other = - (ListCommunicationByConversation200ResponseCommunicationsContent) o; + ListCommunicationByConversation200ResponseCommunicationsRecipients other = + (ListCommunicationByConversation200ResponseCommunicationsRecipients) o; return ( - Objects.equals(text, other.text) && - Objects.equals(transcription, other.transcription) && - Objects.equals(type, other.type) + Objects.equals(address, other.address) && + Objects.equals(channel, other.channel) && + Objects.equals(participantId, other.participantId) && + Objects.equals(deliveryStatus, other.deliveryStatus) ); } @Override public int hashCode() { - return Objects.hash(text, transcription, type); + return Objects.hash( + address, + channel, + participantId, + deliveryStatus + ); } } @JsonDeserialize( - builder = ListCommunicationByConversation200ResponseCommunications.Builder.class + builder = ListCommunicationByConversation200ResponseMeta.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ListCommunicationByConversation200ResponseCommunications { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - private final String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("conversationId") - @Getter - private final String conversationId; + public static class ListCommunicationByConversation200ResponseMeta { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("accountId") + @JsonProperty("key") @Getter - private final String accountId; + private final String key; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("author") + @JsonProperty("pageSize") @Getter - private final ConversationsV2ParticipantAddress author; + private final Integer pageSize; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("content") + @JsonProperty("previousToken") @Getter - private final ListCommunicationByConversation200ResponseCommunicationsContent content; + private final String previousToken; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") + @JsonProperty("nextToken") @Getter - private final String channelId; + private final String nextToken; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("resourceId") - @Getter - private final String resourceId; + private ListCommunicationByConversation200ResponseMeta( + Builder builder + ) { + this.key = builder.key; + this.pageSize = builder.pageSize; + this.previousToken = builder.previousToken; + this.nextToken = builder.nextToken; + } - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("recipients") - @Getter - private final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients; + public static Builder builder() { + return new Builder(); + } + + public static ListCommunicationByConversation200ResponseMeta fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + ListCommunicationByConversation200ResponseMeta.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("key") + private String key; + + @JsonProperty("pageSize") + private Integer pageSize; + + @JsonProperty("previousToken") + private String previousToken; + + @JsonProperty("nextToken") + private String nextToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + public Builder key(String key) { + this.key = key; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + public Builder pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + public Builder previousToken(String previousToken) { + this.previousToken = previousToken; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + public Builder nextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + public ListCommunicationByConversation200ResponseMeta build() { + return new ListCommunicationByConversation200ResponseMeta(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ListCommunicationByConversation200ResponseMeta other = + (ListCommunicationByConversation200ResponseMeta) o; + return ( + Objects.equals(key, other.key) && + Objects.equals(pageSize, other.pageSize) && + Objects.equals(previousToken, other.previousToken) && + Objects.equals(nextToken, other.nextToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(key, pageSize, previousToken, nextToken); + } + } + + @JsonDeserialize(builder = ContentTranscriptionTranscription.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ContentTranscriptionTranscription { - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("createdAt") + @JsonProperty("channel") @Getter - private final ZonedDateTime createdAt; + private final Integer channel; - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("updatedAt") + @JsonProperty("confidence") @Getter - private final ZonedDateTime updatedAt; + private final BigDecimal confidence; - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("occurredAt") + @JsonProperty("engine") @Getter - private final ZonedDateTime occurredAt; + private final String engine; - private ListCommunicationByConversation200ResponseCommunications( - Builder builder - ) { - this.id = builder.id; - this.conversationId = builder.conversationId; - this.accountId = builder.accountId; - this.author = builder.author; - this.content = builder.content; - this.channelId = builder.channelId; - this.resourceId = builder.resourceId; - this.recipients = builder.recipients; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - this.occurredAt = builder.occurredAt; + private ContentTranscriptionTranscription(Builder builder) { + this.channel = builder.channel; + this.confidence = builder.confidence; + this.engine = builder.engine; } - public static Builder builder( - final String id, - final String conversationId, - final String accountId, - final ConversationsV2ParticipantAddress author, - final ListCommunicationByConversation200ResponseCommunicationsContent content, - final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients - ) { - return new Builder( - id, - conversationId, - accountId, - author, - content, - recipients - ); + public static Builder builder() { + return new Builder(); } - public static ListCommunicationByConversation200ResponseCommunications fromJson( + public static ContentTranscriptionTranscription fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - ListCommunicationByConversation200ResponseCommunications.class + ContentTranscriptionTranscription.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("id") - private String id; + @JsonProperty("channel") + private Integer channel; - @JsonProperty("conversationId") - private String conversationId; + @JsonProperty("confidence") + private BigDecimal confidence; - @JsonProperty("accountId") - private String accountId; + @JsonProperty("engine") + private String engine; - @JsonProperty("author") - private ConversationsV2ParticipantAddress author; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channel") + public Builder channel(Integer channel) { + this.channel = channel; + return this; + } - @JsonProperty("content") - private ListCommunicationByConversation200ResponseCommunicationsContent content; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("confidence") + public Builder confidence(BigDecimal confidence) { + this.confidence = confidence; + return this; + } - @JsonProperty("channelId") - private String channelId; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("engine") + public Builder engine(String engine) { + this.engine = engine; + return this; + } - @JsonProperty("resourceId") - private String resourceId; + public ContentTranscriptionTranscription build() { + return new ContentTranscriptionTranscription(this); + } + } - @JsonProperty("recipients") - private List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients; + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("createdAt") - private ZonedDateTime createdAt; + if (o == null || getClass() != o.getClass()) { + return false; + } - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("updatedAt") - private ZonedDateTime updatedAt; + ContentTranscriptionTranscription other = + (ContentTranscriptionTranscription) o; + return ( + Objects.equals(channel, other.channel) && + Objects.equals(confidence, other.confidence) && + Objects.equals(engine, other.engine) + ); + } - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("occurredAt") - private ZonedDateTime occurredAt; + @Override + public int hashCode() { + return Objects.hash(channel, confidence, engine); + } + } - @JsonCreator - public Builder( - @JsonProperty("id") final String id, - @JsonProperty("conversationId") final String conversationId, - @JsonProperty("accountId") final String accountId, - @JsonProperty( - "author" - ) final ConversationsV2ParticipantAddress author, - @JsonProperty( - "content" - ) final ListCommunicationByConversation200ResponseCommunicationsContent content, - @JsonProperty("recipients") final List< - ListCommunicationByConversation200ResponseCommunicationsRecipients - > recipients - ) { - this.id = id; - this.conversationId = conversationId; - this.accountId = accountId; - this.author = author; - this.content = content; - this.recipients = recipients; - } + @JsonDeserialize( + builder = CreateCommunicationInConversationRequestContent.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CreateCommunicationInConversationRequestContent { - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") - public Builder channelId(String channelId) { - this.channelId = channelId; - return this; - } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final Communication.Type type; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("resourceId") - public Builder resourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("text") + @Getter + private final String text; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription") + @Getter + private final ContentTranscriptionTranscription transcription; + + private CreateCommunicationInConversationRequestContent( + Builder builder + ) { + this.type = builder.type; + this.text = builder.text; + this.transcription = builder.transcription; + } + + public static Builder builder() { + return new Builder(); + } + + public static CreateCommunicationInConversationRequestContent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CreateCommunicationInConversationRequestContent.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("type") + private Communication.Type type; + + @JsonProperty("text") + private String text; + + @JsonProperty("transcription") + private ContentTranscriptionTranscription transcription; - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("createdAt") - public Builder createdAt(ZonedDateTime createdAt) { - this.createdAt = createdAt; + @JsonProperty("type") + public Builder type(Communication.Type type) { + this.type = type; return this; } - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("updatedAt") - public Builder updatedAt(ZonedDateTime updatedAt) { - this.updatedAt = updatedAt; + @JsonProperty("text") + public Builder text(String text) { + this.text = text; return this; } - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("occurredAt") - public Builder occurredAt(ZonedDateTime occurredAt) { - this.occurredAt = occurredAt; + @JsonProperty("transcription") + public Builder transcription( + ContentTranscriptionTranscription transcription + ) { + this.transcription = transcription; return this; } - public ListCommunicationByConversation200ResponseCommunications build() { - return new ListCommunicationByConversation200ResponseCommunications( + public CreateCommunicationInConversationRequestContent build() { + return new CreateCommunicationInConversationRequestContent( this ); } @@ -2080,38 +2277,18 @@ public boolean equals(final Object o) { return false; } - ListCommunicationByConversation200ResponseCommunications other = - (ListCommunicationByConversation200ResponseCommunications) o; + CreateCommunicationInConversationRequestContent other = + (CreateCommunicationInConversationRequestContent) o; return ( - Objects.equals(id, other.id) && - Objects.equals(conversationId, other.conversationId) && - Objects.equals(accountId, other.accountId) && - Objects.equals(author, other.author) && - Objects.equals(content, other.content) && - Objects.equals(channelId, other.channelId) && - Objects.equals(resourceId, other.resourceId) && - Objects.equals(recipients, other.recipients) && - Objects.equals(createdAt, other.createdAt) && - Objects.equals(updatedAt, other.updatedAt) && - Objects.equals(occurredAt, other.occurredAt) + Objects.equals(type, other.type) && + Objects.equals(text, other.text) && + Objects.equals(transcription, other.transcription) ); } @Override public int hashCode() { - return Objects.hash( - id, - conversationId, - accountId, - author, - content, - channelId, - resourceId, - recipients, - createdAt, - updatedAt, - occurredAt - ); + return Objects.hash(type, text, transcription); } } diff --git a/src/main/java/com/twilio/rest/conversations/v2/CommunicationCreator.java b/src/main/java/com/twilio/rest/conversations/v2/CommunicationCreator.java index 8070ac0c07..123b22707e 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/CommunicationCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v2/CommunicationCreator.java @@ -30,13 +30,14 @@ import java.io.InputStream; public class CommunicationCreator - extends Creator { + extends Creator +{ - private String pathConversationSid; + private String pathConversationId; private Communication.CreateCommunicationInConversationRequest createCommunicationInConversationRequest; - public CommunicationCreator(final String pathConversationSid) { - this.pathConversationSid = pathConversationSid; + public CommunicationCreator(final String pathConversationId) { + this.pathConversationId = pathConversationId; } public CommunicationCreator setCreateCommunicationInConversationRequest( @@ -48,13 +49,12 @@ public CommunicationCreator setCreateCommunicationInConversationRequest( } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Communications"; + String path = "/v2/Conversations/{ConversationId}/Communications"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); Request request = new Request( HttpMethod.POST, @@ -99,9 +99,9 @@ public Communication.CreateCommunicationResponse create( } @Override - public TwilioResponse< - Communication.CreateCommunicationResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Communication.CreateCommunicationResponse content = Communication.CreateCommunicationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/CommunicationFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/CommunicationFetcher.java index 3ddff78477..4c68656234 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/CommunicationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/CommunicationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,29 +28,28 @@ import java.io.InputStream; public class CommunicationFetcher - extends Fetcher { + extends Fetcher +{ - private String pathConversationSid; - private String pathSid; + private String pathConversationId; + private String pathId; public CommunicationFetcher( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - this.pathConversationSid = pathConversationSid; - this.pathSid = pathSid; + this.pathConversationId = pathConversationId; + this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = - "/v2/Conversations/{ConversationSid}/Communications/{Sid}"; + String path = "/v2/Conversations/{ConversationId}/Communications/{id}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.GET, @@ -67,16 +65,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -104,9 +92,9 @@ public Communication.FetchCommunicationResponse fetch( } @Override - public TwilioResponse< - Communication.FetchCommunicationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Communication.FetchCommunicationResponse content = Communication.FetchCommunicationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/CommunicationReader.java b/src/main/java/com/twilio/rest/conversations/v2/CommunicationReader.java index 1978972df3..c5432fe61b 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/CommunicationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v2/CommunicationReader.java @@ -36,15 +36,16 @@ import java.io.InputStream; public class CommunicationReader - extends Reader { + extends Reader +{ - private String pathConversationSid; + private String pathConversationId; private String channelId; private Integer pageSize; private String pageToken; - public CommunicationReader(final String pathConversationSid) { - this.pathConversationSid = pathConversationSid; + public CommunicationReader(final String pathConversationId) { + this.pathConversationId = pathConversationId; } public CommunicationReader setChannelId(final String channelId) { @@ -62,9 +63,9 @@ public CommunicationReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - Communication.ListCommunicationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -83,13 +84,12 @@ > readWithResponse(final TwilioRestClient client) { } private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Communications"; + String path = "/v2/Conversations/{ConversationId}/Communications"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -187,13 +187,12 @@ public Page previousPage( final Page page, final TwilioRestClient client ) { - String path = "/v2/Conversations/{ConversationSid}/Communications"; + String path = "/v2/Conversations/{ConversationId}/Communications"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -210,13 +209,12 @@ public Page nextPage( final Page page, final TwilioRestClient client ) { - String path = "/v2/Conversations/{ConversationSid}/Communications"; + String path = "/v2/Conversations/{ConversationId}/Communications"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v2/Configuration.java b/src/main/java/com/twilio/rest/conversations/v2/Configuration.java index 09ccdd23e5..86d8d1e277 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Configuration.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Configuration.java @@ -230,7 +230,7 @@ public static class ListConfigurationResponse extends Resource { > channelSettings; @Getter - private final Configuration.ConversationGroupingType conversationGroupingType; + private final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType; @Getter private final ConversationsV2ConversationsV1Bridge conversationsV1Bridge; @@ -273,7 +273,7 @@ private ListConfigurationResponse( > channelSettings, @JsonProperty( "conversationGroupingType" - ) final Configuration.ConversationGroupingType conversationGroupingType, + ) final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType, @JsonProperty( "conversationsV1Bridge" ) final ConversationsV2ConversationsV1Bridge conversationsV1Bridge, @@ -281,16 +281,16 @@ private ListConfigurationResponse( @JsonProperty("description") final String description, @JsonProperty("displayName") final String displayName, @JsonProperty("id") final String id, - @JsonProperty("intelligenceConfigurationIds") final List< - String - > intelligenceConfigurationIds, + @JsonProperty( + "intelligenceConfigurationIds" + ) final List intelligenceConfigurationIds, @JsonProperty( "memoryExtractionEnabled" ) final Boolean memoryExtractionEnabled, @JsonProperty("memoryStoreId") final String memoryStoreId, - @JsonProperty("statusCallbacks") final List< - ConversationsV2StatusCallbackConfig - > statusCallbacks, + @JsonProperty( + "statusCallbacks" + ) final List statusCallbacks, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, @JsonProperty("version") final Long version ) { @@ -437,7 +437,7 @@ public static class FetchConfigurationResponse extends Resource { > channelSettings; @Getter - private final Configuration.ConversationGroupingType conversationGroupingType; + private final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType; @Getter private final ConversationsV2ConversationsV1Bridge conversationsV1Bridge; @@ -480,7 +480,7 @@ private FetchConfigurationResponse( > channelSettings, @JsonProperty( "conversationGroupingType" - ) final Configuration.ConversationGroupingType conversationGroupingType, + ) final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType, @JsonProperty( "conversationsV1Bridge" ) final ConversationsV2ConversationsV1Bridge conversationsV1Bridge, @@ -488,16 +488,16 @@ private FetchConfigurationResponse( @JsonProperty("description") final String description, @JsonProperty("displayName") final String displayName, @JsonProperty("id") final String id, - @JsonProperty("intelligenceConfigurationIds") final List< - String - > intelligenceConfigurationIds, + @JsonProperty( + "intelligenceConfigurationIds" + ) final List intelligenceConfigurationIds, @JsonProperty( "memoryExtractionEnabled" ) final Boolean memoryExtractionEnabled, @JsonProperty("memoryStoreId") final String memoryStoreId, - @JsonProperty("statusCallbacks") final List< - ConversationsV2StatusCallbackConfig - > statusCallbacks, + @JsonProperty( + "statusCallbacks" + ) final List statusCallbacks, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, @JsonProperty("version") final Long version ) { @@ -596,20 +596,20 @@ public static ConfigurationCreator creator() { return new ConfigurationCreator(); } - public static ConfigurationDeleter deleter(final String pathSid) { - return new ConfigurationDeleter(pathSid); + public static ConfigurationDeleter deleter(final String pathId) { + return new ConfigurationDeleter(pathId); } - public static ConfigurationFetcher fetcher(final String pathSid) { - return new ConfigurationFetcher(pathSid); + public static ConfigurationFetcher fetcher(final String pathId) { + return new ConfigurationFetcher(pathId); } public static ConfigurationReader reader() { return new ConfigurationReader(); } - public static ConfigurationUpdater updater(final String pathSid) { - return new ConfigurationUpdater(pathSid); + public static ConfigurationUpdater updater(final String pathId) { + return new ConfigurationUpdater(pathId); } public enum ConversationGroupingType { @@ -641,10 +641,7 @@ public static ConversationGroupingType forValue(final String value) { public enum Method { POST("POST"), - GET("GET"), - PUT("PUT"), - DELETE("DELETE"), - PATCH("PATCH"); + GET("GET"); private final String value; @@ -663,7 +660,37 @@ public static Method forValue(final String value) { } } + public enum ConversationsV2ConversationGroupingType { + GROUP_BY_PROFILE("GROUP_BY_PROFILE"), + GROUP_BY_PARTICIPANT_ADDRESSES("GROUP_BY_PARTICIPANT_ADDRESSES"), + GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE( + "GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE" + ); + + private final String value; + + private ConversationsV2ConversationGroupingType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2ConversationGroupingType forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2ConversationGroupingType.values() + ); + } + } + @JsonDeserialize(builder = ListConfiguration200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConfiguration200ResponseMeta { @@ -712,6 +739,7 @@ public static ListConfiguration200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -784,6 +812,7 @@ public int hashCode() { @JsonDeserialize( builder = UpdateConfigurationRequestChannelSettingsValueCaptureRules.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequestChannelSettingsValueCaptureRules { @@ -825,6 +854,7 @@ public static UpdateConfigurationRequestChannelSettingsValueCaptureRules fromJso ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -888,6 +918,7 @@ public int hashCode() { @JsonDeserialize( builder = UpdateConfigurationRequestStatusCallbacks.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequestStatusCallbacks { @@ -921,6 +952,7 @@ public static UpdateConfigurationRequestStatusCallbacks fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -974,6 +1006,7 @@ public int hashCode() { @JsonDeserialize( builder = UpdateConfigurationRequestChannelSettingsValue.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequestChannelSettingsValue { @@ -986,9 +1019,7 @@ public static class UpdateConfigurationRequestChannelSettingsValue { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("captureRules") @Getter - private final List< - UpdateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules; + private final List captureRules; private UpdateConfigurationRequestChannelSettingsValue( Builder builder @@ -1011,6 +1042,7 @@ public static UpdateConfigurationRequestChannelSettingsValue fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1018,9 +1050,7 @@ public static class Builder { private UpdateConfigurationRequestChannelSettingsValueStatusTimeouts statusTimeouts; @JsonProperty("captureRules") - private List< - UpdateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules; + private List captureRules; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("statusTimeouts") @@ -1034,9 +1064,7 @@ public Builder statusTimeouts( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("captureRules") public Builder captureRules( - List< - UpdateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules + List captureRules ) { this.captureRules = captureRules; return this; @@ -1074,6 +1102,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConfigurationRequestChannelSettingsValue.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequestChannelSettingsValue { @@ -1086,9 +1115,7 @@ public static class CreateConfigurationRequestChannelSettingsValue { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("captureRules") @Getter - private final List< - CreateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules; + private final List captureRules; private CreateConfigurationRequestChannelSettingsValue( Builder builder @@ -1111,6 +1138,7 @@ public static CreateConfigurationRequestChannelSettingsValue fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1118,9 +1146,7 @@ public static class Builder { private CreateConfigurationRequestChannelSettingsValueStatusTimeouts statusTimeouts; @JsonProperty("captureRules") - private List< - CreateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules; + private List captureRules; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("statusTimeouts") @@ -1134,9 +1160,7 @@ public Builder statusTimeouts( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("captureRules") public Builder captureRules( - List< - CreateConfigurationRequestChannelSettingsValueCaptureRules - > captureRules + List captureRules ) { this.captureRules = captureRules; return this; @@ -1171,7 +1195,81 @@ public int hashCode() { } } + @JsonDeserialize( + builder = CreateConfigurationRequestConversationsV1Bridge.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CreateConfigurationRequestConversationsV1Bridge { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("serviceId") + @Getter + private final String serviceId; + + private CreateConfigurationRequestConversationsV1Bridge( + Builder builder + ) { + this.serviceId = builder.serviceId; + } + + public static Builder builder(final String serviceId) { + return new Builder(serviceId); + } + + public static CreateConfigurationRequestConversationsV1Bridge fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CreateConfigurationRequestConversationsV1Bridge.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("serviceId") + private String serviceId; + + @JsonCreator + public Builder(@JsonProperty("serviceId") final String serviceId) { + this.serviceId = serviceId; + } + + public CreateConfigurationRequestConversationsV1Bridge build() { + return new CreateConfigurationRequestConversationsV1Bridge( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CreateConfigurationRequestConversationsV1Bridge other = + (CreateConfigurationRequestConversationsV1Bridge) o; + return Objects.equals(serviceId, other.serviceId); + } + + @Override + public int hashCode() { + return Objects.hash(serviceId); + } + } + @JsonDeserialize(builder = ConversationsV2ChannelSetting.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2ChannelSetting { @@ -1205,6 +1303,7 @@ public static ConversationsV2ChannelSetting fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1262,6 +1361,7 @@ public int hashCode() { } @JsonDeserialize(builder = UpdateConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequest { @@ -1297,9 +1397,7 @@ public static class UpdateConfigurationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("statusCallbacks") @Getter - private final List< - UpdateConfigurationRequestStatusCallbacks - > statusCallbacks; + private final List statusCallbacks; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("intelligenceConfigurationIds") @@ -1311,6 +1409,11 @@ public static class UpdateConfigurationRequest { @Getter private final Boolean memoryExtractionEnabled; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationsV1Bridge") + @Getter + private final CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge; + private UpdateConfigurationRequest(Builder builder) { this.displayName = builder.displayName; this.description = builder.description; @@ -1321,6 +1424,7 @@ private UpdateConfigurationRequest(Builder builder) { this.intelligenceConfigurationIds = builder.intelligenceConfigurationIds; this.memoryExtractionEnabled = builder.memoryExtractionEnabled; + this.conversationsV1Bridge = builder.conversationsV1Bridge; } public static Builder builder( @@ -1350,6 +1454,7 @@ public static UpdateConfigurationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1372,9 +1477,7 @@ public static class Builder { > channelSettings; @JsonProperty("statusCallbacks") - private List< - UpdateConfigurationRequestStatusCallbacks - > statusCallbacks; + private List statusCallbacks; @JsonProperty("intelligenceConfigurationIds") private List intelligenceConfigurationIds; @@ -1382,6 +1485,9 @@ public static class Builder { @JsonProperty("memoryExtractionEnabled") private Boolean memoryExtractionEnabled; + @JsonProperty("conversationsV1Bridge") + private CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge; + @JsonCreator public Builder( @JsonProperty("description") final String description, @@ -1435,6 +1541,15 @@ public Builder memoryExtractionEnabled( return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationsV1Bridge") + public Builder conversationsV1Bridge( + CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge + ) { + this.conversationsV1Bridge = conversationsV1Bridge; + return this; + } + public UpdateConfigurationRequest build() { return new UpdateConfigurationRequest(this); } @@ -1468,6 +1583,10 @@ public boolean equals(final Object o) { Objects.equals( memoryExtractionEnabled, other.memoryExtractionEnabled + ) && + Objects.equals( + conversationsV1Bridge, + other.conversationsV1Bridge ) ); } @@ -1482,7 +1601,8 @@ public int hashCode() { channelSettings, statusCallbacks, intelligenceConfigurationIds, - memoryExtractionEnabled + memoryExtractionEnabled, + conversationsV1Bridge ); } } @@ -1490,6 +1610,7 @@ public int hashCode() { @JsonDeserialize( builder = ConversationsV2StatusCallbackConfig.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2StatusCallbackConfig { @@ -1523,6 +1644,7 @@ public static ConversationsV2StatusCallbackConfig fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1574,6 +1696,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2StatusTimeouts.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2StatusTimeouts { @@ -1607,6 +1730,7 @@ public static ConversationsV2StatusTimeouts fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1660,6 +1784,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2CaptureRule.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2CaptureRule { @@ -1699,6 +1824,7 @@ public static ConversationsV2CaptureRule fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1757,6 +1883,7 @@ public int hashCode() { } @JsonDeserialize(builder = CreateConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequest { @@ -1792,9 +1919,7 @@ public static class CreateConfigurationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("statusCallbacks") @Getter - private final List< - CreateConfigurationRequestStatusCallbacks - > statusCallbacks; + private final List statusCallbacks; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("intelligenceConfigurationIds") @@ -1806,6 +1931,11 @@ public static class CreateConfigurationRequest { @Getter private final Boolean memoryExtractionEnabled; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationsV1Bridge") + @Getter + private final CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge; + private CreateConfigurationRequest(Builder builder) { this.displayName = builder.displayName; this.description = builder.description; @@ -1816,6 +1946,7 @@ private CreateConfigurationRequest(Builder builder) { this.intelligenceConfigurationIds = builder.intelligenceConfigurationIds; this.memoryExtractionEnabled = builder.memoryExtractionEnabled; + this.conversationsV1Bridge = builder.conversationsV1Bridge; } public static Builder builder( @@ -1842,6 +1973,7 @@ public static CreateConfigurationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1864,9 +1996,7 @@ public static class Builder { > channelSettings; @JsonProperty("statusCallbacks") - private List< - CreateConfigurationRequestStatusCallbacks - > statusCallbacks; + private List statusCallbacks; @JsonProperty("intelligenceConfigurationIds") private List intelligenceConfigurationIds; @@ -1874,6 +2004,9 @@ public static class Builder { @JsonProperty("memoryExtractionEnabled") private Boolean memoryExtractionEnabled; + @JsonProperty("conversationsV1Bridge") + private CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge; + @JsonCreator public Builder( @JsonProperty("displayName") final String displayName, @@ -1929,6 +2062,15 @@ public Builder memoryExtractionEnabled( return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationsV1Bridge") + public Builder conversationsV1Bridge( + CreateConfigurationRequestConversationsV1Bridge conversationsV1Bridge + ) { + this.conversationsV1Bridge = conversationsV1Bridge; + return this; + } + public CreateConfigurationRequest build() { return new CreateConfigurationRequest(this); } @@ -1962,6 +2104,10 @@ public boolean equals(final Object o) { Objects.equals( memoryExtractionEnabled, other.memoryExtractionEnabled + ) && + Objects.equals( + conversationsV1Bridge, + other.conversationsV1Bridge ) ); } @@ -1976,7 +2122,8 @@ public int hashCode() { channelSettings, statusCallbacks, intelligenceConfigurationIds, - memoryExtractionEnabled + memoryExtractionEnabled, + conversationsV1Bridge ); } } @@ -1984,6 +2131,7 @@ public int hashCode() { @JsonDeserialize( builder = ConversationsV2ConversationsV1Bridge.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2ConversationsV1Bridge { @@ -2011,6 +2159,7 @@ public static ConversationsV2ConversationsV1Bridge fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2039,7 +2188,7 @@ public boolean equals(final Object o) { ConversationsV2ConversationsV1Bridge other = (ConversationsV2ConversationsV1Bridge) o; - return (Objects.equals(serviceId, other.serviceId)); + return Objects.equals(serviceId, other.serviceId); } @Override @@ -2051,6 +2200,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConfigurationRequestChannelSettingsValueStatusTimeouts.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequestChannelSettingsValueStatusTimeouts { @@ -2086,6 +2236,7 @@ public static CreateConfigurationRequestChannelSettingsValueStatusTimeouts fromJ ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2143,6 +2294,7 @@ public int hashCode() { @JsonDeserialize( builder = UpdateConfigurationRequestChannelSettingsValueStatusTimeouts.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequestChannelSettingsValueStatusTimeouts { @@ -2178,6 +2330,7 @@ public static UpdateConfigurationRequestChannelSettingsValueStatusTimeouts fromJ ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2235,6 +2388,7 @@ public int hashCode() { @JsonDeserialize( builder = ListConfiguration200ResponseConfigurations.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConfiguration200ResponseConfigurations { @@ -2257,7 +2411,7 @@ public static class ListConfiguration200ResponseConfigurations { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("conversationGroupingType") @Getter - private final Configuration.ConversationGroupingType conversationGroupingType; + private final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("memoryStoreId") @@ -2332,7 +2486,7 @@ public static Builder builder( final String id, final String displayName, final String description, - final Configuration.ConversationGroupingType conversationGroupingType, + final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType, final String memoryStoreId ) { return new Builder( @@ -2354,6 +2508,7 @@ public static ListConfiguration200ResponseConfigurations fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2367,7 +2522,7 @@ public static class Builder { private String description; @JsonProperty("conversationGroupingType") - private Configuration.ConversationGroupingType conversationGroupingType; + private Configuration.ConversationsV2ConversationGroupingType conversationGroupingType; @JsonProperty("memoryStoreId") private String memoryStoreId; @@ -2411,7 +2566,7 @@ public Builder( @JsonProperty("description") final String description, @JsonProperty( "conversationGroupingType" - ) final Configuration.ConversationGroupingType conversationGroupingType, + ) final Configuration.ConversationsV2ConversationGroupingType conversationGroupingType, @JsonProperty("memoryStoreId") final String memoryStoreId ) { this.id = id; @@ -2565,6 +2720,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConfigurationRequestStatusCallbacks.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequestStatusCallbacks { @@ -2598,6 +2754,7 @@ public static CreateConfigurationRequestStatusCallbacks fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2651,6 +2808,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConfigurationRequestChannelSettingsValueCaptureRules.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequestChannelSettingsValueCaptureRules { @@ -2692,6 +2850,7 @@ public static CreateConfigurationRequestChannelSettingsValueCaptureRules fromJso ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationCreator.java b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationCreator.java index caad9dd888..fc2a1bcce1 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationCreator.java @@ -32,7 +32,8 @@ import java.io.InputStream; public class ConfigurationCreator - extends Creator { + extends Creator +{ private String idempotencyKey; private Configuration.CreateConfigurationRequest createConfigurationRequest; @@ -98,9 +99,9 @@ public Configuration.CreateConfigurationResponse create( } @Override - public TwilioResponse< - Configuration.CreateConfigurationResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.CreateConfigurationResponse content = Configuration.CreateConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationDeleter.java b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationDeleter.java index dcfdd760cf..783b65a415 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationDeleter.java @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -35,13 +34,14 @@ public class ConfigurationDeleter extends ResourceDeleter< Configuration, Configuration.DeleteConfigurationResponse - > { + > +{ - private String pathSid; + private String pathId; private String idempotencyKey; - public ConfigurationDeleter(final String pathSid) { - this.pathSid = pathSid; + public ConfigurationDeleter(final String pathId) { + this.pathId = pathId; } public ConfigurationDeleter setIdempotencyKey(final String idempotencyKey) { @@ -50,9 +50,9 @@ public ConfigurationDeleter setIdempotencyKey(final String idempotencyKey) { } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/ControlPlane/Configurations/{Sid}"; + String path = "/v2/ControlPlane/Configurations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -71,16 +71,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -108,9 +98,9 @@ public Configuration.DeleteConfigurationResponse delete( } @Override - public TwilioResponse< - Configuration.DeleteConfigurationResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.DeleteConfigurationResponse content = Configuration.DeleteConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationFetcher.java index b5d15ab4a3..980e235aef 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,18 +28,19 @@ import java.io.InputStream; public class ConfigurationFetcher - extends Fetcher { + extends Fetcher +{ - private String pathSid; + private String pathId; - public ConfigurationFetcher(final String pathSid) { - this.pathSid = pathSid; + public ConfigurationFetcher(final String pathId) { + this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/ControlPlane/Configurations/{Sid}"; + String path = "/v2/ControlPlane/Configurations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.GET, @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -93,9 +83,9 @@ public Configuration.FetchConfigurationResponse fetch( } @Override - public TwilioResponse< - Configuration.FetchConfigurationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.FetchConfigurationResponse content = Configuration.FetchConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationReader.java b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationReader.java index 7fa5eb6042..6c8166ae88 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationReader.java @@ -36,7 +36,8 @@ import java.io.InputStream; public class ConfigurationReader - extends Reader { + extends Reader +{ private Integer pageSize; private String pageToken; @@ -59,9 +60,9 @@ public ConfigurationReader setMemoryStoreId(final String memoryStoreId) { return this; } - public ResourceSetResponse< - Configuration.ListConfigurationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationUpdater.java b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationUpdater.java index a34801a1f2..bb2c50d93a 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConfigurationUpdater.java @@ -23,7 +23,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,14 +32,15 @@ import java.io.InputStream; public class ConfigurationUpdater - extends Updater { + extends Updater +{ - private String pathSid; + private String pathId; private String idempotencyKey; private Configuration.UpdateConfigurationRequest updateConfigurationRequest; - public ConfigurationUpdater(final String pathSid) { - this.pathSid = pathSid; + public ConfigurationUpdater(final String pathId) { + this.pathId = pathId; } public ConfigurationUpdater setUpdateConfigurationRequest( @@ -56,9 +56,9 @@ public ConfigurationUpdater setIdempotencyKey(final String idempotencyKey) { } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/ControlPlane/Configurations/{Sid}"; + String path = "/v2/ControlPlane/Configurations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.PUT, @@ -77,16 +77,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -114,9 +104,9 @@ public Configuration.UpdateConfigurationResponse update( } @Override - public TwilioResponse< - Configuration.UpdateConfigurationResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.UpdateConfigurationResponse content = Configuration.UpdateConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/Conversation.java b/src/main/java/com/twilio/rest/conversations/v2/Conversation.java index 3cf5f52d01..19d0fe5cfe 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Conversation.java @@ -74,7 +74,7 @@ public static class CreateConversationResponse extends Resource { private final List participants; @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @Getter private final ZonedDateTime updatedAt; @@ -89,10 +89,12 @@ private CreateConversationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("participants") final List< - ConversationsV2Participant - > participants, - @JsonProperty("status") final Conversation.Status status, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "status" + ) final Conversation.ConversationsV2ConversationStatus status, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -187,7 +189,7 @@ public static class UpdateConversationResponse extends Resource { private final List participants; @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @Getter private final ZonedDateTime updatedAt; @@ -202,10 +204,12 @@ private UpdateConversationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("participants") final List< - ConversationsV2Participant - > participants, - @JsonProperty("status") final Conversation.Status status, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "status" + ) final Conversation.ConversationsV2ConversationStatus status, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -357,7 +361,7 @@ public static class ListConversationResponse extends Resource { private final List participants; @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @Getter private final ZonedDateTime updatedAt; @@ -372,10 +376,12 @@ private ListConversationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("participants") final List< - ConversationsV2Participant - > participants, - @JsonProperty("status") final Conversation.Status status, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "status" + ) final Conversation.ConversationsV2ConversationStatus status, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -470,7 +476,7 @@ public static class PatchConversationResponse extends Resource { private final List participants; @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @Getter private final ZonedDateTime updatedAt; @@ -485,10 +491,12 @@ private PatchConversationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("participants") final List< - ConversationsV2Participant - > participants, - @JsonProperty("status") final Conversation.Status status, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "status" + ) final Conversation.ConversationsV2ConversationStatus status, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -583,7 +591,7 @@ public static class FetchConversationResponse extends Resource { private final List participants; @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @Getter private final ZonedDateTime updatedAt; @@ -598,10 +606,12 @@ private FetchConversationResponse( @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("participants") final List< - ConversationsV2Participant - > participants, - @JsonProperty("status") final Conversation.Status status, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "status" + ) final Conversation.ConversationsV2ConversationStatus status, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -675,24 +685,24 @@ public static ConversationCreator creator() { return new ConversationCreator(); } - public static ConversationDeleter deleter(final String pathSid) { - return new ConversationDeleter(pathSid); + public static ConversationDeleter deleter(final String pathId) { + return new ConversationDeleter(pathId); } - public static ConversationFetcher fetcher(final String pathSid) { - return new ConversationFetcher(pathSid); + public static ConversationFetcher fetcher(final String pathId) { + return new ConversationFetcher(pathId); } public static ConversationReader reader() { return new ConversationReader(); } - public static ConversationPatcher patcher(final String pathSid) { - return new ConversationPatcher(pathSid); + public static ConversationPatcher patcher(final String pathId) { + return new ConversationPatcher(pathId); } - public static ConversationUpdater updater(final String pathSid) { - return new ConversationUpdater(pathSid); + public static ConversationUpdater updater(final String pathId) { + return new ConversationUpdater(pathId); } public enum Status { @@ -720,7 +730,9 @@ public static Status forValue(final String value) { public enum Type { HUMAN_AGENT("HUMAN_AGENT"), CUSTOMER("CUSTOMER"), - AI_AGENT("AI_AGENT"); + AI_AGENT("AI_AGENT"), + AGENT("AGENT"), + UNKNOWN("UNKNOWN"); private final String value; @@ -739,16 +751,41 @@ public static Type forValue(final String value) { } } - public enum ConversationGroupingType { - GROUP_BY_PROFILE("GROUP_BY_PROFILE"), - GROUP_BY_PARTICIPANT_ADDRESSES("GROUP_BY_PARTICIPANT_ADDRESSES"), - GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE( - "GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE" - ); + public enum ConversationsV2Channel { + VOICE("VOICE"), + SMS("SMS"), + RCS("RCS"), + WHATSAPP("WHATSAPP"), + CHAT("CHAT"); + + private final String value; + + private ConversationsV2Channel(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2Channel forValue(final String value) { + return Promoter.enumFromString( + value, + ConversationsV2Channel.values() + ); + } + } + + public enum ConversationsV2ConversationStatus { + ACTIVE("ACTIVE"), + INACTIVE("INACTIVE"), + CLOSED("CLOSED"); private final String value; - private ConversationGroupingType(final String value) { + private ConversationsV2ConversationStatus(final String value) { this.value = value; } @@ -758,10 +795,41 @@ public String toString() { } @JsonCreator - public static ConversationGroupingType forValue(final String value) { + public static ConversationsV2ConversationStatus forValue( + final String value + ) { return Promoter.enumFromString( value, - ConversationGroupingType.values() + ConversationsV2ConversationStatus.values() + ); + } + } + + public enum ConversationsV2ParticipantType { + HUMAN_AGENT("HUMAN_AGENT"), + CUSTOMER("CUSTOMER"), + AI_AGENT("AI_AGENT"), + AGENT("AGENT"), + UNKNOWN("UNKNOWN"); + + private final String value; + + private ConversationsV2ParticipantType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2ParticipantType forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2ParticipantType.values() ); } } @@ -770,11 +838,8 @@ public enum Channel { VOICE("VOICE"), SMS("SMS"), RCS("RCS"), - EMAIL("EMAIL"), WHATSAPP("WHATSAPP"), - CHAT("CHAT"), - API("API"), - SYSTEM("SYSTEM"); + CHAT("CHAT"); private final String value; @@ -814,9 +879,39 @@ public static Method forValue(final String value) { } } + public enum ConversationsV2ConversationGroupingType { + GROUP_BY_PROFILE("GROUP_BY_PROFILE"), + GROUP_BY_PARTICIPANT_ADDRESSES("GROUP_BY_PARTICIPANT_ADDRESSES"), + GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE( + "GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE" + ); + + private final String value; + + private ConversationsV2ConversationGroupingType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2ConversationGroupingType forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2ConversationGroupingType.values() + ); + } + } + @JsonDeserialize( builder = ListConversationByAccount200ResponseConversationsConfiguration.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConversationByAccount200ResponseConversationsConfiguration { @@ -834,7 +929,7 @@ public static class ListConversationByAccount200ResponseConversationsConfigurati @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("conversationGroupingType") @Getter - private final Conversation.ConversationGroupingType conversationGroupingType; + private final Conversation.ConversationsV2ConversationGroupingType conversationGroupingType; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("memoryStoreId") @@ -895,6 +990,7 @@ public static ListConversationByAccount200ResponseConversationsConfiguration fro ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -905,7 +1001,7 @@ public static class Builder { private String description; @JsonProperty("conversationGroupingType") - private Conversation.ConversationGroupingType conversationGroupingType; + private Conversation.ConversationsV2ConversationGroupingType conversationGroupingType; @JsonProperty("memoryStoreId") private String memoryStoreId; @@ -942,7 +1038,7 @@ public Builder description(String description) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("conversationGroupingType") public Builder conversationGroupingType( - Conversation.ConversationGroupingType conversationGroupingType + Conversation.ConversationsV2ConversationGroupingType conversationGroupingType ) { this.conversationGroupingType = conversationGroupingType; return this; @@ -1064,6 +1160,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConversationWithConfigRequestParticipants.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConversationWithConfigRequestParticipants { @@ -1086,9 +1183,7 @@ public static class CreateConversationWithConfigRequestParticipants { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("addresses") @Getter - private final List< - CreateConversationWithConfigRequestParticipantsAddresses - > addresses; + private final List addresses; private CreateConversationWithConfigRequestParticipants( Builder builder @@ -1113,6 +1208,7 @@ public static CreateConversationWithConfigRequestParticipants fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1126,9 +1222,7 @@ public static class Builder { private String profileId; @JsonProperty("addresses") - private List< - CreateConversationWithConfigRequestParticipantsAddresses - > addresses; + private List addresses; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @@ -1154,9 +1248,7 @@ public Builder profileId(String profileId) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("addresses") public Builder addresses( - List< - CreateConversationWithConfigRequestParticipantsAddresses - > addresses + List addresses ) { this.addresses = addresses; return this; @@ -1196,6 +1288,7 @@ public int hashCode() { } @JsonDeserialize(builder = PatchConversationByIdRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PatchConversationByIdRequest { @@ -1235,6 +1328,7 @@ public static PatchConversationByIdRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1303,6 +1397,7 @@ public int hashCode() { @JsonDeserialize( builder = ListConversationByAccount200ResponseMeta.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConversationByAccount200ResponseMeta { @@ -1351,6 +1446,7 @@ public static ListConversationByAccount200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1423,6 +1519,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConversationWithConfigRequestConfiguration.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConversationWithConfigRequestConfiguration { @@ -1453,6 +1550,7 @@ public static CreateConversationWithConfigRequestConfiguration fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1488,11 +1586,9 @@ public boolean equals(final Object o) { CreateConversationWithConfigRequestConfiguration other = (CreateConversationWithConfigRequestConfiguration) o; - return ( - Objects.equals( - intelligenceConfigurationIds, - other.intelligenceConfigurationIds - ) + return Objects.equals( + intelligenceConfigurationIds, + other.intelligenceConfigurationIds ); } @@ -1503,6 +1599,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2Participant.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2Participant { @@ -1530,7 +1627,7 @@ public static class ConversationsV2Participant { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") @Getter - private final Conversation.Type type; + private final Conversation.ConversationsV2ParticipantType type; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("profileId") @@ -1587,6 +1684,7 @@ public static ConversationsV2Participant fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1603,7 +1701,7 @@ public static class Builder { private String name; @JsonProperty("type") - private Conversation.Type type; + private Conversation.ConversationsV2ParticipantType type; @JsonProperty("profileId") private String profileId; @@ -1640,7 +1738,9 @@ public Builder( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") - public Builder type(Conversation.Type type) { + public Builder type( + Conversation.ConversationsV2ParticipantType type + ) { this.type = type; return this; } @@ -1727,6 +1827,7 @@ public int hashCode() { } @JsonDeserialize(builder = UpdateConversationByIdRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConversationByIdRequest { @@ -1760,6 +1861,7 @@ public static UpdateConversationByIdRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1815,6 +1917,7 @@ public int hashCode() { @JsonDeserialize( builder = ConversationsV2StatusCallbackConfig.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2StatusCallbackConfig { @@ -1848,6 +1951,7 @@ public static ConversationsV2StatusCallbackConfig fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1901,6 +2005,7 @@ public int hashCode() { @JsonDeserialize( builder = PatchConversationByIdRequestConfiguration.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PatchConversationByIdRequestConfiguration { @@ -1928,6 +2033,7 @@ public static PatchConversationByIdRequestConfiguration fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1960,7 +2066,7 @@ public boolean equals(final Object o) { PatchConversationByIdRequestConfiguration other = (PatchConversationByIdRequestConfiguration) o; - return (Objects.equals(statusCallbacks, other.statusCallbacks)); + return Objects.equals(statusCallbacks, other.statusCallbacks); } @Override @@ -1972,6 +2078,7 @@ public int hashCode() { @JsonDeserialize( builder = ListConversationByAccount200ResponseConversations.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConversationByAccount200ResponseConversations { @@ -1994,7 +2101,7 @@ public static class ListConversationByAccount200ResponseConversations { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") @Getter - private final Conversation.Status status; + private final Conversation.ConversationsV2ConversationStatus status; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @@ -2057,6 +2164,7 @@ public static ListConversationByAccount200ResponseConversations fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2070,7 +2178,7 @@ public static class Builder { private String configurationId; @JsonProperty("status") - private Conversation.Status status; + private Conversation.ConversationsV2ConversationStatus status; @JsonProperty("name") private String name; @@ -2108,7 +2216,9 @@ public Builder( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") - public Builder status(Conversation.Status status) { + public Builder status( + Conversation.ConversationsV2ConversationStatus status + ) { this.status = status; return this; } @@ -2211,6 +2321,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConversationWithConfigRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConversationWithConfigRequest { @@ -2233,9 +2344,7 @@ public static class CreateConversationWithConfigRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participants") @Getter - private final List< - CreateConversationWithConfigRequestParticipants - > participants; + private final List participants; private CreateConversationWithConfigRequest(Builder builder) { this.configurationId = builder.configurationId; @@ -2258,6 +2367,7 @@ public static CreateConversationWithConfigRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2271,9 +2381,7 @@ public static class Builder { private CreateConversationWithConfigRequestConfiguration configuration; @JsonProperty("participants") - private List< - CreateConversationWithConfigRequestParticipants - > participants; + private List participants; @JsonCreator public Builder( @@ -2301,9 +2409,7 @@ public Builder configuration( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participants") public Builder participants( - List< - CreateConversationWithConfigRequestParticipants - > participants + List participants ) { this.participants = participants; return this; @@ -2348,6 +2454,7 @@ public int hashCode() { @JsonDeserialize( builder = ConversationsV2ConversationsV1Bridge.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2ConversationsV1Bridge { @@ -2375,6 +2482,7 @@ public static ConversationsV2ConversationsV1Bridge fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2403,7 +2511,7 @@ public boolean equals(final Object o) { ConversationsV2ConversationsV1Bridge other = (ConversationsV2ConversationsV1Bridge) o; - return (Objects.equals(serviceId, other.serviceId)); + return Objects.equals(serviceId, other.serviceId); } @Override @@ -2413,6 +2521,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2Address.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2Address { @@ -2420,7 +2529,7 @@ public static class ConversationsV2Address { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") @Getter - private final Conversation.Channel channel; + private final Conversation.ConversationsV2Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("address") @@ -2439,7 +2548,7 @@ private ConversationsV2Address(Builder builder) { } public static Builder builder( - final Conversation.Channel channel, + final Conversation.ConversationsV2Channel channel, final String address ) { return new Builder(channel, address); @@ -2452,11 +2561,12 @@ public static ConversationsV2Address fromJson( return mapper.readValue(jsonString, ConversationsV2Address.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("channel") - private Conversation.Channel channel; + private Conversation.ConversationsV2Channel channel; @JsonProperty("address") private String address; @@ -2466,7 +2576,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("channel") final Conversation.Channel channel, + @JsonProperty( + "channel" + ) final Conversation.ConversationsV2Channel channel, @JsonProperty("address") final String address ) { this.channel = channel; @@ -2512,6 +2624,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateConversationWithConfigRequestParticipantsAddresses.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConversationWithConfigRequestParticipantsAddresses { @@ -2556,6 +2669,7 @@ public static CreateConversationWithConfigRequestParticipantsAddresses fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationCreator.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationCreator.java index ec802a98c1..df7bd351fe 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class ConversationCreator - extends Creator { + extends Creator +{ private Conversation.CreateConversationWithConfigRequest createConversationWithConfigRequest; @@ -90,9 +91,9 @@ public Conversation.CreateConversationResponse create( } @Override - public TwilioResponse< - Conversation.CreateConversationResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Conversation.CreateConversationResponse content = Conversation.CreateConversationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationDeleter.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationDeleter.java index 2d7d98f260..8c9a2f8664 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationDeleter.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationDeleter.java @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -35,13 +34,14 @@ public class ConversationDeleter extends ResourceDeleter< Conversation, Conversation.DeleteConversationResponse - > { + > +{ - private String pathSid; + private String pathId; private String idempotencyKey; - public ConversationDeleter(final String pathSid) { - this.pathSid = pathSid; + public ConversationDeleter(final String pathId) { + this.pathId = pathId; } public ConversationDeleter setIdempotencyKey(final String idempotencyKey) { @@ -50,9 +50,9 @@ public ConversationDeleter setIdempotencyKey(final String idempotencyKey) { } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{Sid}"; + String path = "/v2/Conversations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -71,16 +71,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -108,9 +98,9 @@ public Conversation.DeleteConversationResponse delete( } @Override - public TwilioResponse< - Conversation.DeleteConversationResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Conversation.DeleteConversationResponse content = Conversation.DeleteConversationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationFetcher.java index 61af416603..b56798d995 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,18 +28,19 @@ import java.io.InputStream; public class ConversationFetcher - extends Fetcher { + extends Fetcher +{ - private String pathSid; + private String pathId; - public ConversationFetcher(final String pathSid) { - this.pathSid = pathSid; + public ConversationFetcher(final String pathId) { + this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{Sid}"; + String path = "/v2/Conversations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.GET, @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -93,9 +83,9 @@ public Conversation.FetchConversationResponse fetch( } @Override - public TwilioResponse< - Conversation.FetchConversationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Conversation.FetchConversationResponse content = Conversation.FetchConversationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationPatcher.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationPatcher.java index befcb1c109..a0281b8eba 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationPatcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationPatcher.java @@ -20,7 +20,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,13 +29,14 @@ import java.io.InputStream; public class ConversationPatcher - extends Patcher { + extends Patcher +{ - private String pathSid; + private String pathId; private Conversation.PatchConversationByIdRequest patchConversationByIdRequest; - public ConversationPatcher(final String pathSid) { - this.pathSid = pathSid; + public ConversationPatcher(final String pathId) { + this.pathId = pathId; } public ConversationPatcher setPatchConversationByIdRequest( @@ -50,9 +50,9 @@ public ConversationPatcher setPatchConversationByIdRequest( public Conversation.PatchConversationResponse patch( final TwilioRestClient client ) { - String path = "/v2/Conversations/{Sid}"; + String path = "/v2/Conversations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.PATCH, @@ -70,16 +70,6 @@ public Conversation.PatchConversationResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationReader.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationReader.java index 5013c12e15..58c2451450 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationReader.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationReader.java @@ -38,7 +38,8 @@ import java.util.List; public class ConversationReader - extends Reader { + extends Reader +{ private List status; private String channelId; @@ -73,9 +74,9 @@ public ConversationReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - Conversation.ListConversationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ConversationUpdater.java b/src/main/java/com/twilio/rest/conversations/v2/ConversationUpdater.java index ec6a06ee85..01961c7de7 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ConversationUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ConversationUpdater.java @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -31,13 +30,14 @@ import java.io.InputStream; public class ConversationUpdater - extends Updater { + extends Updater +{ - private String pathSid; + private String pathId; private Conversation.UpdateConversationByIdRequest updateConversationByIdRequest; - public ConversationUpdater(final String pathSid) { - this.pathSid = pathSid; + public ConversationUpdater(final String pathId) { + this.pathId = pathId; } public ConversationUpdater setUpdateConversationByIdRequest( @@ -48,9 +48,9 @@ public ConversationUpdater setUpdateConversationByIdRequest( } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{Sid}"; + String path = "/v2/Conversations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.PUT, @@ -68,16 +68,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -105,9 +95,9 @@ public Conversation.UpdateConversationResponse update( } @Override - public TwilioResponse< - Conversation.UpdateConversationResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Conversation.UpdateConversationResponse content = Conversation.UpdateConversationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/Operation.java b/src/main/java/com/twilio/rest/conversations/v2/Operation.java index 2af376e285..883d69bfbd 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Operation.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Operation.java @@ -122,7 +122,7 @@ public boolean equals(final Object o) { return false; } UpdateOperationResponse other = (UpdateOperationResponse) o; - return (true); + return true; } @Override @@ -206,7 +206,7 @@ public boolean equals(final Object o) { return false; } ListOperationResponse other = (ListOperationResponse) o; - return (true); + return true; } @Override @@ -276,7 +276,7 @@ public static class FetchOperationResponse extends Resource { private final Map related; @Getter - private final Operation.Status status; + private final Operation.ConversationsV2OperationStatusValue status; @Getter private final URI statusUrl; @@ -290,7 +290,9 @@ private FetchOperationResponse( ) final FetchOperationStatus200ResponseError error, @JsonProperty("operationId") final String operationId, @JsonProperty("related") final Map related, - @JsonProperty("status") final Operation.Status status, + @JsonProperty( + "status" + ) final Operation.ConversationsV2OperationStatusValue status, @JsonProperty("statusUrl") final URI statusUrl ) { this.completedAt = completedAt; @@ -354,20 +356,18 @@ public int hashCode() { } } - public static OperationFetcher fetcher(final String pathSid) { - return new OperationFetcher(pathSid); + public static OperationFetcher fetcher(final String pathId) { + return new OperationFetcher(pathId); } - public enum Status { + public enum ConversationsV2OperationStatusValue { PENDING("PENDING"), - RUNNING("RUNNING"), - CANCELLED("CANCELLED"), COMPLETED("COMPLETED"), FAILED("FAILED"); private final String value; - private Status(final String value) { + private ConversationsV2OperationStatusValue(final String value) { this.value = value; } @@ -377,14 +377,20 @@ public String toString() { } @JsonCreator - public static Status forValue(final String value) { - return Promoter.enumFromString(value, Status.values()); + public static ConversationsV2OperationStatusValue forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2OperationStatusValue.values() + ); } } @JsonDeserialize( builder = FetchOperationStatus200ResponseError.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class FetchOperationStatus200ResponseError { @@ -436,6 +442,7 @@ public static FetchOperationStatus200ResponseError fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/conversations/v2/OperationFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/OperationFetcher.java index 0e18a4aed7..1a10910089 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/OperationFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/OperationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,18 +28,19 @@ import java.io.InputStream; public class OperationFetcher - extends Fetcher { + extends Fetcher +{ - private String pathSid; + private String pathId; - public OperationFetcher(final String pathSid) { - this.pathSid = pathSid; + public OperationFetcher(final String pathId) { + this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/ControlPlane/Operations/{Sid}"; + String path = "/v2/ControlPlane/Operations/{id}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.GET, @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/conversations/v2/Participant.java b/src/main/java/com/twilio/rest/conversations/v2/Participant.java index b1b07db817..e52a15d667 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/Participant.java +++ b/src/main/java/com/twilio/rest/conversations/v2/Participant.java @@ -72,7 +72,7 @@ public static class CreateParticipantResponse extends Resource { private final String profileId; @Getter - private final Participant.Type type; + private final Participant.ConversationsV2ParticipantType type; @Getter private final ZonedDateTime updatedAt; @@ -80,15 +80,17 @@ public static class CreateParticipantResponse extends Resource { @JsonCreator private CreateParticipantResponse( @JsonProperty("accountId") final String accountId, - @JsonProperty("addresses") final List< - ConversationsV2Address - > addresses, + @JsonProperty( + "addresses" + ) final List addresses, @JsonProperty("conversationId") final String conversationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, @JsonProperty("profileId") final String profileId, - @JsonProperty("type") final Participant.Type type, + @JsonProperty( + "type" + ) final Participant.ConversationsV2ParticipantType type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -183,7 +185,7 @@ public static class UpdateParticipantResponse extends Resource { private final String profileId; @Getter - private final Participant.Type type; + private final Participant.ConversationsV2ParticipantType type; @Getter private final ZonedDateTime updatedAt; @@ -191,15 +193,17 @@ public static class UpdateParticipantResponse extends Resource { @JsonCreator private UpdateParticipantResponse( @JsonProperty("accountId") final String accountId, - @JsonProperty("addresses") final List< - ConversationsV2Address - > addresses, + @JsonProperty( + "addresses" + ) final List addresses, @JsonProperty("conversationId") final String conversationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, @JsonProperty("profileId") final String profileId, - @JsonProperty("type") final Participant.Type type, + @JsonProperty( + "type" + ) final Participant.ConversationsV2ParticipantType type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -336,7 +340,7 @@ public static class ListParticipantResponse extends Resource { private final String profileId; @Getter - private final Participant.Type type; + private final Participant.ConversationsV2ParticipantType type; @Getter private final ZonedDateTime updatedAt; @@ -344,15 +348,17 @@ public static class ListParticipantResponse extends Resource { @JsonCreator private ListParticipantResponse( @JsonProperty("accountId") final String accountId, - @JsonProperty("addresses") final List< - ConversationsV2Address - > addresses, + @JsonProperty( + "addresses" + ) final List addresses, @JsonProperty("conversationId") final String conversationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, @JsonProperty("profileId") final String profileId, - @JsonProperty("type") final Participant.Type type, + @JsonProperty( + "type" + ) final Participant.ConversationsV2ParticipantType type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -489,7 +495,7 @@ public static class FetchParticipantResponse extends Resource { private final String profileId; @Getter - private final Participant.Type type; + private final Participant.ConversationsV2ParticipantType type; @Getter private final ZonedDateTime updatedAt; @@ -497,15 +503,17 @@ public static class FetchParticipantResponse extends Resource { @JsonCreator private FetchParticipantResponse( @JsonProperty("accountId") final String accountId, - @JsonProperty("addresses") final List< - ConversationsV2Address - > addresses, + @JsonProperty( + "addresses" + ) final List addresses, @JsonProperty("conversationId") final String conversationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, @JsonProperty("name") final String name, @JsonProperty("profileId") final String profileId, - @JsonProperty("type") final Participant.Type type, + @JsonProperty( + "type" + ) final Participant.ConversationsV2ParticipantType type, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { this.accountId = accountId; @@ -575,26 +583,26 @@ public int hashCode() { } } - public static ParticipantCreator creator(final String pathConversationSid) { - return new ParticipantCreator(pathConversationSid); + public static ParticipantCreator creator(final String pathConversationId) { + return new ParticipantCreator(pathConversationId); } public static ParticipantFetcher fetcher( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - return new ParticipantFetcher(pathConversationSid, pathSid); + return new ParticipantFetcher(pathConversationId, pathId); } - public static ParticipantReader reader(final String pathConversationSid) { - return new ParticipantReader(pathConversationSid); + public static ParticipantReader reader(final String pathConversationId) { + return new ParticipantReader(pathConversationId); } public static ParticipantUpdater updater( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - return new ParticipantUpdater(pathConversationSid, pathSid); + return new ParticipantUpdater(pathConversationId, pathId); } public enum Type { @@ -621,6 +629,62 @@ public static Type forValue(final String value) { } } + public enum ConversationsV2Channel { + VOICE("VOICE"), + SMS("SMS"), + RCS("RCS"), + WHATSAPP("WHATSAPP"), + CHAT("CHAT"); + + private final String value; + + private ConversationsV2Channel(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2Channel forValue(final String value) { + return Promoter.enumFromString( + value, + ConversationsV2Channel.values() + ); + } + } + + public enum ConversationsV2ParticipantType { + HUMAN_AGENT("HUMAN_AGENT"), + CUSTOMER("CUSTOMER"), + AI_AGENT("AI_AGENT"), + AGENT("AGENT"), + UNKNOWN("UNKNOWN"); + + private final String value; + + private ConversationsV2ParticipantType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConversationsV2ParticipantType forValue( + final String value + ) { + return Promoter.enumFromString( + value, + ConversationsV2ParticipantType.values() + ); + } + } + public enum Channel { VOICE("VOICE"), SMS("SMS"), @@ -648,6 +712,7 @@ public static Channel forValue(final String value) { @JsonDeserialize( builder = ListParticipantByConversation200ResponseMeta.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListParticipantByConversation200ResponseMeta { @@ -693,6 +758,7 @@ public static ListParticipantByConversation200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -767,116 +833,10 @@ public int hashCode() { } } - @JsonDeserialize( - builder = CreateParticipantInConversationRequestAddresses.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class CreateParticipantInConversationRequestAddresses { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channel") - @Getter - private final Participant.Channel channel; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("address") - @Getter - private final String address; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") - @Getter - private final String channelId; - - private CreateParticipantInConversationRequestAddresses( - Builder builder - ) { - this.channel = builder.channel; - this.address = builder.address; - this.channelId = builder.channelId; - } - - public static Builder builder( - final Participant.Channel channel, - final String address - ) { - return new Builder(channel, address); - } - - public static CreateParticipantInConversationRequestAddresses fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - CreateParticipantInConversationRequestAddresses.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("channel") - private Participant.Channel channel; - - @JsonProperty("address") - private String address; - - @JsonProperty("channelId") - private String channelId; - - @JsonCreator - public Builder( - @JsonProperty("channel") final Participant.Channel channel, - @JsonProperty("address") final String address - ) { - this.channel = channel; - this.address = address; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("channelId") - public Builder channelId(String channelId) { - this.channelId = channelId; - return this; - } - - public CreateParticipantInConversationRequestAddresses build() { - return new CreateParticipantInConversationRequestAddresses( - this - ); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - CreateParticipantInConversationRequestAddresses other = - (CreateParticipantInConversationRequestAddresses) o; - return ( - Objects.equals(channel, other.channel) && - Objects.equals(address, other.address) && - Objects.equals(channelId, other.channelId) - ); - } - - @Override - public int hashCode() { - return Objects.hash(channel, address, channelId); - } - } - @JsonDeserialize( builder = UpdateParticipantInConversationRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateParticipantInConversationRequest { @@ -899,9 +859,7 @@ public static class UpdateParticipantInConversationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("addresses") @Getter - private final List< - CreateParticipantInConversationRequestAddresses - > addresses; + private final List addresses; private UpdateParticipantInConversationRequest(Builder builder) { this.name = builder.name; @@ -924,6 +882,7 @@ public static UpdateParticipantInConversationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -937,9 +896,7 @@ public static class Builder { private String profileId; @JsonProperty("addresses") - private List< - CreateParticipantInConversationRequestAddresses - > addresses; + private List addresses; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @@ -965,7 +922,7 @@ public Builder profileId(String profileId) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("addresses") public Builder addresses( - List addresses + List addresses ) { this.addresses = addresses; return this; @@ -1005,6 +962,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateParticipantInConversationRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateParticipantInConversationRequest { @@ -1027,9 +985,7 @@ public static class CreateParticipantInConversationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("addresses") @Getter - private final List< - CreateParticipantInConversationRequestAddresses - > addresses; + private final List addresses; private CreateParticipantInConversationRequest(Builder builder) { this.name = builder.name; @@ -1039,9 +995,7 @@ private CreateParticipantInConversationRequest(Builder builder) { } public static Builder builder( - final List< - CreateParticipantInConversationRequestAddresses - > addresses + final List addresses ) { return new Builder(addresses); } @@ -1056,6 +1010,7 @@ public static CreateParticipantInConversationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1069,15 +1024,13 @@ public static class Builder { private String profileId; @JsonProperty("addresses") - private List< - CreateParticipantInConversationRequestAddresses - > addresses; + private List addresses; @JsonCreator public Builder( - @JsonProperty("addresses") final List< - CreateParticipantInConversationRequestAddresses - > addresses + @JsonProperty( + "addresses" + ) final List addresses ) { this.addresses = addresses; } @@ -1137,6 +1090,7 @@ public int hashCode() { @JsonDeserialize( builder = ListParticipantByConversation200ResponseParticipants.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListParticipantByConversation200ResponseParticipants { @@ -1164,7 +1118,7 @@ public static class ListParticipantByConversation200ResponseParticipants { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") @Getter - private final Participant.Type type; + private final Participant.ConversationsV2ParticipantType type; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("profileId") @@ -1223,6 +1177,7 @@ public static ListParticipantByConversation200ResponseParticipants fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1239,7 +1194,7 @@ public static class Builder { private String name; @JsonProperty("type") - private Participant.Type type; + private Participant.ConversationsV2ParticipantType type; @JsonProperty("profileId") private String profileId; @@ -1276,7 +1231,9 @@ public Builder( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") - public Builder type(Participant.Type type) { + public Builder type( + Participant.ConversationsV2ParticipantType type + ) { this.type = type; return this; } @@ -1366,6 +1323,7 @@ public int hashCode() { } @JsonDeserialize(builder = ConversationsV2Address.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationsV2Address { @@ -1373,7 +1331,7 @@ public static class ConversationsV2Address { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") @Getter - private final Participant.Channel channel; + private final Participant.ConversationsV2Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("address") @@ -1392,7 +1350,7 @@ private ConversationsV2Address(Builder builder) { } public static Builder builder( - final Participant.Channel channel, + final Participant.ConversationsV2Channel channel, final String address ) { return new Builder(channel, address); @@ -1405,11 +1363,12 @@ public static ConversationsV2Address fromJson( return mapper.readValue(jsonString, ConversationsV2Address.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("channel") - private Participant.Channel channel; + private Participant.ConversationsV2Channel channel; @JsonProperty("address") private String address; @@ -1419,7 +1378,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("channel") final Participant.Channel channel, + @JsonProperty( + "channel" + ) final Participant.ConversationsV2Channel channel, @JsonProperty("address") final String address ) { this.channel = channel; @@ -1462,6 +1423,115 @@ public int hashCode() { } } + @JsonDeserialize( + builder = CreateConversationWithConfigRequestParticipantsAddresses.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CreateConversationWithConfigRequestParticipantsAddresses { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channel") + @Getter + private final Participant.Channel channel; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address") + @Getter + private final String address; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channelId") + @Getter + private final String channelId; + + private CreateConversationWithConfigRequestParticipantsAddresses( + Builder builder + ) { + this.channel = builder.channel; + this.address = builder.address; + this.channelId = builder.channelId; + } + + public static Builder builder( + final Participant.Channel channel, + final String address + ) { + return new Builder(channel, address); + } + + public static CreateConversationWithConfigRequestParticipantsAddresses fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CreateConversationWithConfigRequestParticipantsAddresses.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("channel") + private Participant.Channel channel; + + @JsonProperty("address") + private String address; + + @JsonProperty("channelId") + private String channelId; + + @JsonCreator + public Builder( + @JsonProperty("channel") final Participant.Channel channel, + @JsonProperty("address") final String address + ) { + this.channel = channel; + this.address = address; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channelId") + public Builder channelId(String channelId) { + this.channelId = channelId; + return this; + } + + public CreateConversationWithConfigRequestParticipantsAddresses build() { + return new CreateConversationWithConfigRequestParticipantsAddresses( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CreateConversationWithConfigRequestParticipantsAddresses other = + (CreateConversationWithConfigRequestParticipantsAddresses) o; + return ( + Objects.equals(channel, other.channel) && + Objects.equals(address, other.address) && + Objects.equals(channelId, other.channelId) + ); + } + + @Override + public int hashCode() { + return Objects.hash(channel, address, channelId); + } + } + /** * Converts a JSON String into a Participant object using the provided ObjectMapper. * diff --git a/src/main/java/com/twilio/rest/conversations/v2/ParticipantCreator.java b/src/main/java/com/twilio/rest/conversations/v2/ParticipantCreator.java index 896defb450..0129092d5b 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ParticipantCreator.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ParticipantCreator.java @@ -30,13 +30,14 @@ import java.io.InputStream; public class ParticipantCreator - extends Creator { + extends Creator +{ - private String pathConversationSid; + private String pathConversationId; private Participant.CreateParticipantInConversationRequest createParticipantInConversationRequest; - public ParticipantCreator(final String pathConversationSid) { - this.pathConversationSid = pathConversationSid; + public ParticipantCreator(final String pathConversationId) { + this.pathConversationId = pathConversationId; } public ParticipantCreator setCreateParticipantInConversationRequest( @@ -48,13 +49,12 @@ public ParticipantCreator setCreateParticipantInConversationRequest( } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Participants"; + String path = "/v2/Conversations/{ConversationId}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); Request request = new Request( HttpMethod.POST, @@ -99,9 +99,9 @@ public Participant.CreateParticipantResponse create( } @Override - public TwilioResponse< - Participant.CreateParticipantResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Participant.CreateParticipantResponse content = Participant.CreateParticipantResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ParticipantFetcher.java b/src/main/java/com/twilio/rest/conversations/v2/ParticipantFetcher.java index c2f9c9a32b..978853c51c 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ParticipantFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,28 +28,28 @@ import java.io.InputStream; public class ParticipantFetcher - extends Fetcher { + extends Fetcher +{ - private String pathConversationSid; - private String pathSid; + private String pathConversationId; + private String pathId; public ParticipantFetcher( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - this.pathConversationSid = pathConversationSid; - this.pathSid = pathSid; + this.pathConversationId = pathConversationId; + this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Participants/{Sid}"; + String path = "/v2/Conversations/{ConversationId}/Participants/{id}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.GET, @@ -66,16 +65,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -103,9 +92,9 @@ public Participant.FetchParticipantResponse fetch( } @Override - public TwilioResponse< - Participant.FetchParticipantResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Participant.FetchParticipantResponse content = Participant.FetchParticipantResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ParticipantReader.java b/src/main/java/com/twilio/rest/conversations/v2/ParticipantReader.java index e8e86d23d5..661ba62e75 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ParticipantReader.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ParticipantReader.java @@ -36,14 +36,15 @@ import java.io.InputStream; public class ParticipantReader - extends Reader { + extends Reader +{ - private String pathConversationSid; + private String pathConversationId; private Integer pageSize; private String pageToken; - public ParticipantReader(final String pathConversationSid) { - this.pathConversationSid = pathConversationSid; + public ParticipantReader(final String pathConversationId) { + this.pathConversationId = pathConversationId; } public ParticipantReader setPageSize(final Integer pageSize) { @@ -56,9 +57,9 @@ public ParticipantReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - Participant.ListParticipantResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -77,13 +78,12 @@ > readWithResponse(final TwilioRestClient client) { } private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Participants"; + String path = "/v2/Conversations/{ConversationId}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -181,13 +181,12 @@ public Page previousPage( final Page page, final TwilioRestClient client ) { - String path = "/v2/Conversations/{ConversationSid}/Participants"; + String path = "/v2/Conversations/{ConversationId}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -204,13 +203,12 @@ public Page nextPage( final Page page, final TwilioRestClient client ) { - String path = "/v2/Conversations/{ConversationSid}/Participants"; + String path = "/v2/Conversations/{ConversationId}/Participants"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/conversations/v2/ParticipantUpdater.java b/src/main/java/com/twilio/rest/conversations/v2/ParticipantUpdater.java index 391da8929b..fc162d42b1 100644 --- a/src/main/java/com/twilio/rest/conversations/v2/ParticipantUpdater.java +++ b/src/main/java/com/twilio/rest/conversations/v2/ParticipantUpdater.java @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -31,18 +30,19 @@ import java.io.InputStream; public class ParticipantUpdater - extends Updater { + extends Updater +{ - private String pathConversationSid; - private String pathSid; + private String pathConversationId; + private String pathId; private Participant.UpdateParticipantInConversationRequest updateParticipantInConversationRequest; public ParticipantUpdater( - final String pathConversationSid, - final String pathSid + final String pathConversationId, + final String pathId ) { - this.pathConversationSid = pathConversationSid; - this.pathSid = pathSid; + this.pathConversationId = pathConversationId; + this.pathId = pathId; } public ParticipantUpdater setUpdateParticipantInConversationRequest( @@ -54,14 +54,13 @@ public ParticipantUpdater setUpdateParticipantInConversationRequest( } private Response makeRequest(final TwilioRestClient client) { - String path = "/v2/Conversations/{ConversationSid}/Participants/{Sid}"; + String path = "/v2/Conversations/{ConversationId}/Participants/{id}"; - path = - path.replace( - "{" + "ConversationSid" + "}", - this.pathConversationSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace( + "{" + "ConversationId" + "}", + this.pathConversationId.toString() + ); + path = path.replace("{" + "id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.PUT, @@ -79,16 +78,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -116,9 +105,9 @@ public Participant.UpdateParticipantResponse update( } @Override - public TwilioResponse< - Participant.UpdateParticipantResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Participant.UpdateParticipantResponse content = Participant.UpdateParticipantResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersionFetcher.java b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersionFetcher.java index 89ad41ce22..bc0b32b9bd 100644 --- a/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersionFetcher.java +++ b/src/main/java/com/twilio/rest/events/v1/schema/SchemaVersionFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Schemas/{Id}/Versions/{SchemaVersion}"; path = path.replace("{" + "Id" + "}", this.pathId.toString()); - path = - path.replace( - "{" + "SchemaVersion" + "}", - this.pathSchemaVersion.toString() - ); + path = path.replace( + "{" + "SchemaVersion" + "}", + this.pathSchemaVersion.toString() + ); Request request = new Request( HttpMethod.GET, 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..174322dc66 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 @@ -116,7 +116,7 @@ public boolean equals(final Object o) { } SinkTest other = (SinkTest) o; - return (Objects.equals(result, other.result)); + return Objects.equals(result, other.result); } @Override 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..1ef1b32132 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 @@ -119,7 +119,7 @@ public boolean equals(final Object o) { } SinkValidate other = (SinkValidate) o; - return (Objects.equals(result, other.result)); + return Objects.equals(result, other.result); } @Override diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventCreator.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventCreator.java index 9eb7a3abca..0ac58e41e6 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventCreator.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventCreator.java @@ -59,11 +59,10 @@ public SubscribedEventCreator setSchemaVersion( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents"; - path = - path.replace( - "{" + "SubscriptionSid" + "}", - this.pathSubscriptionSid.toString() - ); + path = path.replace( + "{" + "SubscriptionSid" + "}", + this.pathSubscriptionSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventDeleter.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventDeleter.java index e89cdffe0b..89b440e9e2 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventDeleter.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventDeleter.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}"; - path = - path.replace( - "{" + "SubscriptionSid" + "}", - this.pathSubscriptionSid.toString() - ); + path = path.replace( + "{" + "SubscriptionSid" + "}", + this.pathSubscriptionSid.toString() + ); path = path.replace("{" + "Type" + "}", this.pathType.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventFetcher.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventFetcher.java index 8241964ad7..7549318e43 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventFetcher.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}"; - path = - path.replace( - "{" + "SubscriptionSid" + "}", - this.pathSubscriptionSid.toString() - ); + path = path.replace( + "{" + "SubscriptionSid" + "}", + this.pathSubscriptionSid.toString() + ); path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventReader.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventReader.java index 5caacfbc45..91bf00a21a 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventReader.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents"; - path = - path.replace( - "{" + "SubscriptionSid" + "}", - this.pathSubscriptionSid.toString() - ); + path = path.replace( + "{" + "SubscriptionSid" + "}", + this.pathSubscriptionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventUpdater.java b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventUpdater.java index a06e8d3628..0c729bbe3a 100644 --- a/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventUpdater.java +++ b/src/main/java/com/twilio/rest/events/v1/subscription/SubscribedEventUpdater.java @@ -55,11 +55,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents/{Type}"; - path = - path.replace( - "{" + "SubscriptionSid" + "}", - this.pathSubscriptionSid.toString() - ); + path = path.replace( + "{" + "SubscriptionSid" + "}", + this.pathSubscriptionSid.toString() + ); path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/AssessmentsUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/AssessmentsUpdater.java index 906175555a..10bcfa78b5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/AssessmentsUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/AssessmentsUpdater.java @@ -75,11 +75,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Assessments/{AssessmentSid}"; - path = - path.replace( - "{" + "AssessmentSid" + "}", - this.pathAssessmentSid.toString() - ); + path = path.replace( + "{" + "AssessmentSid" + "}", + this.pathAssessmentSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 edb7dc91cb..37749cb0e4 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Configuration.java @@ -342,9 +342,9 @@ private Configuration( "queue_stats_configuration" ) final Object queueStatsConfiguration, @JsonProperty("runtime_domain") final String runtimeDomain, - @JsonProperty("serverless_service_sids") final List< - String - > serverlessServiceSids, + @JsonProperty( + "serverless_service_sids" + ) final List serverlessServiceSids, @JsonProperty("service_version") final String serviceVersion, @JsonProperty("status") final Configuration.Status status, @JsonProperty( @@ -357,9 +357,9 @@ private Configuration( @JsonProperty( "taskrouter_target_workflow_sid" ) final String taskrouterTargetWorkflowSid, - @JsonProperty("taskrouter_taskqueues") final List< - Object - > taskrouterTaskqueues, + @JsonProperty( + "taskrouter_taskqueues" + ) final List taskrouterTaskqueues, @JsonProperty( "taskrouter_worker_attributes" ) final Object taskrouterWorkerAttributes, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentCreator.java index 9b1f918d8e..41d7b66c11 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentCreator.java @@ -32,7 +32,8 @@ import java.math.BigDecimal; public class InsightsAssessmentsCommentCreator - extends Creator { + extends Creator +{ private String authorization; private String categoryId; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentReader.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentReader.java index 2d560b705c..5c56868bbe 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsCommentReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InsightsAssessmentsCommentReader - extends Reader { + extends Reader +{ private String segmentId; private String agentId; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryCreator.java index 295ed208d7..16f35bf4f0 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InsightsQuestionnairesCategoryCreator - extends Creator { + extends Creator +{ private String authorization; private String name; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryDeleter.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryDeleter.java index 96780b9c1f..62e14b98c8 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryDeleter.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryDeleter.java @@ -31,7 +31,8 @@ import java.util.function.Predicate; public class InsightsQuestionnairesCategoryDeleter - extends Deleter { + extends Deleter +{ private String pathCategorySid; private String authorization; @@ -50,11 +51,10 @@ public InsightsQuestionnairesCategoryDeleter setAuthorization( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Categories/{CategorySid}"; - path = - path.replace( - "{" + "CategorySid" + "}", - this.pathCategorySid.toString() - ); + path = path.replace( + "{" + "CategorySid" + "}", + this.pathCategorySid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryReader.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryReader.java index 08dd13f8c0..4d27f1c081 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InsightsQuestionnairesCategoryReader - extends Reader { + extends Reader +{ private Long pageSize; private String authorization; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryUpdater.java index d6453e9aea..4a850149de 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCategoryUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InsightsQuestionnairesCategoryUpdater - extends Updater { + extends Updater +{ private String pathCategorySid; private String authorization; @@ -60,11 +61,10 @@ public InsightsQuestionnairesCategoryUpdater setAuthorization( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Categories/{CategorySid}"; - path = - path.replace( - "{" + "CategorySid" + "}", - this.pathCategorySid.toString() - ); + path = path.replace( + "{" + "CategorySid" + "}", + this.pathCategorySid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCreator.java index 2dc14da917..17c5340957 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesCreator.java @@ -33,7 +33,8 @@ import java.util.List; public class InsightsQuestionnairesCreator - extends Creator { + extends Creator +{ private String authorization; private String name; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesDeleter.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesDeleter.java index 83811a0973..b22bbe1db9 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesDeleter.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesDeleter.java @@ -31,7 +31,8 @@ import java.util.function.Predicate; public class InsightsQuestionnairesDeleter - extends Deleter { + extends Deleter +{ private String pathQuestionnaireSid; private String authorization; @@ -51,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Questionnaires/{QuestionnaireSid}"; - path = - path.replace( - "{" + "QuestionnaireSid" + "}", - this.pathQuestionnaireSid.toString() - ); + path = path.replace( + "{" + "QuestionnaireSid" + "}", + this.pathQuestionnaireSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesFetcher.java index 2fd62094b1..5c330112d5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class InsightsQuestionnairesFetcher - extends Fetcher { + extends Fetcher +{ private String pathQuestionnaireSid; private String authorization; @@ -50,11 +51,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Questionnaires/{QuestionnaireSid}"; - path = - path.replace( - "{" + "QuestionnaireSid" + "}", - this.pathQuestionnaireSid.toString() - ); + path = path.replace( + "{" + "QuestionnaireSid" + "}", + this.pathQuestionnaireSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionCreator.java index 2cccd166a9..2e2a060915 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InsightsQuestionnairesQuestionCreator - extends Creator { + extends Creator +{ private String authorization; private String categorySid; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionDeleter.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionDeleter.java index 7bafe90f45..1ee4417c3c 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionDeleter.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionDeleter.java @@ -31,7 +31,8 @@ import java.util.function.Predicate; public class InsightsQuestionnairesQuestionDeleter - extends Deleter { + extends Deleter +{ private String pathQuestionSid; private String authorization; @@ -50,11 +51,10 @@ public InsightsQuestionnairesQuestionDeleter setAuthorization( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Questions/{QuestionSid}"; - path = - path.replace( - "{" + "QuestionSid" + "}", - this.pathQuestionSid.toString() - ); + path = path.replace( + "{" + "QuestionSid" + "}", + this.pathQuestionSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionReader.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionReader.java index 287e5977a6..296295dcc4 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionReader.java @@ -36,7 +36,8 @@ import java.util.List; public class InsightsQuestionnairesQuestionReader - extends Reader { + extends Reader +{ private List categorySid; private Long pageSize; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionUpdater.java index 0ae1289dc3..1cf413d658 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesQuestionUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InsightsQuestionnairesQuestionUpdater - extends Updater { + extends Updater +{ private String pathQuestionSid; private String authorization; @@ -94,11 +95,10 @@ public InsightsQuestionnairesQuestionUpdater setAuthorization( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Questions/{QuestionSid}"; - path = - path.replace( - "{" + "QuestionSid" + "}", - this.pathQuestionSid.toString() - ); + path = path.replace( + "{" + "QuestionSid" + "}", + this.pathQuestionSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesReader.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesReader.java index 599d4f35e9..231de1883f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InsightsQuestionnairesReader - extends Reader { + extends Reader +{ private Boolean includeInactive; private Long pageSize; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesUpdater.java index 1140691938..2df9053f1f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsQuestionnairesUpdater.java @@ -33,7 +33,8 @@ import java.util.List; public class InsightsQuestionnairesUpdater - extends Updater { + extends Updater +{ private String pathQuestionnaireSid; private String authorization; @@ -91,11 +92,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Insights/QualityManagement/Questionnaires/{QuestionnaireSid}"; - path = - path.replace( - "{" + "QuestionnaireSid" + "}", - this.pathQuestionnaireSid.toString() - ); + path = path.replace( + "{" + "QuestionnaireSid" + "}", + this.pathQuestionnaireSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSetsFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSetsFetcher.java index dff43cab34..d72523cc80 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSetsFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsAnswerSetsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class InsightsSettingsAnswerSetsFetcher - extends Fetcher { + extends Fetcher +{ private String authorization; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsCommentFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsCommentFetcher.java index c18b36f9f5..87f9998c15 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsCommentFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsSettingsCommentFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class InsightsSettingsCommentFetcher - extends Fetcher { + extends Fetcher +{ private String authorization; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchiveUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchiveUpdater.java index 7274b1dd3a..7dd776bfa5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchiveUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationArchiveUpdater.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class PluginConfigurationArchiveUpdater - extends Updater { + extends Updater +{ private String pathSid; private String flexMetadata; diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchiveUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchiveUpdater.java index 3ff241ba2a..42fbcbed9f 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchiveUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginVersionArchiveUpdater.java @@ -54,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Plugins/{PluginSid}/Versions/{Sid}/Archive"; - path = - path.replace( - "{" + "PluginSid" + "}", - this.pathPluginSid.toString() - ); + path = path.replace( + "{" + "PluginSid" + "}", + this.pathPluginSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelFetcher.java index 162c6edb34..0e449e7a90 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelFetcher.java @@ -43,11 +43,10 @@ public InteractionChannelFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelReader.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelReader.java index 45ae8a3c68..c00833f28c 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java index 23c34a88cb..e7f08f36c5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java @@ -62,11 +62,10 @@ public InteractionChannelUpdater setRouting(final Object routing) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java index 6be65af399..5fd8e65293 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InteractionChannelInviteCreator - extends Creator { + extends Creator +{ private String pathInteractionSid; private String pathChannelSid; @@ -56,16 +57,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteReader.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteReader.java index ebb5c58c25..1151a93f8c 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InteractionChannelInviteReader - extends Reader { + extends Reader +{ private String pathInteractionSid; private String pathChannelSid; @@ -80,16 +81,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java index e147273102..4be085877e 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InteractionChannelParticipantCreator - extends Creator { + extends Creator +{ private String pathInteractionSid; private String pathChannelSid; @@ -76,16 +77,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantReader.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantReader.java index d0fa967f89..a661d6f67e 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InteractionChannelParticipantReader - extends Reader { + extends Reader +{ private String pathInteractionSid; private String pathChannelSid; @@ -79,16 +80,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantUpdater.java index 389aa34d06..2c2aa56b2d 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InteractionChannelParticipantUpdater - extends Updater { + extends Updater +{ private String pathInteractionSid; private String pathChannelSid; @@ -61,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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..bc5707385e 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 @@ -52,16 +52,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Transfers"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferFetcher.java index ffaf4c297c..ecee33d4d2 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionTransferFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Transfers/{Sid}"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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..131091c851 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 @@ -55,16 +55,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Transfers/{Sid}"; - path = - path.replace( - "{" + "InteractionSid" + "}", - this.pathInteractionSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "InteractionSid" + "}", + this.pathInteractionSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsCreator.java index 7df437064b..8486cb7dbc 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsCreator.java @@ -97,11 +97,10 @@ public PluginVersionsCreator setFlexMetadata(final String flexMetadata) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Plugins/{PluginSid}/Versions"; - path = - path.replace( - "{" + "PluginSid" + "}", - this.pathPluginSid.toString() - ); + path = path.replace( + "{" + "PluginSid" + "}", + this.pathPluginSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsFetcher.java index 77dad11728..0f040ef094 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsFetcher.java @@ -51,11 +51,10 @@ public PluginVersionsFetcher setFlexMetadata(final String flexMetadata) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Plugins/{PluginSid}/Versions/{Sid}"; - path = - path.replace( - "{" + "PluginSid" + "}", - this.pathPluginSid.toString() - ); + path = path.replace( + "{" + "PluginSid" + "}", + this.pathPluginSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsReader.java b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsReader.java index 323da4f9a1..98742069ce 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/plugin/PluginVersionsReader.java @@ -79,11 +79,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Plugins/{PluginSid}/Versions"; - path = - path.replace( - "{" + "PluginSid" + "}", - this.pathPluginSid.toString() - ); + path = path.replace( + "{" + "PluginSid" + "}", + this.pathPluginSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginFetcher.java index 265657d8ff..23d96ec507 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginFetcher.java @@ -52,16 +52,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Configurations/{ConfigurationSid}/Plugins/{PluginSid}"; - path = - path.replace( - "{" + "ConfigurationSid" + "}", - this.pathConfigurationSid.toString() - ); - path = - path.replace( - "{" + "PluginSid" + "}", - this.pathPluginSid.toString() - ); + path = path.replace( + "{" + "ConfigurationSid" + "}", + this.pathConfigurationSid.toString() + ); + path = path.replace( + "{" + "PluginSid" + "}", + this.pathPluginSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginReader.java b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginReader.java index 69f37b9768..34e1f01706 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginReader.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/pluginconfiguration/ConfiguredPluginReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/PluginService/Configurations/{ConfigurationSid}/Plugins"; - path = - path.replace( - "{" + "ConfigurationSid" + "}", - this.pathConfigurationSid.toString() - ); + path = path.replace( + "{" + "ConfigurationSid" + "}", + this.pathConfigurationSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v2/FlexUserFetcher.java b/src/main/java/com/twilio/rest/flexapi/v2/FlexUserFetcher.java index 3cd3f27651..cd89682690 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/FlexUserFetcher.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/FlexUserFetcher.java @@ -43,16 +43,14 @@ public FlexUserFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Instances/{InstanceSid}/Users/{FlexUserSid}"; - path = - path.replace( - "{" + "InstanceSid" + "}", - this.pathInstanceSid.toString() - ); - path = - path.replace( - "{" + "FlexUserSid" + "}", - this.pathFlexUserSid.toString() - ); + path = path.replace( + "{" + "InstanceSid" + "}", + this.pathInstanceSid.toString() + ); + path = path.replace( + "{" + "FlexUserSid" + "}", + this.pathFlexUserSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/flexapi/v2/FlexUserUpdater.java b/src/main/java/com/twilio/rest/flexapi/v2/FlexUserUpdater.java index d444cd4738..a8070454f5 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/FlexUserUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/FlexUserUpdater.java @@ -64,16 +64,14 @@ public FlexUserUpdater setLocale(final String locale) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Instances/{InstanceSid}/Users/{FlexUserSid}"; - path = - path.replace( - "{" + "InstanceSid" + "}", - this.pathInstanceSid.toString() - ); - path = - path.replace( - "{" + "FlexUserSid" + "}", - this.pathFlexUserSid.toString() - ); + path = path.replace( + "{" + "InstanceSid" + "}", + this.pathInstanceSid.toString() + ); + path = path.replace( + "{" + "FlexUserSid" + "}", + this.pathFlexUserSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 a0f1c3273d..21c592eded 100644 --- a/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java +++ b/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java @@ -17,7 +17,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -26,7 +25,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.twilio.base.Resource; import com.twilio.base.Resource; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; @@ -46,26 +44,6 @@ public static NewApiKeyCreator creator(final String accountSid) { return new NewApiKeyCreator(accountSid); } - public enum Keytype { - RESTRICTED("restricted"); - - private final String value; - - private Keytype(final String value) { - this.value = value; - } - - @JsonValue - public String toString() { - return value; - } - - @JsonCreator - public static Keytype forValue(final String value) { - return Promoter.enumFromString(value, Keytype.values()); - } - } - /** * Converts a JSON String into a NewApiKey object using the provided ObjectMapper. * diff --git a/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java b/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java index df73227b44..5716fcb9cf 100644 --- a/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java +++ b/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java @@ -34,7 +34,7 @@ public class NewApiKeyCreator extends Creator { private String accountSid; private String friendlyName; - private NewApiKey.Keytype keyType; + private String keyType; private Object policy; public NewApiKeyCreator(final String accountSid) { @@ -51,7 +51,7 @@ public NewApiKeyCreator setFriendlyName(final String friendlyName) { return this; } - public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType) { + public NewApiKeyCreator setKeyType(final String keyType) { this.keyType = keyType; return this; } 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 55268aa78c..7fb4691556 100644 --- a/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java +++ b/src/main/java/com/twilio/rest/iam/v1/OAuthApp.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -28,6 +29,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; +import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; @@ -65,9 +67,33 @@ public static OAuthAppUpdater updater( ); } + public enum TokenEndpointAuthMethod { + CLIENT_SECRET_BASIC("client_secret_basic"); + + private final String value; + + private TokenEndpointAuthMethod(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static TokenEndpointAuthMethod forValue(final String value) { + return Promoter.enumFromString( + value, + TokenEndpointAuthMethod.values() + ); + } + } + @JsonDeserialize( builder = IamV1OrganizationVendorOauthAppUpdateRequestPolicy.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IamV1OrganizationVendorOauthAppUpdateRequestPolicy { @@ -103,6 +129,7 @@ public static IamV1OrganizationVendorOauthAppUpdateRequestPolicy fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -160,6 +187,7 @@ public int hashCode() { @JsonDeserialize( builder = IamV1AccountVendorOauthAppCreateRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IamV1AccountVendorOauthAppCreateRequest { @@ -189,6 +217,11 @@ public static class IamV1AccountVendorOauthAppCreateRequest { @Getter private final String clientSid; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("token_endpoint_auth_method") + @Getter + private final OAuthApp.TokenEndpointAuthMethod tokenEndpointAuthMethod; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("policy") @Getter @@ -205,6 +238,7 @@ private IamV1AccountVendorOauthAppCreateRequest(Builder builder) { this.ownerSid = builder.ownerSid; this.description = builder.description; this.clientSid = builder.clientSid; + this.tokenEndpointAuthMethod = builder.tokenEndpointAuthMethod; this.policy = builder.policy; this.accessTokenTtl = builder.accessTokenTtl; } @@ -223,6 +257,7 @@ public static IamV1AccountVendorOauthAppCreateRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -241,6 +276,9 @@ public static class Builder { @JsonProperty("client_sid") private String clientSid; + @JsonProperty("token_endpoint_auth_method") + private OAuthApp.TokenEndpointAuthMethod tokenEndpointAuthMethod; + @JsonProperty("policy") private IamV1OrganizationVendoroauthappPolicy policy; @@ -282,6 +320,15 @@ public Builder clientSid(String clientSid) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("token_endpoint_auth_method") + public Builder tokenEndpointAuthMethod( + OAuthApp.TokenEndpointAuthMethod tokenEndpointAuthMethod + ) { + this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("policy") public Builder policy( @@ -321,6 +368,10 @@ public boolean equals(final Object o) { Objects.equals(ownerSid, other.ownerSid) && Objects.equals(description, other.description) && Objects.equals(clientSid, other.clientSid) && + Objects.equals( + tokenEndpointAuthMethod, + other.tokenEndpointAuthMethod + ) && Objects.equals(policy, other.policy) && Objects.equals(accessTokenTtl, other.accessTokenTtl) ); @@ -334,6 +385,7 @@ public int hashCode() { ownerSid, description, clientSid, + tokenEndpointAuthMethod, policy, accessTokenTtl ); @@ -343,6 +395,7 @@ public int hashCode() { @JsonDeserialize( builder = IamV1OrganizationVendoroauthappPolicy.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IamV1OrganizationVendoroauthappPolicy { @@ -376,6 +429,7 @@ public static IamV1OrganizationVendoroauthappPolicy fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -431,6 +485,7 @@ public int hashCode() { @JsonDeserialize( builder = IamV1AccountVendorOauthAppUpdateRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IamV1AccountVendorOauthAppUpdateRequest { @@ -482,6 +537,7 @@ public static IamV1AccountVendorOauthAppUpdateRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -636,6 +692,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String createdBy; + @Getter + private final String creatorSid; + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter private final ZonedDateTime dateCreated; @@ -665,6 +724,7 @@ public static String toJson(Object object, ObjectMapper mapper) { private OAuthApp( @JsonProperty("access_token_ttl") final Integer accessTokenTtl, @JsonProperty("created_by") final String createdBy, + @JsonProperty("creator_sid") final String creatorSid, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( @@ -682,6 +742,7 @@ private OAuthApp( ) { this.accessTokenTtl = accessTokenTtl; this.createdBy = createdBy; + this.creatorSid = creatorSid; this.dateCreated = dateCreated; this.description = description; this.friendlyName = friendlyName; @@ -706,6 +767,7 @@ public boolean equals(final Object o) { return ( Objects.equals(accessTokenTtl, other.accessTokenTtl) && Objects.equals(createdBy, other.createdBy) && + Objects.equals(creatorSid, other.creatorSid) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(description, other.description) && Objects.equals(friendlyName, other.friendlyName) && @@ -722,6 +784,7 @@ public int hashCode() { return Objects.hash( accessTokenTtl, createdBy, + creatorSid, dateCreated, description, friendlyName, 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 a103326895..c8b7fed0b8 100644 --- a/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java +++ b/src/main/java/com/twilio/rest/insights/v1/CallSummaries.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; @@ -24,6 +25,7 @@ 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.fasterxml.jackson.databind.annotation.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; @@ -38,6 +40,7 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.Objects; +import lombok.Builder; import lombok.Getter; import lombok.ToString; @@ -194,6 +197,674 @@ public static ProcessingState forValue(final String value) { } } + public enum CallSummaryCrelaySessionState { + UNKNOWN("unknown"), + FAILURE("failure"), + ENDED("ended"), + HUNG_UP("hung_up"); + + private final String value; + + private CallSummaryCrelaySessionState(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static CallSummaryCrelaySessionState forValue( + final String value + ) { + return Promoter.enumFromString( + value, + CallSummaryCrelaySessionState.values() + ); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayRateStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayRateStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("min") + @Getter + private final Float min; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("max") + @Getter + private final Float max; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("avg") + @Getter + private final Float avg; + + private CallSummaryCrelayRateStats(Builder builder) { + this.min = builder.min; + this.max = builder.max; + this.avg = builder.avg; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayRateStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayRateStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("min") + private Float min; + + @JsonProperty("max") + private Float max; + + @JsonProperty("avg") + private Float avg; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("min") + public Builder min(Float min) { + this.min = min; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("max") + public Builder max(Float max) { + this.max = max; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("avg") + public Builder avg(Float avg) { + this.avg = avg; + return this; + } + + public CallSummaryCrelayRateStats build() { + return new CallSummaryCrelayRateStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayRateStats other = (CallSummaryCrelayRateStats) o; + return ( + Objects.equals(min, other.min) && + Objects.equals(max, other.max) && + Objects.equals(avg, other.avg) + ); + } + + @Override + public int hashCode() { + return Objects.hash(min, max, avg); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayInterruptions.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayInterruptions { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("customer_to_agent") + @Getter + private final Integer customerToAgent; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("agent_to_customer") + @Getter + private final Integer agentToCustomer; + + private CallSummaryCrelayInterruptions(Builder builder) { + this.customerToAgent = builder.customerToAgent; + this.agentToCustomer = builder.agentToCustomer; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayInterruptions fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayInterruptions.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("customer_to_agent") + private Integer customerToAgent; + + @JsonProperty("agent_to_customer") + private Integer agentToCustomer; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("customer_to_agent") + public Builder customerToAgent(Integer customerToAgent) { + this.customerToAgent = customerToAgent; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("agent_to_customer") + public Builder agentToCustomer(Integer agentToCustomer) { + this.agentToCustomer = agentToCustomer; + return this; + } + + public CallSummaryCrelayInterruptions build() { + return new CallSummaryCrelayInterruptions(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayInterruptions other = + (CallSummaryCrelayInterruptions) o; + return ( + Objects.equals(customerToAgent, other.customerToAgent) && + Objects.equals(agentToCustomer, other.agentToCustomer) + ); + } + + @Override + public int hashCode() { + return Objects.hash(customerToAgent, agentToCustomer); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayTokenStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayTokenStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + @Getter + private final Integer total; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens_per_second") + @Getter + private final CallSummaryCrelayRateStats tokensPerSecond; + + private CallSummaryCrelayTokenStats(Builder builder) { + this.total = builder.total; + this.tokensPerSecond = builder.tokensPerSecond; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayTokenStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayTokenStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("total") + private Integer total; + + @JsonProperty("tokens_per_second") + private CallSummaryCrelayRateStats tokensPerSecond; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + public Builder total(Integer total) { + this.total = total; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens_per_second") + public Builder tokensPerSecond( + CallSummaryCrelayRateStats tokensPerSecond + ) { + this.tokensPerSecond = tokensPerSecond; + return this; + } + + public CallSummaryCrelayTokenStats build() { + return new CallSummaryCrelayTokenStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayTokenStats other = (CallSummaryCrelayTokenStats) o; + return ( + Objects.equals(total, other.total) && + Objects.equals(tokensPerSecond, other.tokensPerSecond) + ); + } + + @Override + public int hashCode() { + return Objects.hash(total, tokensPerSecond); + } + } + + @JsonDeserialize(builder = CallSummaryAgentSessionSummary.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryAgentSessionSummary { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + @Getter + private final String sessionId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency_ms") + @Getter + private final CallSummaryCrelayRateStats ttsLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency_ms") + @Getter + private final CallSummaryCrelayRateStats sttLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("network_latency_ms") + @Getter + private final CallSummaryCrelayRateStats networkLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time_to_first_audio_ms") + @Getter + private final CallSummaryCrelayRateStats timeToFirstAudioMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("application_latency_ms") + @Getter + private final CallSummaryCrelayRateStats applicationLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens") + @Getter + private final CallSummaryCrelayTokenStats tokens; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + @Getter + private final CallSummaryCrelayWordStats words; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("turns") + @Getter + private final Integer turns; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interruptions") + @Getter + private final CallSummaryCrelayInterruptions interruptions; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_state") + @Getter + private final CallSummaries.CallSummaryCrelaySessionState sessionState; + + private CallSummaryAgentSessionSummary(Builder builder) { + this.sessionId = builder.sessionId; + this.ttsLatencyMs = builder.ttsLatencyMs; + this.sttLatencyMs = builder.sttLatencyMs; + this.networkLatencyMs = builder.networkLatencyMs; + this.timeToFirstAudioMs = builder.timeToFirstAudioMs; + this.applicationLatencyMs = builder.applicationLatencyMs; + this.tokens = builder.tokens; + this.words = builder.words; + this.turns = builder.turns; + this.interruptions = builder.interruptions; + this.sessionState = builder.sessionState; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryAgentSessionSummary fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryAgentSessionSummary.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("session_id") + private String sessionId; + + @JsonProperty("tts_latency_ms") + private CallSummaryCrelayRateStats ttsLatencyMs; + + @JsonProperty("stt_latency_ms") + private CallSummaryCrelayRateStats sttLatencyMs; + + @JsonProperty("network_latency_ms") + private CallSummaryCrelayRateStats networkLatencyMs; + + @JsonProperty("time_to_first_audio_ms") + private CallSummaryCrelayRateStats timeToFirstAudioMs; + + @JsonProperty("application_latency_ms") + private CallSummaryCrelayRateStats applicationLatencyMs; + + @JsonProperty("tokens") + private CallSummaryCrelayTokenStats tokens; + + @JsonProperty("words") + private CallSummaryCrelayWordStats words; + + @JsonProperty("turns") + private Integer turns; + + @JsonProperty("interruptions") + private CallSummaryCrelayInterruptions interruptions; + + @JsonProperty("session_state") + private CallSummaries.CallSummaryCrelaySessionState sessionState; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency_ms") + public Builder ttsLatencyMs( + CallSummaryCrelayRateStats ttsLatencyMs + ) { + this.ttsLatencyMs = ttsLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency_ms") + public Builder sttLatencyMs( + CallSummaryCrelayRateStats sttLatencyMs + ) { + this.sttLatencyMs = sttLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("network_latency_ms") + public Builder networkLatencyMs( + CallSummaryCrelayRateStats networkLatencyMs + ) { + this.networkLatencyMs = networkLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time_to_first_audio_ms") + public Builder timeToFirstAudioMs( + CallSummaryCrelayRateStats timeToFirstAudioMs + ) { + this.timeToFirstAudioMs = timeToFirstAudioMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("application_latency_ms") + public Builder applicationLatencyMs( + CallSummaryCrelayRateStats applicationLatencyMs + ) { + this.applicationLatencyMs = applicationLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens") + public Builder tokens(CallSummaryCrelayTokenStats tokens) { + this.tokens = tokens; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + public Builder words(CallSummaryCrelayWordStats words) { + this.words = words; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("turns") + public Builder turns(Integer turns) { + this.turns = turns; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interruptions") + public Builder interruptions( + CallSummaryCrelayInterruptions interruptions + ) { + this.interruptions = interruptions; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_state") + public Builder sessionState( + CallSummaries.CallSummaryCrelaySessionState sessionState + ) { + this.sessionState = sessionState; + return this; + } + + public CallSummaryAgentSessionSummary build() { + return new CallSummaryAgentSessionSummary(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryAgentSessionSummary other = + (CallSummaryAgentSessionSummary) o; + return ( + Objects.equals(sessionId, other.sessionId) && + Objects.equals(ttsLatencyMs, other.ttsLatencyMs) && + Objects.equals(sttLatencyMs, other.sttLatencyMs) && + Objects.equals(networkLatencyMs, other.networkLatencyMs) && + Objects.equals(timeToFirstAudioMs, other.timeToFirstAudioMs) && + Objects.equals( + applicationLatencyMs, + other.applicationLatencyMs + ) && + Objects.equals(tokens, other.tokens) && + Objects.equals(words, other.words) && + Objects.equals(turns, other.turns) && + Objects.equals(interruptions, other.interruptions) && + Objects.equals(sessionState, other.sessionState) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + sessionId, + ttsLatencyMs, + sttLatencyMs, + networkLatencyMs, + timeToFirstAudioMs, + applicationLatencyMs, + tokens, + words, + turns, + interruptions, + sessionState + ); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayWordStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayWordStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + @Getter + private final Integer total; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words_per_minute") + @Getter + private final CallSummaryCrelayRateStats wordsPerMinute; + + private CallSummaryCrelayWordStats(Builder builder) { + this.total = builder.total; + this.wordsPerMinute = builder.wordsPerMinute; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayWordStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayWordStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("total") + private Integer total; + + @JsonProperty("words_per_minute") + private CallSummaryCrelayRateStats wordsPerMinute; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + public Builder total(Integer total) { + this.total = total; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words_per_minute") + public Builder wordsPerMinute( + CallSummaryCrelayRateStats wordsPerMinute + ) { + this.wordsPerMinute = wordsPerMinute; + return this; + } + + public CallSummaryCrelayWordStats build() { + return new CallSummaryCrelayWordStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayWordStats other = (CallSummaryCrelayWordStats) o; + return ( + Objects.equals(total, other.total) && + Objects.equals(wordsPerMinute, other.wordsPerMinute) + ); + } + + @Override + public int hashCode() { + return Objects.hash(total, wordsPerMinute); + } + } + /** * Converts a JSON String into a CallSummaries object using the provided ObjectMapper. * @@ -252,6 +923,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String accountSid; + @Getter + private final List agentSessionSummaries; + @Getter private final Object annotation; @@ -324,6 +998,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private CallSummaries( @JsonProperty("account_sid") final String accountSid, + @JsonProperty( + "agent_session_summaries" + ) final List agentSessionSummaries, @JsonProperty("annotation") final Object annotation, @JsonProperty("answered_by") final CallSummaries.AnsweredBy answeredBy, @JsonProperty("attributes") final Object attributes, @@ -362,6 +1039,7 @@ private CallSummaries( @JsonProperty("url") final URI url ) { this.accountSid = accountSid; + this.agentSessionSummaries = agentSessionSummaries; this.annotation = annotation; this.answeredBy = answeredBy; this.attributes = attributes; @@ -399,6 +1077,10 @@ public boolean equals(final Object o) { CallSummaries other = (CallSummaries) o; return ( Objects.equals(accountSid, other.accountSid) && + Objects.equals( + agentSessionSummaries, + other.agentSessionSummaries + ) && Objects.equals(annotation, other.annotation) && Objects.equals(answeredBy, other.answeredBy) && Objects.equals(attributes, other.attributes) && @@ -428,6 +1110,7 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, + agentSessionSummaries, annotation, answeredBy, attributes, diff --git a/src/main/java/com/twilio/rest/insights/v1/ConferenceFetcher.java b/src/main/java/com/twilio/rest/insights/v1/ConferenceFetcher.java index 550cfcda00..2519d1686e 100644 --- a/src/main/java/com/twilio/rest/insights/v1/ConferenceFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v1/ConferenceFetcher.java @@ -38,11 +38,10 @@ public ConferenceFetcher(final String pathConferenceSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conferences/{ConferenceSid}"; - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 b80023095b..b59daf8dd0 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 @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; @@ -24,6 +25,7 @@ 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.fasterxml.jackson.databind.annotation.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; @@ -38,6 +40,7 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.Objects; +import lombok.Builder; import lombok.Getter; import lombok.ToString; @@ -147,6 +150,674 @@ public static ProcessingState forValue(final String value) { } } + public enum CallSummaryCrelaySessionState { + UNKNOWN("unknown"), + FAILURE("failure"), + ENDED("ended"), + HUNG_UP("hung_up"); + + private final String value; + + private CallSummaryCrelaySessionState(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static CallSummaryCrelaySessionState forValue( + final String value + ) { + return Promoter.enumFromString( + value, + CallSummaryCrelaySessionState.values() + ); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayRateStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayRateStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("min") + @Getter + private final Float min; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("max") + @Getter + private final Float max; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("avg") + @Getter + private final Float avg; + + private CallSummaryCrelayRateStats(Builder builder) { + this.min = builder.min; + this.max = builder.max; + this.avg = builder.avg; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayRateStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayRateStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("min") + private Float min; + + @JsonProperty("max") + private Float max; + + @JsonProperty("avg") + private Float avg; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("min") + public Builder min(Float min) { + this.min = min; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("max") + public Builder max(Float max) { + this.max = max; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("avg") + public Builder avg(Float avg) { + this.avg = avg; + return this; + } + + public CallSummaryCrelayRateStats build() { + return new CallSummaryCrelayRateStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayRateStats other = (CallSummaryCrelayRateStats) o; + return ( + Objects.equals(min, other.min) && + Objects.equals(max, other.max) && + Objects.equals(avg, other.avg) + ); + } + + @Override + public int hashCode() { + return Objects.hash(min, max, avg); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayInterruptions.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayInterruptions { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("customer_to_agent") + @Getter + private final Integer customerToAgent; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("agent_to_customer") + @Getter + private final Integer agentToCustomer; + + private CallSummaryCrelayInterruptions(Builder builder) { + this.customerToAgent = builder.customerToAgent; + this.agentToCustomer = builder.agentToCustomer; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayInterruptions fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayInterruptions.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("customer_to_agent") + private Integer customerToAgent; + + @JsonProperty("agent_to_customer") + private Integer agentToCustomer; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("customer_to_agent") + public Builder customerToAgent(Integer customerToAgent) { + this.customerToAgent = customerToAgent; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("agent_to_customer") + public Builder agentToCustomer(Integer agentToCustomer) { + this.agentToCustomer = agentToCustomer; + return this; + } + + public CallSummaryCrelayInterruptions build() { + return new CallSummaryCrelayInterruptions(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayInterruptions other = + (CallSummaryCrelayInterruptions) o; + return ( + Objects.equals(customerToAgent, other.customerToAgent) && + Objects.equals(agentToCustomer, other.agentToCustomer) + ); + } + + @Override + public int hashCode() { + return Objects.hash(customerToAgent, agentToCustomer); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayTokenStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayTokenStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + @Getter + private final Integer total; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens_per_second") + @Getter + private final CallSummaryCrelayRateStats tokensPerSecond; + + private CallSummaryCrelayTokenStats(Builder builder) { + this.total = builder.total; + this.tokensPerSecond = builder.tokensPerSecond; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayTokenStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayTokenStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("total") + private Integer total; + + @JsonProperty("tokens_per_second") + private CallSummaryCrelayRateStats tokensPerSecond; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + public Builder total(Integer total) { + this.total = total; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens_per_second") + public Builder tokensPerSecond( + CallSummaryCrelayRateStats tokensPerSecond + ) { + this.tokensPerSecond = tokensPerSecond; + return this; + } + + public CallSummaryCrelayTokenStats build() { + return new CallSummaryCrelayTokenStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayTokenStats other = (CallSummaryCrelayTokenStats) o; + return ( + Objects.equals(total, other.total) && + Objects.equals(tokensPerSecond, other.tokensPerSecond) + ); + } + + @Override + public int hashCode() { + return Objects.hash(total, tokensPerSecond); + } + } + + @JsonDeserialize(builder = CallSummaryAgentSessionSummary.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryAgentSessionSummary { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + @Getter + private final String sessionId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency_ms") + @Getter + private final CallSummaryCrelayRateStats ttsLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency_ms") + @Getter + private final CallSummaryCrelayRateStats sttLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("network_latency_ms") + @Getter + private final CallSummaryCrelayRateStats networkLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time_to_first_audio_ms") + @Getter + private final CallSummaryCrelayRateStats timeToFirstAudioMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("application_latency_ms") + @Getter + private final CallSummaryCrelayRateStats applicationLatencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens") + @Getter + private final CallSummaryCrelayTokenStats tokens; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + @Getter + private final CallSummaryCrelayWordStats words; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("turns") + @Getter + private final Integer turns; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interruptions") + @Getter + private final CallSummaryCrelayInterruptions interruptions; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_state") + @Getter + private final CallSummary.CallSummaryCrelaySessionState sessionState; + + private CallSummaryAgentSessionSummary(Builder builder) { + this.sessionId = builder.sessionId; + this.ttsLatencyMs = builder.ttsLatencyMs; + this.sttLatencyMs = builder.sttLatencyMs; + this.networkLatencyMs = builder.networkLatencyMs; + this.timeToFirstAudioMs = builder.timeToFirstAudioMs; + this.applicationLatencyMs = builder.applicationLatencyMs; + this.tokens = builder.tokens; + this.words = builder.words; + this.turns = builder.turns; + this.interruptions = builder.interruptions; + this.sessionState = builder.sessionState; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryAgentSessionSummary fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryAgentSessionSummary.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("session_id") + private String sessionId; + + @JsonProperty("tts_latency_ms") + private CallSummaryCrelayRateStats ttsLatencyMs; + + @JsonProperty("stt_latency_ms") + private CallSummaryCrelayRateStats sttLatencyMs; + + @JsonProperty("network_latency_ms") + private CallSummaryCrelayRateStats networkLatencyMs; + + @JsonProperty("time_to_first_audio_ms") + private CallSummaryCrelayRateStats timeToFirstAudioMs; + + @JsonProperty("application_latency_ms") + private CallSummaryCrelayRateStats applicationLatencyMs; + + @JsonProperty("tokens") + private CallSummaryCrelayTokenStats tokens; + + @JsonProperty("words") + private CallSummaryCrelayWordStats words; + + @JsonProperty("turns") + private Integer turns; + + @JsonProperty("interruptions") + private CallSummaryCrelayInterruptions interruptions; + + @JsonProperty("session_state") + private CallSummary.CallSummaryCrelaySessionState sessionState; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency_ms") + public Builder ttsLatencyMs( + CallSummaryCrelayRateStats ttsLatencyMs + ) { + this.ttsLatencyMs = ttsLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency_ms") + public Builder sttLatencyMs( + CallSummaryCrelayRateStats sttLatencyMs + ) { + this.sttLatencyMs = sttLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("network_latency_ms") + public Builder networkLatencyMs( + CallSummaryCrelayRateStats networkLatencyMs + ) { + this.networkLatencyMs = networkLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time_to_first_audio_ms") + public Builder timeToFirstAudioMs( + CallSummaryCrelayRateStats timeToFirstAudioMs + ) { + this.timeToFirstAudioMs = timeToFirstAudioMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("application_latency_ms") + public Builder applicationLatencyMs( + CallSummaryCrelayRateStats applicationLatencyMs + ) { + this.applicationLatencyMs = applicationLatencyMs; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tokens") + public Builder tokens(CallSummaryCrelayTokenStats tokens) { + this.tokens = tokens; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words") + public Builder words(CallSummaryCrelayWordStats words) { + this.words = words; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("turns") + public Builder turns(Integer turns) { + this.turns = turns; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interruptions") + public Builder interruptions( + CallSummaryCrelayInterruptions interruptions + ) { + this.interruptions = interruptions; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_state") + public Builder sessionState( + CallSummary.CallSummaryCrelaySessionState sessionState + ) { + this.sessionState = sessionState; + return this; + } + + public CallSummaryAgentSessionSummary build() { + return new CallSummaryAgentSessionSummary(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryAgentSessionSummary other = + (CallSummaryAgentSessionSummary) o; + return ( + Objects.equals(sessionId, other.sessionId) && + Objects.equals(ttsLatencyMs, other.ttsLatencyMs) && + Objects.equals(sttLatencyMs, other.sttLatencyMs) && + Objects.equals(networkLatencyMs, other.networkLatencyMs) && + Objects.equals(timeToFirstAudioMs, other.timeToFirstAudioMs) && + Objects.equals( + applicationLatencyMs, + other.applicationLatencyMs + ) && + Objects.equals(tokens, other.tokens) && + Objects.equals(words, other.words) && + Objects.equals(turns, other.turns) && + Objects.equals(interruptions, other.interruptions) && + Objects.equals(sessionState, other.sessionState) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + sessionId, + ttsLatencyMs, + sttLatencyMs, + networkLatencyMs, + timeToFirstAudioMs, + applicationLatencyMs, + tokens, + words, + turns, + interruptions, + sessionState + ); + } + } + + @JsonDeserialize(builder = CallSummaryCrelayWordStats.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallSummaryCrelayWordStats { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + @Getter + private final Integer total; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words_per_minute") + @Getter + private final CallSummaryCrelayRateStats wordsPerMinute; + + private CallSummaryCrelayWordStats(Builder builder) { + this.total = builder.total; + this.wordsPerMinute = builder.wordsPerMinute; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallSummaryCrelayWordStats fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CallSummaryCrelayWordStats.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("total") + private Integer total; + + @JsonProperty("words_per_minute") + private CallSummaryCrelayRateStats wordsPerMinute; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total") + public Builder total(Integer total) { + this.total = total; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("words_per_minute") + public Builder wordsPerMinute( + CallSummaryCrelayRateStats wordsPerMinute + ) { + this.wordsPerMinute = wordsPerMinute; + return this; + } + + public CallSummaryCrelayWordStats build() { + return new CallSummaryCrelayWordStats(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallSummaryCrelayWordStats other = (CallSummaryCrelayWordStats) o; + return ( + Objects.equals(total, other.total) && + Objects.equals(wordsPerMinute, other.wordsPerMinute) + ); + } + + @Override + public int hashCode() { + return Objects.hash(total, wordsPerMinute); + } + } + /** * Converts a JSON String into a CallSummary object using the provided ObjectMapper. * @@ -205,6 +876,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String accountSid; + @Getter + private final List agentSessionSummaries; + @Getter private final Object annotation; @@ -277,6 +951,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private CallSummary( @JsonProperty("account_sid") final String accountSid, + @JsonProperty( + "agent_session_summaries" + ) final List agentSessionSummaries, @JsonProperty("annotation") final Object annotation, @JsonProperty("answered_by") final CallSummary.AnsweredBy answeredBy, @JsonProperty("attributes") final Object attributes, @@ -315,6 +992,7 @@ private CallSummary( @JsonProperty("url") final URI url ) { this.accountSid = accountSid; + this.agentSessionSummaries = agentSessionSummaries; this.annotation = annotation; this.answeredBy = answeredBy; this.attributes = attributes; @@ -352,6 +1030,10 @@ public boolean equals(final Object o) { CallSummary other = (CallSummary) o; return ( Objects.equals(accountSid, other.accountSid) && + Objects.equals( + agentSessionSummaries, + other.agentSessionSummaries + ) && Objects.equals(annotation, other.annotation) && Objects.equals(answeredBy, other.answeredBy) && Objects.equals(attributes, other.attributes) && @@ -381,6 +1063,7 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, + agentSessionSummaries, annotation, answeredBy, attributes, 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 9c0cf02800..e553db34cf 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 @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; @@ -23,6 +24,8 @@ import com.fasterxml.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 com.twilio.base.Resource; import com.twilio.converter.Promoter; @@ -32,7 +35,9 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; +import java.util.Map; import java.util.Objects; +import lombok.Builder; import lombok.Getter; import lombok.ToString; @@ -44,6 +49,27 @@ public static EventReader reader(final String pathCallSid) { return new EventReader(pathCallSid); } + public enum Type { + DTMF("DTMF"), + SPEECH("SPEECH"); + + private final String value; + + private Type(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Type forValue(final String value) { + return Promoter.enumFromString(value, Type.values()); + } + } + public enum TwilioEdge { UNKNOWN_EDGE("unknown_edge"), CARRIER_EDGE("carrier_edge"), @@ -68,6 +94,29 @@ public static TwilioEdge forValue(final String value) { } } + public enum EndStatus { + UNKNOWN("unknown"), + FAILURE("failure"), + ENDED("ended"), + HUNG_UP("hung_up"); + + private final String value; + + private EndStatus(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static EndStatus forValue(final String value) { + return Promoter.enumFromString(value, EndStatus.values()); + } + } + public enum Level { UNKNOWN("UNKNOWN"), DEBUG("DEBUG"), @@ -92,6 +141,934 @@ public static Level forValue(final String value) { } } + @JsonDeserialize(builder = ConfigurationEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ConfigurationEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurations") + @Getter + private final Map configurations; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("languages") + @Getter + private final Map languages; + + private ConfigurationEvent(Builder builder) { + this.configurations = builder.configurations; + this.languages = builder.languages; + } + + public static Builder builder() { + return new Builder(); + } + + public static ConfigurationEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, ConfigurationEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("configurations") + private Map configurations; + + @JsonProperty("languages") + private Map languages; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurations") + public Builder configurations(Map configurations) { + this.configurations = configurations; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("languages") + public Builder languages( + Map languages + ) { + this.languages = languages; + return this; + } + + public ConfigurationEvent build() { + return new ConfigurationEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ConfigurationEvent other = (ConfigurationEvent) o; + return ( + Objects.equals(configurations, other.configurations) && + Objects.equals(languages, other.languages) + ); + } + + @Override + public int hashCode() { + return Objects.hash(configurations, languages); + } + } + + @JsonDeserialize(builder = ConfigurationEventLanguagesValue.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ConfigurationEventLanguagesValue { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_provider") + @Getter + private final String ttsProvider; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("voice") + @Getter + private final String voice; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription_provider") + @Getter + private final String transcriptionProvider; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("speech_model") + @Getter + private final String speechModel; + + private ConfigurationEventLanguagesValue(Builder builder) { + this.ttsProvider = builder.ttsProvider; + this.voice = builder.voice; + this.transcriptionProvider = builder.transcriptionProvider; + this.speechModel = builder.speechModel; + } + + public static Builder builder() { + return new Builder(); + } + + public static ConfigurationEventLanguagesValue fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + ConfigurationEventLanguagesValue.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("tts_provider") + private String ttsProvider; + + @JsonProperty("voice") + private String voice; + + @JsonProperty("transcription_provider") + private String transcriptionProvider; + + @JsonProperty("speech_model") + private String speechModel; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_provider") + public Builder ttsProvider(String ttsProvider) { + this.ttsProvider = ttsProvider; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("voice") + public Builder voice(String voice) { + this.voice = voice; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription_provider") + public Builder transcriptionProvider(String transcriptionProvider) { + this.transcriptionProvider = transcriptionProvider; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("speech_model") + public Builder speechModel(String speechModel) { + this.speechModel = speechModel; + return this; + } + + public ConfigurationEventLanguagesValue build() { + return new ConfigurationEventLanguagesValue(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ConfigurationEventLanguagesValue other = + (ConfigurationEventLanguagesValue) o; + return ( + Objects.equals(ttsProvider, other.ttsProvider) && + Objects.equals(voice, other.voice) && + Objects.equals( + transcriptionProvider, + other.transcriptionProvider + ) && + Objects.equals(speechModel, other.speechModel) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + ttsProvider, + voice, + transcriptionProvider, + speechModel + ); + } + } + + @JsonDeserialize(builder = CallWrapUpEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CallWrapUpEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("duration_in_seconds") + @Getter + private final Integer durationInSeconds; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("end_status") + @Getter + private final Event.EndStatus endStatus; + + private CallWrapUpEvent(Builder builder) { + this.durationInSeconds = builder.durationInSeconds; + this.endStatus = builder.endStatus; + } + + public static Builder builder() { + return new Builder(); + } + + public static CallWrapUpEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, CallWrapUpEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("duration_in_seconds") + private Integer durationInSeconds; + + @JsonProperty("end_status") + private Event.EndStatus endStatus; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("duration_in_seconds") + public Builder durationInSeconds(Integer durationInSeconds) { + this.durationInSeconds = durationInSeconds; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("end_status") + public Builder endStatus(Event.EndStatus endStatus) { + this.endStatus = endStatus; + return this; + } + + public CallWrapUpEvent build() { + return new CallWrapUpEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CallWrapUpEvent other = (CallWrapUpEvent) o; + return ( + Objects.equals(durationInSeconds, other.durationInSeconds) && + Objects.equals(endStatus, other.endStatus) + ); + } + + @Override + public int hashCode() { + return Objects.hash(durationInSeconds, endStatus); + } + } + + @JsonDeserialize(builder = LanguageChangedEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class LanguageChangedEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_language_code") + @Getter + private final String ttsLanguageCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription_language_code") + @Getter + private final String transcriptionLanguageCode; + + private LanguageChangedEvent(Builder builder) { + this.ttsLanguageCode = builder.ttsLanguageCode; + this.transcriptionLanguageCode = builder.transcriptionLanguageCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static LanguageChangedEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LanguageChangedEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("tts_language_code") + private String ttsLanguageCode; + + @JsonProperty("transcription_language_code") + private String transcriptionLanguageCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_language_code") + public Builder ttsLanguageCode(String ttsLanguageCode) { + this.ttsLanguageCode = ttsLanguageCode; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcription_language_code") + public Builder transcriptionLanguageCode( + String transcriptionLanguageCode + ) { + this.transcriptionLanguageCode = transcriptionLanguageCode; + return this; + } + + public LanguageChangedEvent build() { + return new LanguageChangedEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + LanguageChangedEvent other = (LanguageChangedEvent) o; + return ( + Objects.equals(ttsLanguageCode, other.ttsLanguageCode) && + Objects.equals( + transcriptionLanguageCode, + other.transcriptionLanguageCode + ) + ); + } + + @Override + public int hashCode() { + return Objects.hash(ttsLanguageCode, transcriptionLanguageCode); + } + } + + @JsonDeserialize(builder = ErrorEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ErrorEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + private final Integer errorCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("message") + @Getter + private final String message; + + private ErrorEvent(Builder builder) { + this.errorCode = builder.errorCode; + this.message = builder.message; + } + + public static Builder builder() { + return new Builder(); + } + + public static ErrorEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, ErrorEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("error_code") + private Integer errorCode; + + @JsonProperty("message") + private String message; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + public Builder errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("message") + public Builder message(String message) { + this.message = message; + return this; + } + + public ErrorEvent build() { + return new ErrorEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ErrorEvent other = (ErrorEvent) o; + return ( + Objects.equals(errorCode, other.errorCode) && + Objects.equals(message, other.message) + ); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, message); + } + } + + @JsonDeserialize(builder = LastTokenReceivedEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class LastTokenReceivedEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total_tokens") + @Getter + private final Integer totalTokens; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total_words") + @Getter + private final Integer totalWords; + + private LastTokenReceivedEvent(Builder builder) { + this.totalTokens = builder.totalTokens; + this.totalWords = builder.totalWords; + } + + public static Builder builder() { + return new Builder(); + } + + public static LastTokenReceivedEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LastTokenReceivedEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("total_tokens") + private Integer totalTokens; + + @JsonProperty("total_words") + private Integer totalWords; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total_tokens") + public Builder totalTokens(Integer totalTokens) { + this.totalTokens = totalTokens; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("total_words") + public Builder totalWords(Integer totalWords) { + this.totalWords = totalWords; + return this; + } + + public LastTokenReceivedEvent build() { + return new LastTokenReceivedEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + LastTokenReceivedEvent other = (LastTokenReceivedEvent) o; + return ( + Objects.equals(totalTokens, other.totalTokens) && + Objects.equals(totalWords, other.totalWords) + ); + } + + @Override + public int hashCode() { + return Objects.hash(totalTokens, totalWords); + } + } + + @JsonDeserialize(builder = InterruptEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class InterruptEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final Event.Type type; + + private InterruptEvent(Builder builder) { + this.type = builder.type; + } + + public static Builder builder() { + return new Builder(); + } + + public static InterruptEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, InterruptEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("type") + private Event.Type type; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + public Builder type(Event.Type type) { + this.type = type; + return this; + } + + public InterruptEvent build() { + return new InterruptEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + InterruptEvent other = (InterruptEvent) o; + return Objects.equals(type, other.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + } + + @JsonDeserialize( + builder = InsightsV1CallEventConversationRelayData.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class InsightsV1CallEventConversationRelayData { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + @Getter + private final String sessionId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sequence_number") + @Getter + private final Integer sequenceNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency") + @Getter + private final LatencyEvent ttsLatency; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency") + @Getter + private final LatencyEvent sttLatency; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interrupt") + @Getter + private final InterruptEvent interrupt; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_token_received") + @Getter + private final LastTokenReceivedEvent lastTokenReceived; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurations") + @Getter + private final ConfigurationEvent configurations; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("language_changed") + @Getter + private final LanguageChangedEvent languageChanged; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("call_wrap_up") + @Getter + private final CallWrapUpEvent callWrapUp; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error") + @Getter + private final ErrorEvent error; + + private InsightsV1CallEventConversationRelayData(Builder builder) { + this.sessionId = builder.sessionId; + this.sequenceNumber = builder.sequenceNumber; + this.ttsLatency = builder.ttsLatency; + this.sttLatency = builder.sttLatency; + this.interrupt = builder.interrupt; + this.lastTokenReceived = builder.lastTokenReceived; + this.configurations = builder.configurations; + this.languageChanged = builder.languageChanged; + this.callWrapUp = builder.callWrapUp; + this.error = builder.error; + } + + public static Builder builder() { + return new Builder(); + } + + public static InsightsV1CallEventConversationRelayData fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + InsightsV1CallEventConversationRelayData.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("session_id") + private String sessionId; + + @JsonProperty("sequence_number") + private Integer sequenceNumber; + + @JsonProperty("tts_latency") + private LatencyEvent ttsLatency; + + @JsonProperty("stt_latency") + private LatencyEvent sttLatency; + + @JsonProperty("interrupt") + private InterruptEvent interrupt; + + @JsonProperty("last_token_received") + private LastTokenReceivedEvent lastTokenReceived; + + @JsonProperty("configurations") + private ConfigurationEvent configurations; + + @JsonProperty("language_changed") + private LanguageChangedEvent languageChanged; + + @JsonProperty("call_wrap_up") + private CallWrapUpEvent callWrapUp; + + @JsonProperty("error") + private ErrorEvent error; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("session_id") + public Builder sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sequence_number") + public Builder sequenceNumber(Integer sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("tts_latency") + public Builder ttsLatency(LatencyEvent ttsLatency) { + this.ttsLatency = ttsLatency; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("stt_latency") + public Builder sttLatency(LatencyEvent sttLatency) { + this.sttLatency = sttLatency; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("interrupt") + public Builder interrupt(InterruptEvent interrupt) { + this.interrupt = interrupt; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_token_received") + public Builder lastTokenReceived( + LastTokenReceivedEvent lastTokenReceived + ) { + this.lastTokenReceived = lastTokenReceived; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurations") + public Builder configurations(ConfigurationEvent configurations) { + this.configurations = configurations; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("language_changed") + public Builder languageChanged( + LanguageChangedEvent languageChanged + ) { + this.languageChanged = languageChanged; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("call_wrap_up") + public Builder callWrapUp(CallWrapUpEvent callWrapUp) { + this.callWrapUp = callWrapUp; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error") + public Builder error(ErrorEvent error) { + this.error = error; + return this; + } + + public InsightsV1CallEventConversationRelayData build() { + return new InsightsV1CallEventConversationRelayData(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + InsightsV1CallEventConversationRelayData other = + (InsightsV1CallEventConversationRelayData) o; + return ( + Objects.equals(sessionId, other.sessionId) && + Objects.equals(sequenceNumber, other.sequenceNumber) && + Objects.equals(ttsLatency, other.ttsLatency) && + Objects.equals(sttLatency, other.sttLatency) && + Objects.equals(interrupt, other.interrupt) && + Objects.equals(lastTokenReceived, other.lastTokenReceived) && + Objects.equals(configurations, other.configurations) && + Objects.equals(languageChanged, other.languageChanged) && + Objects.equals(callWrapUp, other.callWrapUp) && + Objects.equals(error, other.error) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + sessionId, + sequenceNumber, + ttsLatency, + sttLatency, + interrupt, + lastTokenReceived, + configurations, + languageChanged, + callWrapUp, + error + ); + } + } + + @JsonDeserialize(builder = LatencyEvent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class LatencyEvent { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("latency_ms") + @Getter + private final Integer latencyMs; + + private LatencyEvent(Builder builder) { + this.latencyMs = builder.latencyMs; + } + + public static Builder builder() { + return new Builder(); + } + + public static LatencyEvent fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LatencyEvent.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("latency_ms") + private Integer latencyMs; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("latency_ms") + public Builder latencyMs(Integer latencyMs) { + this.latencyMs = latencyMs; + return this; + } + + public LatencyEvent build() { + return new LatencyEvent(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + LatencyEvent other = (LatencyEvent) o; + return Objects.equals(latencyMs, other.latencyMs); + } + + @Override + public int hashCode() { + return Objects.hash(latencyMs); + } + } + /** * Converts a JSON String into a Event object using the provided ObjectMapper. * @@ -159,6 +1136,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final Object clientEdge; + @Getter + private final InsightsV1CallEventConversationRelayData conversationRelayData; + @Getter private final Event.TwilioEdge edge; @@ -186,6 +1166,9 @@ private Event( @JsonProperty("call_sid") final String callSid, @JsonProperty("carrier_edge") final Object carrierEdge, @JsonProperty("client_edge") final Object clientEdge, + @JsonProperty( + "conversation_relay_data" + ) final InsightsV1CallEventConversationRelayData conversationRelayData, @JsonProperty("edge") final Event.TwilioEdge edge, @JsonProperty("group") final String group, @JsonProperty("level") final Event.Level level, @@ -198,6 +1181,7 @@ private Event( this.callSid = callSid; this.carrierEdge = carrierEdge; this.clientEdge = clientEdge; + this.conversationRelayData = conversationRelayData; this.edge = edge; this.group = group; this.level = level; @@ -223,6 +1207,10 @@ public boolean equals(final Object o) { Objects.equals(callSid, other.callSid) && Objects.equals(carrierEdge, other.carrierEdge) && Objects.equals(clientEdge, other.clientEdge) && + Objects.equals( + conversationRelayData, + other.conversationRelayData + ) && Objects.equals(edge, other.edge) && Objects.equals(group, other.group) && Objects.equals(level, other.level) && @@ -240,6 +1228,7 @@ public int hashCode() { callSid, carrierEdge, clientEdge, + conversationRelayData, edge, group, level, 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 2b79db1105..09947bc14e 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 @@ -354,9 +354,9 @@ private ConferenceParticipant( @JsonProperty( "call_type" ) final ConferenceParticipant.CallType callType, - @JsonProperty("coached_participants") final List< - String - > coachedParticipants, + @JsonProperty( + "coached_participants" + ) final List coachedParticipants, @JsonProperty( "conference_region" ) final ConferenceParticipant.Region conferenceRegion, diff --git a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantFetcher.java b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantFetcher.java index 520c891469..dbcd04bad6 100644 --- a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class ConferenceParticipantFetcher - extends Fetcher { + extends Fetcher +{ private String pathConferenceSid; private String pathParticipantSid; @@ -59,16 +60,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Conferences/{ConferenceSid}/Participants/{ParticipantSid}"; - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantReader.java b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantReader.java index 8632d43a37..c7281d51f9 100644 --- a/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantReader.java +++ b/src/main/java/com/twilio/rest/insights/v1/conference/ConferenceParticipantReader.java @@ -93,11 +93,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Conferences/{ConferenceSid}/Participants"; - path = - path.replace( - "{" + "ConferenceSid" + "}", - this.pathConferenceSid.toString() - ); + path = path.replace( + "{" + "ConferenceSid" + "}", + this.pathConferenceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v1/room/ParticipantFetcher.java b/src/main/java/com/twilio/rest/insights/v1/room/ParticipantFetcher.java index 02ee0fc85d..6875012c74 100644 --- a/src/main/java/com/twilio/rest/insights/v1/room/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v1/room/ParticipantFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v2/Inbound.java b/src/main/java/com/twilio/rest/insights/v2/Inbound.java index 950c23e075..c52b0a1a1f 100644 --- a/src/main/java/com/twilio/rest/insights/v2/Inbound.java +++ b/src/main/java/com/twilio/rest/insights/v2/Inbound.java @@ -79,6 +79,7 @@ public static ReportStatus forValue(final String value) { } @JsonDeserialize(builder = PhoneNumberReportFilter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PhoneNumberReportFilter { @@ -109,6 +110,7 @@ public static PhoneNumberReportFilter fromJson( return mapper.readValue(jsonString, PhoneNumberReportFilter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -163,6 +165,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2InboundPhoneNumberReportCallStatePercentage.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2InboundPhoneNumberReportCallStatePercentage { @@ -216,6 +219,7 @@ public static InsightsV2InboundPhoneNumberReportCallStatePercentage fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -306,6 +310,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreatePhoneNumbersReportRequestTimeRange.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreatePhoneNumbersReportRequestTimeRange { @@ -345,6 +350,7 @@ public static InsightsV2CreatePhoneNumbersReportRequestTimeRange fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -416,6 +422,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportFilter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportFilter { @@ -446,6 +453,7 @@ public static ReportFilter fromJson( return mapper.readValue(jsonString, ReportFilter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -500,6 +508,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreatePhoneNumbersReportRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreatePhoneNumbersReportRequest { @@ -539,6 +548,7 @@ public static InsightsV2CreatePhoneNumbersReportRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -605,6 +615,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportMetadata.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportMetadata { @@ -645,6 +656,7 @@ public static ReportMetadata fromJson( return mapper.readValue(jsonString, ReportMetadata.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/insights/v2/InboundReader.java b/src/main/java/com/twilio/rest/insights/v2/InboundReader.java index b003948af0..5e244a5b5a 100644 --- a/src/main/java/com/twilio/rest/insights/v2/InboundReader.java +++ b/src/main/java/com/twilio/rest/insights/v2/InboundReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Voice/Reports/PhoneNumbers/Inbound/{reportId}"; - path = - path.replace("{" + "reportId" + "}", this.pathReportId.toString()); + path = path.replace( + "{" + "reportId" + "}", + this.pathReportId.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v2/Outbound.java b/src/main/java/com/twilio/rest/insights/v2/Outbound.java index 0ba1ebc8d2..16d8fc0f73 100644 --- a/src/main/java/com/twilio/rest/insights/v2/Outbound.java +++ b/src/main/java/com/twilio/rest/insights/v2/Outbound.java @@ -80,6 +80,7 @@ public static ReportStatus forValue(final String value) { } @JsonDeserialize(builder = PhoneNumberReportFilter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PhoneNumberReportFilter { @@ -110,6 +111,7 @@ public static PhoneNumberReportFilter fromJson( return mapper.readValue(jsonString, PhoneNumberReportFilter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -164,6 +166,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection { @@ -206,6 +209,7 @@ public static InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection fromJ ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -286,6 +290,7 @@ public int hashCode() { } @JsonDeserialize(builder = CountyCarrierValue.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CountyCarrierValue { @@ -316,6 +321,7 @@ public static CountyCarrierValue fromJson( return mapper.readValue(jsonString, CountyCarrierValue.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -368,6 +374,7 @@ public int hashCode() { } @JsonDeserialize(builder = CountyCarrierValueCarriers.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CountyCarrierValueCarriers { @@ -413,6 +420,7 @@ public static CountyCarrierValueCarriers fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -499,6 +507,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreatePhoneNumbersReportRequestTimeRange.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreatePhoneNumbersReportRequestTimeRange { @@ -538,6 +547,7 @@ public static InsightsV2CreatePhoneNumbersReportRequestTimeRange fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -609,6 +619,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportFilter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportFilter { @@ -639,6 +650,7 @@ public static ReportFilter fromJson( return mapper.readValue(jsonString, ReportFilter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -693,6 +705,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreatePhoneNumbersReportRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreatePhoneNumbersReportRequest { @@ -732,6 +745,7 @@ public static InsightsV2CreatePhoneNumbersReportRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -798,6 +812,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportMetadata.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportMetadata { @@ -838,6 +853,7 @@ public static ReportMetadata fromJson( return mapper.readValue(jsonString, ReportMetadata.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -919,6 +935,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2OutboundPhoneNumberReportCallStatePercentage.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2OutboundPhoneNumberReportCallStatePercentage { @@ -972,6 +989,7 @@ public static InsightsV2OutboundPhoneNumberReportCallStatePercentage fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1175,9 +1193,9 @@ private Outbound( @JsonProperty( "answering_machine_detection" ) final InsightsV2OutboundPhoneNumberReportAnsweringMachineDetection answeringMachineDetection, - @JsonProperty("blocked_calls_by_carrier") final List< - CountyCarrierValue - > blockedCallsByCarrier, + @JsonProperty( + "blocked_calls_by_carrier" + ) final List blockedCallsByCarrier, @JsonProperty("call_answer_score") final Float callAnswerScore, @JsonProperty( "call_state_percentage" diff --git a/src/main/java/com/twilio/rest/insights/v2/OutboundReader.java b/src/main/java/com/twilio/rest/insights/v2/OutboundReader.java index 2bf266aa00..71df046deb 100644 --- a/src/main/java/com/twilio/rest/insights/v2/OutboundReader.java +++ b/src/main/java/com/twilio/rest/insights/v2/OutboundReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Voice/Reports/PhoneNumbers/Outbound/{reportId}"; - path = - path.replace("{" + "reportId" + "}", this.pathReportId.toString()); + path = path.replace( + "{" + "reportId" + "}", + this.pathReportId.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v2/Report.java b/src/main/java/com/twilio/rest/insights/v2/Report.java index f01dc0913d..7b87aa9b5f 100644 --- a/src/main/java/com/twilio/rest/insights/v2/Report.java +++ b/src/main/java/com/twilio/rest/insights/v2/Report.java @@ -80,6 +80,7 @@ public static ReportStatus forValue(final String value) { } @JsonDeserialize(builder = CountyCarrierValue.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CountyCarrierValue { @@ -110,6 +111,7 @@ public static CountyCarrierValue fromJson( return mapper.readValue(jsonString, CountyCarrierValue.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -162,6 +164,7 @@ public int hashCode() { } @JsonDeserialize(builder = CountyCarrierValueCarriers.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CountyCarrierValueCarriers { @@ -207,6 +210,7 @@ public static CountyCarrierValueCarriers fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -293,6 +297,7 @@ public int hashCode() { @JsonDeserialize( builder = AccountReportAnsweringMachineDetection.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportAnsweringMachineDetection { @@ -333,6 +338,7 @@ public static AccountReportAnsweringMachineDetection fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -411,6 +417,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportCallType.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportCallType { @@ -459,6 +466,7 @@ public static AccountReportCallType fromJson( return mapper.readValue(jsonString, AccountReportCallType.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -544,6 +552,7 @@ public int hashCode() { } @JsonDeserialize(builder = VoiceIntegrityCallsPerBundle.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceIntegrityCallsPerBundle { @@ -595,6 +604,7 @@ public static VoiceIntegrityCallsPerBundle fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -690,6 +700,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportCallDirection.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportCallDirection { @@ -723,6 +734,7 @@ public static AccountReportCallDirection fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -775,6 +787,7 @@ public int hashCode() { } @JsonDeserialize(builder = StirShaken.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class StirShaken { @@ -811,6 +824,7 @@ public static StirShaken fromJson( return mapper.readValue(jsonString, StirShaken.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -874,6 +888,7 @@ public int hashCode() { } @JsonDeserialize(builder = StirShakenCallCount.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class StirShakenCallCount { @@ -910,6 +925,7 @@ public static StirShakenCallCount fromJson( return mapper.readValue(jsonString, StirShakenCallCount.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -975,6 +991,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreateAccountReportRequestTimeRange.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreateAccountReportRequestTimeRange { @@ -1012,6 +1029,7 @@ public static InsightsV2CreateAccountReportRequestTimeRange fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1081,6 +1099,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportFilter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportFilter { @@ -1111,6 +1130,7 @@ public static ReportFilter fromJson( return mapper.readValue(jsonString, ReportFilter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1163,6 +1183,7 @@ public int hashCode() { } @JsonDeserialize(builder = BrandedUseCaseDetail.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class BrandedUseCaseDetail { @@ -1217,6 +1238,7 @@ public static BrandedUseCaseDetail fromJson( return mapper.readValue(jsonString, BrandedUseCaseDetail.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1323,6 +1345,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportNetworkIssuesSdk.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportNetworkIssuesSdk { @@ -1368,6 +1391,7 @@ public static AccountReportNetworkIssuesSdk fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1461,6 +1485,7 @@ public int hashCode() { @JsonDeserialize( builder = AccountReportNetworkIssuesTwilioGateway.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportNetworkIssuesTwilioGateway { @@ -1500,6 +1525,7 @@ public static AccountReportNetworkIssuesTwilioGateway fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1578,6 +1604,7 @@ public int hashCode() { @JsonDeserialize( builder = AccountReportKYTOutboundCarrierCalling.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportKYTOutboundCarrierCalling { @@ -1656,6 +1683,7 @@ public static AccountReportKYTOutboundCarrierCalling fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1824,6 +1852,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReport.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReport { @@ -1932,6 +1961,7 @@ public static AccountReport fromJson( return mapper.readValue(jsonString, AccountReport.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2166,6 +2196,7 @@ public int hashCode() { } @JsonDeserialize(builder = StirShakenAnswerRate.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class StirShakenAnswerRate { @@ -2202,6 +2233,7 @@ public static StirShakenAnswerRate fromJson( return mapper.readValue(jsonString, StirShakenAnswerRate.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2267,6 +2299,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsV2CreateAccountReportRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsV2CreateAccountReportRequest { @@ -2300,6 +2333,7 @@ public static InsightsV2CreateAccountReportRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2355,6 +2389,7 @@ public int hashCode() { } @JsonDeserialize(builder = VoiceIntegrity.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceIntegrity { @@ -2391,6 +2426,7 @@ public static VoiceIntegrity fromJson( return mapper.readValue(jsonString, VoiceIntegrity.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2460,6 +2496,7 @@ public int hashCode() { } @JsonDeserialize(builder = StirShakenPercentage.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class StirShakenPercentage { @@ -2496,6 +2533,7 @@ public static StirShakenPercentage fromJson( return mapper.readValue(jsonString, StirShakenPercentage.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2559,6 +2597,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportKYT.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportKYT { @@ -2583,6 +2622,7 @@ public static AccountReportKYT fromJson( return mapper.readValue(jsonString, AccountReportKYT.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2614,11 +2654,9 @@ public boolean equals(final Object o) { } AccountReportKYT other = (AccountReportKYT) o; - return ( - Objects.equals( - outboundCarrierCalling, - other.outboundCarrierCalling - ) + return Objects.equals( + outboundCarrierCalling, + other.outboundCarrierCalling ); } @@ -2629,6 +2667,7 @@ public int hashCode() { } @JsonDeserialize(builder = BrandedCalling.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class BrandedCalling { @@ -2683,6 +2722,7 @@ public static BrandedCalling fromJson( return mapper.readValue(jsonString, BrandedCalling.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2789,6 +2829,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportCallState.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportCallState { @@ -2837,6 +2878,7 @@ public static AccountReportCallState fromJson( return mapper.readValue(jsonString, AccountReportCallState.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2922,6 +2964,7 @@ public int hashCode() { } @JsonDeserialize(builder = AccountReportNetworkIssues.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class AccountReportNetworkIssues { @@ -2955,6 +2998,7 @@ public static AccountReportNetworkIssues fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -3009,6 +3053,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReportMetadata.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReportMetadata { @@ -3049,6 +3094,7 @@ public static ReportMetadata fromJson( return mapper.readValue(jsonString, ReportMetadata.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/insights/v2/ReportFetcher.java b/src/main/java/com/twilio/rest/insights/v2/ReportFetcher.java index fc9445039c..d2e314e48a 100644 --- a/src/main/java/com/twilio/rest/insights/v2/ReportFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v2/ReportFetcher.java @@ -38,8 +38,10 @@ public ReportFetcher(final String pathReportId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Voice/Reports/{reportId}"; - path = - path.replace("{" + "reportId" + "}", this.pathReportId.toString()); + path = path.replace( + "{" + "reportId" + "}", + this.pathReportId.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/insights/v3/Metadata.java b/src/main/java/com/twilio/rest/insights/v3/Metadata.java index 6f83de4c8a..1c3b8b1e3b 100644 --- a/src/main/java/com/twilio/rest/insights/v3/Metadata.java +++ b/src/main/java/com/twilio/rest/insights/v3/Metadata.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio - Insights - * Insights Domain V3 API. + * The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -118,7 +118,7 @@ public boolean equals(final Object o) { return false; } UpdateMetadataResponse other = (UpdateMetadataResponse) o; - return (true); + return true; } @Override @@ -199,7 +199,7 @@ public boolean equals(final Object o) { return false; } ListMetadataResponse other = (ListMetadataResponse) o; - return (true); + return true; } @Override @@ -261,9 +261,9 @@ public static class FetchMetadataResponse extends Resource { @JsonCreator private FetchMetadataResponse( - @JsonProperty("cubes") final List< - InsightsMetadataResponseCubes - > cubes, + @JsonProperty( + "cubes" + ) final List cubes, @JsonProperty("domain") final String domain ) { this.cubes = cubes; @@ -314,6 +314,7 @@ public static MetadataFetcher fetcher() { } @JsonDeserialize(builder = InsightsMetadataResponseCubes.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsMetadataResponseCubes { @@ -363,6 +364,7 @@ public static InsightsMetadataResponseCubes fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -381,12 +383,12 @@ public static class Builder { @JsonCreator public Builder( @JsonProperty("name") final String name, - @JsonProperty("measures") final List< - InsightsMetadataResponseCubesMeasures - > measures, - @JsonProperty("dimensions") final List< - InsightsMetadataResponseCubesDimensions - > dimensions + @JsonProperty( + "measures" + ) final List measures, + @JsonProperty( + "dimensions" + ) final List dimensions ) { this.name = name; this.measures = measures; @@ -434,6 +436,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsMetadataResponseCubesDimensions.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsMetadataResponseCubesDimensions { @@ -473,6 +476,7 @@ public static InsightsMetadataResponseCubesDimensions fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -534,6 +538,7 @@ public int hashCode() { @JsonDeserialize( builder = InsightsMetadataResponseCubesMeasures.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsMetadataResponseCubesMeasures { @@ -579,6 +584,7 @@ public static InsightsMetadataResponseCubesMeasures fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/insights/v3/MetadataFetcher.java b/src/main/java/com/twilio/rest/insights/v3/MetadataFetcher.java index 9233ea4d54..b20b119889 100644 --- a/src/main/java/com/twilio/rest/insights/v3/MetadataFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v3/MetadataFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio - Insights - * Insights Domain V3 API. + * The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -49,16 +48,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/insights/v3/Query.java b/src/main/java/com/twilio/rest/insights/v3/Query.java index 9dfb0c2076..3f2703b966 100644 --- a/src/main/java/com/twilio/rest/insights/v3/Query.java +++ b/src/main/java/com/twilio/rest/insights/v3/Query.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio - Insights - * Insights Domain V3 API. + * The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -136,7 +136,7 @@ public boolean equals(final Object o) { return false; } UpdateQueryResponse other = (UpdateQueryResponse) o; - return (true); + return true; } @Override @@ -214,7 +214,7 @@ public boolean equals(final Object o) { return false; } ListQueryResponse other = (ListQueryResponse) o; - return (true); + return true; } @Override @@ -380,6 +380,7 @@ public static Direction forValue(final String value) { } @JsonDeserialize(builder = InsightsQueryRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class InsightsQueryRequest { @@ -410,6 +411,7 @@ public static InsightsQueryRequest fromJson( return mapper.readValue(jsonString, InsightsQueryRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -460,6 +462,7 @@ public int hashCode() { } @JsonDeserialize(builder = QueryDefinition.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class QueryDefinition { @@ -502,6 +505,7 @@ public static QueryDefinition fromJson( return mapper.readValue(jsonString, QueryDefinition.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -576,6 +580,7 @@ public int hashCode() { } @JsonDeserialize(builder = PaginationMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PaginationMeta { @@ -621,6 +626,7 @@ public static PaginationMeta fromJson( return mapper.readValue(jsonString, PaginationMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -690,6 +696,7 @@ public int hashCode() { } @JsonDeserialize(builder = QueryDefinitionFilters.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class QueryDefinitionFilters { @@ -722,6 +729,7 @@ public static QueryDefinitionFilters fromJson( return mapper.readValue(jsonString, QueryDefinitionFilters.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -733,9 +741,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("expressions") final List< - QueryDefinitionFiltersExpressions - > expressions + @JsonProperty( + "expressions" + ) final List expressions ) { this.expressions = expressions; } @@ -776,6 +784,7 @@ public int hashCode() { } @JsonDeserialize(builder = QueryDefinitionFiltersExpressions.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class QueryDefinitionFiltersExpressions { @@ -815,6 +824,7 @@ public static QueryDefinitionFiltersExpressions fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -874,6 +884,7 @@ public int hashCode() { } @JsonDeserialize(builder = QueryDefinitionOrderBy.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class QueryDefinitionOrderBy { @@ -904,6 +915,7 @@ public static QueryDefinitionOrderBy fromJson( return mapper.readValue(jsonString, QueryDefinitionOrderBy.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/insights/v3/QueryCreator.java b/src/main/java/com/twilio/rest/insights/v3/QueryCreator.java index dbad282385..78977b8f1f 100644 --- a/src/main/java/com/twilio/rest/insights/v3/QueryCreator.java +++ b/src/main/java/com/twilio/rest/insights/v3/QueryCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio - Insights - * Insights Domain V3 API. + * The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/insights/v3/QueryFetcher.java b/src/main/java/com/twilio/rest/insights/v3/QueryFetcher.java index d53adf5c64..928ec7a155 100644 --- a/src/main/java/com/twilio/rest/insights/v3/QueryFetcher.java +++ b/src/main/java/com/twilio/rest/insights/v3/QueryFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio - Insights - * Insights Domain V3 API. + * The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -61,16 +60,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentCreator.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentCreator.java index 83a1d9ef67..ee3b4c32a1 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentCreator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentCreator.java @@ -43,16 +43,14 @@ public OperatorAttachmentCreator( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Operators/{OperatorSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "OperatorSid" + "}", - this.pathOperatorSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "OperatorSid" + "}", + this.pathOperatorSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentDeleter.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentDeleter.java index 5e1db60c7a..6e4bb3a83d 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentDeleter.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentDeleter.java @@ -44,16 +44,14 @@ public OperatorAttachmentDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Operators/{OperatorSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "OperatorSid" + "}", - this.pathOperatorSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "OperatorSid" + "}", + this.pathOperatorSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentsFetcher.java b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentsFetcher.java index 6b9faeb7c7..bf3c4d0770 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentsFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorAttachmentsFetcher.java @@ -38,11 +38,10 @@ public OperatorAttachmentsFetcher(final String pathServiceSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Operators"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 bb7a5f4a1e..564e7d8180 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/OperatorType.java @@ -246,9 +246,9 @@ private OperatorType( @JsonProperty("output_type") final OperatorType.OutputType outputType, @JsonProperty("provider") final OperatorType.Provider provider, @JsonProperty("sid") final String sid, - @JsonProperty("supported_languages") final List< - String - > supportedLanguages, + @JsonProperty( + "supported_languages" + ) final List supportedLanguages, @JsonProperty("url") final URI url ) { this.availability = availability; 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 e00a7b8b30..51e039c831 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Service.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Service.java @@ -218,9 +218,9 @@ private Service( @JsonProperty("friendly_name") final String friendlyName, @JsonProperty("language_code") final String languageCode, @JsonProperty("media_redaction") final Boolean mediaRedaction, - @JsonProperty("read_only_attached_operator_sids") final List< - String - > readOnlyAttachedOperatorSids, + @JsonProperty( + "read_only_attached_operator_sids" + ) final List readOnlyAttachedOperatorSids, @JsonProperty("sid") final String sid, @JsonProperty("unique_name") final String uniqueName, @JsonProperty("url") final URI url, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResultsFetcher.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResultsFetcher.java index 1c3b2cf520..986f874ff6 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResultsFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedOperatorResultsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class EncryptedOperatorResultsFetcher - extends Fetcher { + extends Fetcher +{ private String pathTranscriptSid; private Boolean redacted; @@ -48,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Transcripts/{TranscriptSid}/OperatorResults/Encrypted"; - path = - path.replace( - "{" + "TranscriptSid" + "}", - this.pathTranscriptSid.toString() - ); + path = path.replace( + "{" + "TranscriptSid" + "}", + this.pathTranscriptSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentencesFetcher.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentencesFetcher.java index 2a5b62648a..7b1fb481a1 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentencesFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/EncryptedSentencesFetcher.java @@ -46,11 +46,10 @@ public EncryptedSentencesFetcher setRedacted(final Boolean redacted) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Transcripts/{TranscriptSid}/Sentences/Encrypted"; - path = - path.replace( - "{" + "TranscriptSid" + "}", - this.pathTranscriptSid.toString() - ); + path = path.replace( + "{" + "TranscriptSid" + "}", + this.pathTranscriptSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultFetcher.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultFetcher.java index bf8d8da526..83f8a27d65 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultFetcher.java @@ -52,16 +52,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Transcripts/{TranscriptSid}/OperatorResults/{OperatorSid}"; - path = - path.replace( - "{" + "TranscriptSid" + "}", - this.pathTranscriptSid.toString() - ); - path = - path.replace( - "{" + "OperatorSid" + "}", - this.pathOperatorSid.toString() - ); + path = path.replace( + "{" + "TranscriptSid" + "}", + this.pathTranscriptSid.toString() + ); + path = path.replace( + "{" + "OperatorSid" + "}", + this.pathOperatorSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultReader.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultReader.java index e1e5daf08f..5dda3cb324 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultReader.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResultReader.java @@ -79,11 +79,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Transcripts/{TranscriptSid}/OperatorResults"; - path = - path.replace( - "{" + "TranscriptSid" + "}", - this.pathTranscriptSid.toString() - ); + path = path.replace( + "{" + "TranscriptSid" + "}", + this.pathTranscriptSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/SentenceReader.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/SentenceReader.java index 43d3335063..5ecb754602 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/SentenceReader.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/SentenceReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Transcripts/{TranscriptSid}/Sentences"; - path = - path.replace( - "{" + "TranscriptSid" + "}", - this.pathTranscriptSid.toString() - ); + path = path.replace( + "{" + "TranscriptSid" + "}", + this.pathTranscriptSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/intelligence/v3/Configuration.java b/src/main/java/com/twilio/rest/intelligence/v3/Configuration.java index e418de20b2..450c135f21 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/Configuration.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/Configuration.java @@ -628,6 +628,7 @@ public static On forValue(final String value) { } @JsonDeserialize(builder = Operator.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Operator { @@ -662,6 +663,7 @@ public static Operator fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Operator.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -723,6 +725,7 @@ public int hashCode() { } @JsonDeserialize(builder = Context.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Context { @@ -751,6 +754,7 @@ public static Context fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Context.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -803,6 +807,7 @@ public int hashCode() { } @JsonDeserialize(builder = Action.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Action { @@ -841,6 +846,7 @@ public static Action fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Action.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -894,6 +900,7 @@ public int hashCode() { } @JsonDeserialize(builder = RuleCreationRequestPayload.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RuleCreationRequestPayload { @@ -942,6 +949,7 @@ public static RuleCreationRequestPayload fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1011,6 +1019,7 @@ public int hashCode() { } @JsonDeserialize(builder = ContextKnowledge.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ContextKnowledge { @@ -1035,6 +1044,7 @@ public static ContextKnowledge fromJson( return mapper.readValue(jsonString, ContextKnowledge.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1062,7 +1072,7 @@ public boolean equals(final Object o) { } ContextKnowledge other = (ContextKnowledge) o; - return (Objects.equals(bases, other.bases)); + return Objects.equals(bases, other.bases); } @Override @@ -1072,6 +1082,7 @@ public int hashCode() { } @JsonDeserialize(builder = UpdateConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateConfigurationRequest { @@ -1114,6 +1125,7 @@ public static UpdateConfigurationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1129,9 +1141,9 @@ public static class Builder { @JsonCreator public Builder( @JsonProperty("displayName") final String displayName, - @JsonProperty("rules") final List< - RuleUpdateRequestPayload - > rules + @JsonProperty( + "rules" + ) final List rules ) { this.displayName = displayName; this.rules = rules; @@ -1174,6 +1186,7 @@ public int hashCode() { } @JsonDeserialize(builder = Trigger.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Trigger { @@ -1202,6 +1215,7 @@ public static Trigger fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Trigger.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1252,6 +1266,7 @@ public int hashCode() { } @JsonDeserialize(builder = ContextMemory.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ContextMemory { @@ -1276,6 +1291,7 @@ public static ContextMemory fromJson( return mapper.readValue(jsonString, ContextMemory.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1305,7 +1321,7 @@ public boolean equals(final Object o) { } ContextMemory other = (ContextMemory) o; - return (Objects.equals(enabled, other.enabled)); + return Objects.equals(enabled, other.enabled); } @Override @@ -1315,6 +1331,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListConfigurations200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListConfigurations200ResponseMeta { @@ -1363,6 +1380,7 @@ public static ListConfigurations200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1433,6 +1451,7 @@ public int hashCode() { } @JsonDeserialize(builder = CreateConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateConfigurationRequest { @@ -1475,6 +1494,7 @@ public static CreateConfigurationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1490,9 +1510,9 @@ public static class Builder { @JsonCreator public Builder( @JsonProperty("displayName") final String displayName, - @JsonProperty("rules") final List< - RuleCreationRequestPayload - > rules + @JsonProperty( + "rules" + ) final List rules ) { this.displayName = displayName; this.rules = rules; @@ -1535,6 +1555,7 @@ public int hashCode() { } @JsonDeserialize(builder = TriggerParameters.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TriggerParameters { @@ -1559,6 +1580,7 @@ public static TriggerParameters fromJson( return mapper.readValue(jsonString, TriggerParameters.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1588,7 +1610,7 @@ public boolean equals(final Object o) { } TriggerParameters other = (TriggerParameters) o; - return (Objects.equals(count, other.count)); + return Objects.equals(count, other.count); } @Override @@ -1598,6 +1620,7 @@ public int hashCode() { } @JsonDeserialize(builder = IntelligenceConfiguration.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IntelligenceConfiguration { @@ -1687,6 +1710,7 @@ public static IntelligenceConfiguration fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1792,6 +1816,7 @@ public int hashCode() { } @JsonDeserialize(builder = Rule.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Rule { @@ -1843,6 +1868,7 @@ public static Rule fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Rule.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1913,6 +1939,7 @@ public int hashCode() { } @JsonDeserialize(builder = RuleUpdateRequestPayload.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RuleUpdateRequestPayload { @@ -1964,6 +1991,7 @@ public static RuleUpdateRequestPayload fromJson( return mapper.readValue(jsonString, RuleUpdateRequestPayload.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationCreator.java b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationCreator.java index c157d3dd2f..45fc2725cc 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class ConfigurationCreator - extends Creator { + extends Creator +{ private Configuration.CreateConfigurationRequest createConfigurationRequest; @@ -93,9 +94,9 @@ public Configuration.CreateConfigurationResponse create( } @Override - public TwilioResponse< - Configuration.CreateConfigurationResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.CreateConfigurationResponse content = Configuration.CreateConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationDeleter.java b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationDeleter.java index 42b79ed124..6050507c81 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationDeleter.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationDeleter.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -58,16 +57,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationFetcher.java b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationFetcher.java index abd3e11940..fca7ac2aa0 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class ConfigurationFetcher - extends Fetcher { + extends Fetcher +{ private String pathId; @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -93,9 +83,9 @@ public Configuration.FetchConfigurationResponse fetch( } @Override - public TwilioResponse< - Configuration.FetchConfigurationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.FetchConfigurationResponse content = Configuration.FetchConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationReader.java b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationReader.java index 6e2ba86362..97608c0a7e 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationReader.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationReader.java @@ -36,7 +36,8 @@ import java.io.InputStream; public class ConfigurationReader - extends Reader { + extends Reader +{ private Integer pageSize; private String pageToken; @@ -53,9 +54,9 @@ public ConfigurationReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - Configuration.ListConfigurationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationUpdater.java b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationUpdater.java index a9bea9dd6e..c64c40fc69 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConfigurationUpdater.java @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -31,7 +30,8 @@ import java.io.InputStream; public class ConfigurationUpdater - extends Updater { + extends Updater +{ private String pathId; private Configuration.UpdateConfigurationRequest updateConfigurationRequest; @@ -72,16 +72,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -109,9 +99,9 @@ public Configuration.UpdateConfigurationResponse update( } @Override - public TwilioResponse< - Configuration.UpdateConfigurationResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Configuration.UpdateConfigurationResponse content = Configuration.UpdateConfigurationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/Conversation.java b/src/main/java/com/twilio/rest/intelligence/v3/Conversation.java index 45607a58e0..2d862c0fff 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/Conversation.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/Conversation.java @@ -122,7 +122,7 @@ public boolean equals(final Object o) { return false; } UpdateConversationResponse other = (UpdateConversationResponse) o; - return (true); + return true; } @Override @@ -222,13 +222,13 @@ private ListConversationResponse( ) final String conversationConfigurationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, - @JsonProperty("intelligenceConfigurationIds") final List< - String - > intelligenceConfigurationIds, + @JsonProperty( + "intelligenceConfigurationIds" + ) final List intelligenceConfigurationIds, @JsonProperty("name") final String name, - @JsonProperty("operatorResultIds") final List< - String - > operatorResultIds, + @JsonProperty( + "operatorResultIds" + ) final List operatorResultIds, @JsonProperty("participants") final List participants, @JsonProperty( "status" @@ -406,21 +406,21 @@ private FetchConversationResponse( @JsonProperty("accountId") final String accountId, @JsonProperty("channelIds") final List channelIds, @JsonProperty("channels") final List channels, - @JsonProperty("communications") final List< - Communication - > communications, + @JsonProperty( + "communications" + ) final List communications, @JsonProperty( "conversationConfigurationId" ) final String conversationConfigurationId, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("id") final String id, - @JsonProperty("intelligenceConfigurationIds") final List< - String - > intelligenceConfigurationIds, + @JsonProperty( + "intelligenceConfigurationIds" + ) final List intelligenceConfigurationIds, @JsonProperty("name") final String name, - @JsonProperty("operatorResultIds") final List< - String - > operatorResultIds, + @JsonProperty( + "operatorResultIds" + ) final List operatorResultIds, @JsonProperty("participants") final List participants, @JsonProperty( "status" @@ -646,6 +646,7 @@ public static Channels forValue(final String value) { } @JsonDeserialize(builder = ConversationListItem.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ConversationListItem { @@ -768,6 +769,7 @@ public static ConversationListItem fromJson( return mapper.readValue(jsonString, ConversationListItem.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -825,22 +827,22 @@ public Builder( ) final Conversation.ConversationStatus status, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, - @JsonProperty("intelligenceConfigurationIds") final List< - String - > intelligenceConfigurationIds, + @JsonProperty( + "intelligenceConfigurationIds" + ) final List intelligenceConfigurationIds, @JsonProperty( "conversationConfigurationId" ) final String conversationConfigurationId, - @JsonProperty("channels") final List< - Conversation.Channel - > channels, + @JsonProperty( + "channels" + ) final List channels, @JsonProperty("channelIds") final List channelIds, - @JsonProperty("participants") final List< - Participant - > participants, - @JsonProperty("operatorResultIds") final List< - String - > operatorResultIds + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "operatorResultIds" + ) final List operatorResultIds ) { this.id = id; this.accountId = accountId; @@ -915,6 +917,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListOperators200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListOperators200ResponseMeta { @@ -963,6 +966,7 @@ public static ListOperators200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1033,6 +1037,7 @@ public int hashCode() { } @JsonDeserialize(builder = Participant.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Participant { @@ -1078,6 +1083,7 @@ public static Participant fromJson( return mapper.readValue(jsonString, Participant.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1147,6 +1153,7 @@ public int hashCode() { } @JsonDeserialize(builder = Content.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Content { @@ -1169,6 +1176,7 @@ public static Content fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Content.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1198,7 +1206,7 @@ public boolean equals(final Object o) { } Content other = (Content) o; - return (Objects.equals(text, other.text)); + return Objects.equals(text, other.text); } @Override @@ -1208,6 +1216,7 @@ public int hashCode() { } @JsonDeserialize(builder = Communication.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Communication { @@ -1257,6 +1266,7 @@ public static Communication fromJson( return mapper.readValue(jsonString, Communication.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConversationFetcher.java b/src/main/java/com/twilio/rest/intelligence/v3/ConversationFetcher.java index 8a183e2798..bd96a7cc38 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConversationFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConversationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class ConversationFetcher - extends Fetcher { + extends Fetcher +{ private String pathId; @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -93,9 +83,9 @@ public Conversation.FetchConversationResponse fetch( } @Override - public TwilioResponse< - Conversation.FetchConversationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Conversation.FetchConversationResponse content = Conversation.FetchConversationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/ConversationReader.java b/src/main/java/com/twilio/rest/intelligence/v3/ConversationReader.java index ebf557031a..05c3ea1aec 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/ConversationReader.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/ConversationReader.java @@ -39,7 +39,8 @@ import java.util.List; public class ConversationReader - extends Reader { + extends Reader +{ private Integer pageSize; private String pageToken; @@ -132,9 +133,9 @@ public ConversationReader setOperatorIds(final String operatorIds) { return setOperatorIds(Promoter.listOfOne(operatorIds)); } - public ResourceSetResponse< - Conversation.ListConversationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/Operator.java b/src/main/java/com/twilio/rest/intelligence/v3/Operator.java index 0b6572f538..5cf190efef 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/Operator.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/Operator.java @@ -98,9 +98,9 @@ private CreateOperatorResponse( OperatorParameter > parameters, @JsonProperty("prompt") final String prompt, - @JsonProperty("trainingExamples") final List< - OperatorTrainingExample - > trainingExamples, + @JsonProperty( + "trainingExamples" + ) final List trainingExamples, @JsonProperty("version") final Integer version ) { this.author = author; @@ -228,9 +228,9 @@ private UpdateOperatorResponse( OperatorParameter > parameters, @JsonProperty("prompt") final String prompt, - @JsonProperty("trainingExamples") final List< - OperatorTrainingExample - > trainingExamples, + @JsonProperty( + "trainingExamples" + ) final List trainingExamples, @JsonProperty("version") final Integer version ) { this.author = author; @@ -400,9 +400,9 @@ private ListOperatorResponse( OperatorParameter > parameters, @JsonProperty("prompt") final String prompt, - @JsonProperty("trainingExamples") final List< - OperatorTrainingExample - > trainingExamples, + @JsonProperty( + "trainingExamples" + ) final List trainingExamples, @JsonProperty("version") final Integer version ) { this.author = author; @@ -569,9 +569,9 @@ private FetchOperatorResponse( OperatorParameter > parameters, @JsonProperty("prompt") final String prompt, - @JsonProperty("trainingExamples") final List< - OperatorTrainingExample - > trainingExamples, + @JsonProperty( + "trainingExamples" + ) final List trainingExamples, @JsonProperty("version") final Integer version ) { this.author = author; @@ -743,6 +743,7 @@ public static OperatorAuthorEnum forValue(final String value) { } @JsonDeserialize(builder = OperatorParameter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorParameter { @@ -785,6 +786,7 @@ public static OperatorParameter fromJson( return mapper.readValue(jsonString, OperatorParameter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -857,6 +859,7 @@ public int hashCode() { } @JsonDeserialize(builder = LanguageOperator.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LanguageOperator { @@ -941,6 +944,7 @@ public static LanguageOperator fromJson( return mapper.readValue(jsonString, LanguageOperator.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1110,6 +1114,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListOperators200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListOperators200ResponseMeta { @@ -1158,6 +1163,7 @@ public static ListOperators200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1228,6 +1234,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContext.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContext { @@ -1258,6 +1265,7 @@ public static OperatorContext fromJson( return mapper.readValue(jsonString, OperatorContext.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1310,6 +1318,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContextKnowledge.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContextKnowledge { @@ -1334,6 +1343,7 @@ public static OperatorContextKnowledge fromJson( return mapper.readValue(jsonString, OperatorContextKnowledge.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1363,7 +1373,7 @@ public boolean equals(final Object o) { } OperatorContextKnowledge other = (OperatorContextKnowledge) o; - return (Objects.equals(enabled, other.enabled)); + return Objects.equals(enabled, other.enabled); } @Override @@ -1373,6 +1383,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorTrainingExample.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorTrainingExample { @@ -1403,6 +1414,7 @@ public static OperatorTrainingExample fromJson( return mapper.readValue(jsonString, OperatorTrainingExample.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1450,6 +1462,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContextMemory.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContextMemory { @@ -1474,6 +1487,7 @@ public static OperatorContextMemory fromJson( return mapper.readValue(jsonString, OperatorContextMemory.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1503,7 +1517,7 @@ public boolean equals(final Object o) { } OperatorContextMemory other = (OperatorContextMemory) o; - return (Objects.equals(enabled, other.enabled)); + return Objects.equals(enabled, other.enabled); } @Override diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorDeleter.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorDeleter.java index b7f3b5e77d..0a7c3bee9c 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorDeleter.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorDeleter.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -58,16 +57,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorFetcher.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorFetcher.java index 913ac300d3..cf28b18ca2 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -55,16 +54,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResult.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResult.java index 91ff3909af..45bc8782b1 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResult.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResult.java @@ -123,7 +123,7 @@ public boolean equals(final Object o) { } UpdateOperatorResultResponse other = (UpdateOperatorResultResponse) o; - return (true); + return true; } @Override @@ -498,6 +498,7 @@ public static OperatorResultReader reader() { } @JsonDeserialize(builder = ExtractionResultResultEntities.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExtractionResultResultEntities { @@ -531,6 +532,7 @@ public static ExtractionResultResultEntities fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -579,6 +581,7 @@ public int hashCode() { } @JsonDeserialize(builder = ExtractionResultResult.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExtractionResultResult { @@ -605,6 +608,7 @@ public static ExtractionResultResult fromJson( return mapper.readValue(jsonString, ExtractionResultResult.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -613,9 +617,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("entities") final List< - ExtractionResultResultEntities - > entities + @JsonProperty( + "entities" + ) final List entities ) { this.entities = entities; } @@ -636,7 +640,7 @@ public boolean equals(final Object o) { } ExtractionResultResult other = (ExtractionResultResult) o; - return (Objects.equals(entities, other.entities)); + return Objects.equals(entities, other.entities); } @Override @@ -646,6 +650,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListOperators200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListOperators200ResponseMeta { @@ -694,6 +699,7 @@ public static ListOperators200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -764,6 +770,7 @@ public int hashCode() { } @JsonDeserialize(builder = SystemMetaData.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SystemMetaData { @@ -822,6 +829,7 @@ public static SystemMetaData fromJson( return mapper.readValue(jsonString, SystemMetaData.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -900,6 +908,7 @@ public int hashCode() { } @JsonDeserialize(builder = ExecutionDetailsParticipants.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExecutionDetailsParticipants { @@ -939,6 +948,7 @@ public static ExecutionDetailsParticipants fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1001,6 +1011,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorReference.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorReference { @@ -1041,6 +1052,7 @@ public static OperatorReference fromJson( return mapper.readValue(jsonString, OperatorReference.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1094,6 +1106,7 @@ public int hashCode() { } @JsonDeserialize(builder = ResolvedContextKnowledge.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ResolvedContextKnowledge { @@ -1120,6 +1133,7 @@ public static ResolvedContextKnowledge fromJson( return mapper.readValue(jsonString, ResolvedContextKnowledge.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1128,9 +1142,9 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("sources") final List< - ResolvedContextKnowledgeSources - > sources + @JsonProperty( + "sources" + ) final List sources ) { this.sources = sources; } @@ -1151,7 +1165,7 @@ public boolean equals(final Object o) { } ResolvedContextKnowledge other = (ResolvedContextKnowledge) o; - return (Objects.equals(sources, other.sources)); + return Objects.equals(sources, other.sources); } @Override @@ -1161,6 +1175,7 @@ public int hashCode() { } @JsonDeserialize(builder = IntelligenceConfigurationReference.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IntelligenceConfigurationReference { @@ -1204,6 +1219,7 @@ public static IntelligenceConfigurationReference fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1258,6 +1274,7 @@ public int hashCode() { } @JsonDeserialize(builder = TextResultResult.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TextResultResult { @@ -1282,6 +1299,7 @@ public static TextResultResult fromJson( return mapper.readValue(jsonString, TextResultResult.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1309,7 +1327,7 @@ public boolean equals(final Object o) { } TextResultResult other = (TextResultResult) o; - return (Objects.equals(text, other.text)); + return Objects.equals(text, other.text); } @Override @@ -1319,6 +1337,7 @@ public int hashCode() { } @JsonDeserialize(builder = ExecutionDetails.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExecutionDetails { @@ -1372,6 +1391,7 @@ public static ExecutionDetails fromJson( return mapper.readValue(jsonString, ExecutionDetails.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1397,9 +1417,9 @@ public Builder( "communications" ) final ExecutionDetailsCommunications communications, @JsonProperty("channels") final List channels, - @JsonProperty("participants") final List< - ExecutionDetailsParticipants - > participants + @JsonProperty( + "participants" + ) final List participants ) { this.trigger = trigger; this.communications = communications; @@ -1452,6 +1472,7 @@ public int hashCode() { } @JsonDeserialize(builder = ResolvedContextKnowledgeSources.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ResolvedContextKnowledgeSources { @@ -1488,6 +1509,7 @@ public static ResolvedContextKnowledgeSources fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1538,6 +1560,7 @@ public int hashCode() { @JsonDeserialize( builder = OperatorResultsResponseBaseMetadata.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorResultsResponseBaseMetadata { @@ -1565,6 +1588,7 @@ public static OperatorResultsResponseBaseMetadata fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1595,7 +1619,7 @@ public boolean equals(final Object o) { OperatorResultsResponseBaseMetadata other = (OperatorResultsResponseBaseMetadata) o; - return (Objects.equals(system, other.system)); + return Objects.equals(system, other.system); } @Override @@ -1605,6 +1629,7 @@ public int hashCode() { } @JsonDeserialize(builder = ResolvedContext.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ResolvedContext { @@ -1635,6 +1660,7 @@ public static ResolvedContext fromJson( return mapper.readValue(jsonString, ResolvedContext.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1687,6 +1713,7 @@ public int hashCode() { } @JsonDeserialize(builder = ExecutionDetailsTrigger.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExecutionDetailsTrigger { @@ -1722,6 +1749,7 @@ public static ExecutionDetailsTrigger fromJson( return mapper.readValue(jsonString, ExecutionDetailsTrigger.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1773,6 +1801,7 @@ public int hashCode() { } @JsonDeserialize(builder = ExecutionDetailsCommunications.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ExecutionDetailsCommunications { @@ -1806,6 +1835,7 @@ public static ExecutionDetailsCommunications fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1854,6 +1884,7 @@ public int hashCode() { } @JsonDeserialize(builder = ResolvedContextMemory.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ResolvedContextMemory { @@ -1887,6 +1918,7 @@ public static ResolvedContextMemory fromJson( return mapper.readValue(jsonString, ResolvedContextMemory.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1934,36 +1966,25 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorResultsResponseV1.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorResultsResponseV1 { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("accountId") - @Getter - private final String accountId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("conversationId") - @Getter - private final String conversationId; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("dateCreated") + @JsonProperty("outputFormat") @Getter - private final ZonedDateTime dateCreated; + private final String outputFormat; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("executionDetails") + @JsonProperty("id") @Getter - private final ExecutionDetails executionDetails; + private final String id; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") + @JsonProperty("accountId") @Getter - private final String id; + private final String accountId; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("intelligenceConfiguration") @@ -1971,41 +1992,53 @@ public static class OperatorResultsResponseV1 { private final IntelligenceConfigurationReference intelligenceConfiguration; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("metadata") + @JsonProperty("conversationId") @Getter - private final OperatorResultsResponseBaseMetadata metadata; + private final String conversationId; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("operator") @Getter private final OperatorReference operator; + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("outputFormat") + @JsonProperty("dateCreated") @Getter - private final String outputFormat; + private final ZonedDateTime dateCreated; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("referenceIds") @Getter private final List referenceIds; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("executionDetails") + @Getter + private final ExecutionDetails executionDetails; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("metadata") + @Getter + private final OperatorResultsResponseBaseMetadata metadata; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("result") @Getter private final TextResultResult result; private OperatorResultsResponseV1(Builder builder) { + this.outputFormat = builder.outputFormat; + this.id = builder.id; this.accountId = builder.accountId; + this.intelligenceConfiguration = builder.intelligenceConfiguration; this.conversationId = builder.conversationId; + this.operator = builder.operator; this.dateCreated = builder.dateCreated; + this.referenceIds = builder.referenceIds; this.executionDetails = builder.executionDetails; - this.id = builder.id; - this.intelligenceConfiguration = builder.intelligenceConfiguration; this.metadata = builder.metadata; - this.operator = builder.operator; - this.outputFormat = builder.outputFormat; - this.referenceIds = builder.referenceIds; this.result = builder.result; } @@ -2023,15 +2056,28 @@ public static OperatorResultsResponseV1 fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { + @JsonProperty("outputFormat") + private String outputFormat; + + @JsonProperty("id") + private String id; + @JsonProperty("accountId") private String accountId; + @JsonProperty("intelligenceConfiguration") + private IntelligenceConfigurationReference intelligenceConfiguration; + @JsonProperty("conversationId") private String conversationId; + @JsonProperty("operator") + private OperatorReference operator; + @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @@ -2039,66 +2085,36 @@ public static class Builder { @JsonProperty("dateCreated") private ZonedDateTime dateCreated; + @JsonProperty("referenceIds") + private List referenceIds; + @JsonProperty("executionDetails") private ExecutionDetails executionDetails; - @JsonProperty("id") - private String id; - - @JsonProperty("intelligenceConfiguration") - private IntelligenceConfigurationReference intelligenceConfiguration; - @JsonProperty("metadata") private OperatorResultsResponseBaseMetadata metadata; - @JsonProperty("operator") - private OperatorReference operator; - - @JsonProperty("outputFormat") - private String outputFormat; - - @JsonProperty("referenceIds") - private List referenceIds; - @JsonProperty("result") private TextResultResult result; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("accountId") - public Builder accountId(String accountId) { - this.accountId = accountId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("conversationId") - public Builder conversationId(String conversationId) { - this.conversationId = conversationId; - return this; - } - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("dateCreated") - public Builder dateCreated(ZonedDateTime dateCreated) { - this.dateCreated = dateCreated; + @JsonProperty("outputFormat") + public Builder outputFormat(String outputFormat) { + this.outputFormat = outputFormat; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("executionDetails") - public Builder executionDetails(ExecutionDetails executionDetails) { - this.executionDetails = executionDetails; + @JsonProperty("id") + public Builder id(String id) { + this.id = id; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - public Builder id(String id) { - this.id = id; + @JsonProperty("accountId") + public Builder accountId(String accountId) { + this.accountId = accountId; return this; } @@ -2112,11 +2128,9 @@ public Builder intelligenceConfiguration( } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("metadata") - public Builder metadata( - OperatorResultsResponseBaseMetadata metadata - ) { - this.metadata = metadata; + @JsonProperty("conversationId") + public Builder conversationId(String conversationId) { + this.conversationId = conversationId; return this; } @@ -2127,10 +2141,14 @@ public Builder operator(OperatorReference operator) { return this; } + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("outputFormat") - public Builder outputFormat(String outputFormat) { - this.outputFormat = outputFormat; + @JsonProperty("dateCreated") + public Builder dateCreated(ZonedDateTime dateCreated) { + this.dateCreated = dateCreated; return this; } @@ -2141,6 +2159,22 @@ public Builder referenceIds(List referenceIds) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("executionDetails") + public Builder executionDetails(ExecutionDetails executionDetails) { + this.executionDetails = executionDetails; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("metadata") + public Builder metadata( + OperatorResultsResponseBaseMetadata metadata + ) { + this.metadata = metadata; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("result") public Builder result(TextResultResult result) { @@ -2165,19 +2199,19 @@ public boolean equals(final Object o) { OperatorResultsResponseV1 other = (OperatorResultsResponseV1) o; return ( - Objects.equals(accountId, other.accountId) && - Objects.equals(conversationId, other.conversationId) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(executionDetails, other.executionDetails) && + Objects.equals(outputFormat, other.outputFormat) && Objects.equals(id, other.id) && + Objects.equals(accountId, other.accountId) && Objects.equals( intelligenceConfiguration, other.intelligenceConfiguration ) && - Objects.equals(metadata, other.metadata) && + Objects.equals(conversationId, other.conversationId) && Objects.equals(operator, other.operator) && - Objects.equals(outputFormat, other.outputFormat) && + Objects.equals(dateCreated, other.dateCreated) && Objects.equals(referenceIds, other.referenceIds) && + Objects.equals(executionDetails, other.executionDetails) && + Objects.equals(metadata, other.metadata) && Objects.equals(result, other.result) ); } @@ -2185,16 +2219,16 @@ public boolean equals(final Object o) { @Override public int hashCode() { return Objects.hash( + outputFormat, + id, accountId, + intelligenceConfiguration, conversationId, + operator, dateCreated, + referenceIds, executionDetails, - id, - intelligenceConfiguration, metadata, - operator, - outputFormat, - referenceIds, result ); } diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultDeleter.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultDeleter.java index d20493cac6..fd429ff504 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultDeleter.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultDeleter.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -40,11 +39,10 @@ public OperatorResultDeleter(final String pathOperatorResultId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v3/OperatorResults/{operatorResultId}"; - path = - path.replace( - "{" + "operatorResultId" + "}", - this.pathOperatorResultId.toString() - ); + path = path.replace( + "{" + "operatorResultId" + "}", + this.pathOperatorResultId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -62,16 +60,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultFetcher.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultFetcher.java index 04c09ace09..6325832a38 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class OperatorResultFetcher - extends Fetcher { + extends Fetcher +{ private String pathOperatorResultId; @@ -40,11 +40,10 @@ public OperatorResultFetcher(final String pathOperatorResultId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v3/OperatorResults/{operatorResultId}"; - path = - path.replace( - "{" + "operatorResultId" + "}", - this.pathOperatorResultId.toString() - ); + path = path.replace( + "{" + "operatorResultId" + "}", + this.pathOperatorResultId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -60,16 +59,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -97,9 +86,9 @@ public OperatorResult.FetchOperatorResultResponse fetch( } @Override - public TwilioResponse< - OperatorResult.FetchOperatorResultResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); OperatorResult.FetchOperatorResultResponse content = OperatorResult.FetchOperatorResultResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultReader.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultReader.java index d4fa29d723..1df32b0c01 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultReader.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorResultReader.java @@ -36,7 +36,8 @@ import java.io.InputStream; public class OperatorResultReader - extends Reader { + extends Reader +{ private String conversationId; private String intelligenceConfigurationId; @@ -73,9 +74,9 @@ public OperatorResultReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - OperatorResult.ListOperatorResultResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/intelligence/v3/OperatorUpdater.java b/src/main/java/com/twilio/rest/intelligence/v3/OperatorUpdater.java index 31c5bb75fc..51b40144c5 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/OperatorUpdater.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/OperatorUpdater.java @@ -23,7 +23,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -80,16 +79,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/intelligence/v3/RuleExecution.java b/src/main/java/com/twilio/rest/intelligence/v3/RuleExecution.java new file mode 100644 index 0000000000..3a227f085c --- /dev/null +++ b/src/main/java/com/twilio/rest/intelligence/v3/RuleExecution.java @@ -0,0 +1,482 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio Conversational Intelligence API + * The Conversational Intelligence API includes resources to create and manage intelligence configurations, define and run language operators, and retrieve processed conversations and operator results. * Use the Configurations resource to create and manage intelligence configurations and define rules that control how and when language operators analyze and transform conversations. * Use the Operators resource to create custom language operators or retrieve Twilio-author and custom operators. * Use the Conversations resource to retrieve conversations processed with an intelligence configuration, and the OperatorResults resource to retrieve language operator results for those conversations. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.intelligence.v3; + +import com.fasterxml.jackson.annotation.JsonCreator; +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 com.twilio.base.Resource; +import com.twilio.exception.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; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class RuleExecution extends Resource { + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class CreateRuleExecutionResponse extends Resource { + + @JsonCreator + private CreateRuleExecutionResponse() {} + + public static CreateRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + CreateRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRuleExecutionResponse other = (CreateRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class UpdateRuleExecutionResponse extends Resource { + + @JsonCreator + private UpdateRuleExecutionResponse() {} + + public static UpdateRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + UpdateRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRuleExecutionResponse other = (UpdateRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class DeleteRuleExecutionResponse extends Resource { + + @JsonCreator + private DeleteRuleExecutionResponse() {} + + public static DeleteRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + DeleteRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteRuleExecutionResponse other = (DeleteRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class ListRuleExecutionResponse extends Resource { + + @JsonCreator + private ListRuleExecutionResponse() {} + + public static ListRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + ListRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + ListRuleExecutionResponse other = (ListRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class PatchRuleExecutionResponse extends Resource { + + @JsonCreator + private PatchRuleExecutionResponse() {} + + public static PatchRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + PatchRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchRuleExecutionResponse other = (PatchRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class FetchRuleExecutionResponse extends Resource { + + @JsonCreator + private FetchRuleExecutionResponse() {} + + public static FetchRuleExecutionResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + FetchRuleExecutionResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchRuleExecutionResponse other = (FetchRuleExecutionResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + public static RuleExecutionCreator creator( + final RuleExecution.CreateRuleExecutionRequest createRuleExecutionRequest + ) { + return new RuleExecutionCreator(createRuleExecutionRequest); + } + + @JsonDeserialize(builder = CreateRuleExecutionRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class CreateRuleExecutionRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("intelligenceConfigurationId") + @Getter + private final String intelligenceConfigurationId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("ruleId") + @Getter + private final String ruleId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationId") + @Getter + private final String conversationId; + + private CreateRuleExecutionRequest(Builder builder) { + this.intelligenceConfigurationId = + builder.intelligenceConfigurationId; + this.ruleId = builder.ruleId; + this.conversationId = builder.conversationId; + } + + public static Builder builder( + final String intelligenceConfigurationId, + final String ruleId, + final String conversationId + ) { + return new Builder( + intelligenceConfigurationId, + ruleId, + conversationId + ); + } + + public static CreateRuleExecutionRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + CreateRuleExecutionRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("intelligenceConfigurationId") + private String intelligenceConfigurationId; + + @JsonProperty("ruleId") + private String ruleId; + + @JsonProperty("conversationId") + private String conversationId; + + @JsonCreator + public Builder( + @JsonProperty( + "intelligenceConfigurationId" + ) final String intelligenceConfigurationId, + @JsonProperty("ruleId") final String ruleId, + @JsonProperty("conversationId") final String conversationId + ) { + this.intelligenceConfigurationId = intelligenceConfigurationId; + this.ruleId = ruleId; + this.conversationId = conversationId; + } + + public CreateRuleExecutionRequest build() { + return new CreateRuleExecutionRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + CreateRuleExecutionRequest other = (CreateRuleExecutionRequest) o; + return ( + Objects.equals( + intelligenceConfigurationId, + other.intelligenceConfigurationId + ) && + Objects.equals(ruleId, other.ruleId) && + Objects.equals(conversationId, other.conversationId) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + intelligenceConfigurationId, + ruleId, + conversationId + ); + } + } + + /** + * Converts a JSON String into a RuleExecution object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return RuleExecution object represented by the provided JSON + */ + public static RuleExecution fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, RuleExecution.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a RuleExecution object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return RuleExecution object represented by the provided JSON + */ + public static RuleExecution fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, RuleExecution.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @JsonCreator + private RuleExecution() {} + + @Override + public boolean equals(Object obj) { + return obj != null && obj.getClass() == this.getClass(); + } + + @Override + public int hashCode() { + return 1; + } +} diff --git a/src/main/java/com/twilio/rest/intelligence/v3/RuleExecutionCreator.java b/src/main/java/com/twilio/rest/intelligence/v3/RuleExecutionCreator.java new file mode 100644 index 0000000000..2ff03b8e56 --- /dev/null +++ b/src/main/java/com/twilio/rest/intelligence/v3/RuleExecutionCreator.java @@ -0,0 +1,121 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio Conversational Intelligence API + * The Conversational Intelligence API includes resources to create and manage intelligence configurations, define and run language operators, and retrieve processed conversations and operator results. * Use the Configurations resource to create and manage intelligence configurations and define rules that control how and when language operators analyze and transform conversations. * Use the Operators resource to create custom language operators or retrieve Twilio-author and custom operators. * Use the Conversations resource to retrieve conversations processed with an intelligence configuration, and the OperatorResults resource to retrieve language operator results for those conversations. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.intelligence.v3; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Creator; +import com.twilio.base.TwilioResponse; +import com.twilio.constant.EnumConstants; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class RuleExecutionCreator + extends Creator +{ + + private RuleExecution.CreateRuleExecutionRequest createRuleExecutionRequest; + + public RuleExecutionCreator( + final RuleExecution.CreateRuleExecutionRequest createRuleExecutionRequest + ) { + this.createRuleExecutionRequest = createRuleExecutionRequest; + } + + public RuleExecutionCreator setCreateRuleExecutionRequest( + final RuleExecution.CreateRuleExecutionRequest createRuleExecutionRequest + ) { + this.createRuleExecutionRequest = createRuleExecutionRequest; + return this; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v3/RuleExecutions"; + + Request request = new Request( + HttpMethod.POST, + Domains.INTELLIGENCE.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "RuleExecution creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public RuleExecution.CreateRuleExecutionResponse create( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + return RuleExecution.CreateRuleExecutionResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + RuleExecution.CreateRuleExecutionResponse content = + RuleExecution.CreateRuleExecutionResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } + + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (createRuleExecutionRequest != null) { + request.setBody( + RuleExecution.toJson(createRuleExecutionRequest, objectMapper) + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/intelligence/v3/Version.java b/src/main/java/com/twilio/rest/intelligence/v3/Version.java index f74502b387..ae1b8e7e62 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/Version.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/Version.java @@ -123,7 +123,7 @@ public boolean equals(final Object o) { return false; } UpdateVersionResponse other = (UpdateVersionResponse) o; - return (true); + return true; } @Override @@ -358,9 +358,9 @@ private FetchVersionResponse( > parameters, @JsonProperty("prompt") final String prompt, @JsonProperty("status") final Version.OperatorVersionStatus status, - @JsonProperty("trainingExamples") final List< - OperatorTrainingExample - > trainingExamples, + @JsonProperty( + "trainingExamples" + ) final List trainingExamples, @JsonProperty("version") final Integer version ) { this.author = author; @@ -547,6 +547,7 @@ public static OperatorAuthorEnum forValue(final String value) { } @JsonDeserialize(builder = OperatorParameter.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorParameter { @@ -589,6 +590,7 @@ public static OperatorParameter fromJson( return mapper.readValue(jsonString, OperatorParameter.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -661,6 +663,7 @@ public int hashCode() { } @JsonDeserialize(builder = ListOperators200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListOperators200ResponseMeta { @@ -709,6 +712,7 @@ public static ListOperators200ResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -781,6 +785,7 @@ public int hashCode() { @JsonDeserialize( builder = ListOperatorVersions200ResponseItems.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ListOperatorVersions200ResponseItems { @@ -850,6 +855,7 @@ public static ListOperatorVersions200ResponseItems fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -974,6 +980,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContext.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContext { @@ -1004,6 +1011,7 @@ public static OperatorContext fromJson( return mapper.readValue(jsonString, OperatorContext.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1056,6 +1064,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContextKnowledge.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContextKnowledge { @@ -1080,6 +1089,7 @@ public static OperatorContextKnowledge fromJson( return mapper.readValue(jsonString, OperatorContextKnowledge.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1109,7 +1119,7 @@ public boolean equals(final Object o) { } OperatorContextKnowledge other = (OperatorContextKnowledge) o; - return (Objects.equals(enabled, other.enabled)); + return Objects.equals(enabled, other.enabled); } @Override @@ -1119,6 +1129,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorTrainingExample.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorTrainingExample { @@ -1149,6 +1160,7 @@ public static OperatorTrainingExample fromJson( return mapper.readValue(jsonString, OperatorTrainingExample.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1196,6 +1208,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperatorContextMemory.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperatorContextMemory { @@ -1220,6 +1233,7 @@ public static OperatorContextMemory fromJson( return mapper.readValue(jsonString, OperatorContextMemory.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1249,7 +1263,7 @@ public boolean equals(final Object o) { } OperatorContextMemory other = (OperatorContextMemory) o; - return (Objects.equals(enabled, other.enabled)); + return Objects.equals(enabled, other.enabled); } @Override diff --git a/src/main/java/com/twilio/rest/intelligence/v3/VersionFetcher.java b/src/main/java/com/twilio/rest/intelligence/v3/VersionFetcher.java index aebcde2457..4cb97aa0c9 100644 --- a/src/main/java/com/twilio/rest/intelligence/v3/VersionFetcher.java +++ b/src/main/java/com/twilio/rest/intelligence/v3/VersionFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -58,16 +57,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelCreator.java index 80408fddbf..b8cef45e74 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelCreator.java @@ -65,11 +65,10 @@ public ChannelCreator setType(final Channel.ChannelType type) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelDeleter.java index e5ed9c9a13..0a9f49858e 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelDeleter.java @@ -41,11 +41,10 @@ public ChannelDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelFetcher.java index 0c79ed6269..f3ddb0426f 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelFetcher.java @@ -40,11 +40,10 @@ public ChannelFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelReader.java index 013e7c7a90..61a556778d 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelUpdater.java index 8c7f7c44e7..0e9b543b55 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/ChannelUpdater.java @@ -61,11 +61,10 @@ public ChannelUpdater setAttributes(final String attributes) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleCreator.java index 3c8a673f76..d1d4f32944 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleCreator.java @@ -73,11 +73,10 @@ public RoleCreator setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleDeleter.java index aade413a54..79e0bc8cb0 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleDeleter.java @@ -41,11 +41,10 @@ public RoleDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleFetcher.java index 1eb570d2e2..864363da89 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleFetcher.java @@ -40,11 +40,10 @@ public RoleFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleReader.java index e85ac6b2d1..ce14413c61 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleUpdater.java index 2bf34a5db6..cf010f75fd 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleUpdater.java @@ -60,11 +60,10 @@ public RoleUpdater setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserCreator.java index b506c2c647..b0402eae3a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserCreator.java @@ -66,11 +66,10 @@ public UserCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserDeleter.java index 2bb43a579f..dd21141cf3 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserDeleter.java @@ -41,11 +41,10 @@ public UserDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserFetcher.java index 5e2785eb12..7da5913e59 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserFetcher.java @@ -40,11 +40,10 @@ public UserFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserReader.java index 0c00795f98..27de0bddc1 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserUpdater.java index a220f5f3f4..9866c6f40a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/UserUpdater.java @@ -61,11 +61,10 @@ public UserUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteCreator.java index 1c6c1a4e89..b8c3e9f757 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteCreator.java @@ -60,16 +60,14 @@ public InviteCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteDeleter.java index 515f667a93..e513c5c60b 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteFetcher.java index e35daea9ce..10423d2873 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteReader.java index c897f8906f..902837c125 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/InviteReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberCreator.java index cb6258611e..fca650b3ab 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberCreator.java @@ -60,16 +60,14 @@ public MemberCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberDeleter.java index b98c26f67f..1c63c19b93 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberFetcher.java index 7f4464dbe3..eb6e2a1f12 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberReader.java index 7aa5730d2e..6133bac1be 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberUpdater.java index fd4635d6e2..e531d4b208 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MemberUpdater.java @@ -64,16 +64,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageCreator.java index 0cfdf7ea5c..f1d3ea2661 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageCreator.java @@ -67,16 +67,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageDeleter.java index 153647ce7b..46e875118a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageFetcher.java index 50577bdde8..889c2ca8da 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageReader.java index 0c787ffb8e..9d361f8d93 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageReader.java @@ -85,16 +85,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageUpdater.java index 0432b7fe5a..18d7aa93c0 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/channel/MessageUpdater.java @@ -62,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannelReader.java b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannelReader.java index b31f5b85c3..8f16a1f975 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannelReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v1/service/user/UserChannelReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingDeleter.java index 31b5b39c6b..d745b26c65 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingDeleter.java @@ -41,11 +41,10 @@ public BindingDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingFetcher.java index 1225d11b62..1fa7c03c4b 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingFetcher.java @@ -40,11 +40,10 @@ public BindingFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingReader.java index e8045468bf..8b27aeb258 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/BindingReader.java @@ -97,11 +97,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelCreator.java index 641eb68334..a8b73e6027 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelCreator.java @@ -92,11 +92,10 @@ public ChannelCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelDeleter.java index f827a75b77..7466110b1a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelDeleter.java @@ -51,11 +51,10 @@ public ChannelDeleter setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelFetcher.java index c56228ff15..016c9c0c39 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelFetcher.java @@ -40,11 +40,10 @@ public ChannelFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelReader.java index 506586b8f3..cfe483a3fe 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelUpdater.java index 51c0ab1598..56f36ad51a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/ChannelUpdater.java @@ -88,11 +88,10 @@ public ChannelUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleCreator.java index f639f86f8d..60e917febf 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleCreator.java @@ -73,11 +73,10 @@ public RoleCreator setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleDeleter.java index 22f798f89e..15bccc1098 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleDeleter.java @@ -41,11 +41,10 @@ public RoleDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleFetcher.java index c7113184fe..a88d182949 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleFetcher.java @@ -40,11 +40,10 @@ public RoleFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleReader.java index cde9c4ac34..af8ebfcb26 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleUpdater.java index 7508243fbb..655dee9763 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/RoleUpdater.java @@ -60,11 +60,10 @@ public RoleUpdater setPermission(final String permission) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Roles/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserCreator.java index 429036aed0..327c4c2355 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserCreator.java @@ -74,11 +74,10 @@ public UserCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserDeleter.java index 45411b0cf2..85bcfdd68c 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserDeleter.java @@ -41,11 +41,10 @@ public UserDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserFetcher.java index eee28f07d4..3a7956ca89 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserFetcher.java @@ -40,11 +40,10 @@ public UserFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserReader.java index 31641f3761..3e90b84f0a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserUpdater.java index f9a6bf07e6..124d9767a9 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/UserUpdater.java @@ -69,11 +69,10 @@ public UserUpdater setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteCreator.java index c276c4c697..28b8966025 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteCreator.java @@ -60,16 +60,14 @@ public InviteCreator setRoleSid(final String roleSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteDeleter.java index 24cc94d68d..58183c14fd 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteFetcher.java index d8fff5ab33..bd243e797e 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteReader.java index d0ba48d64c..f4525621fe 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/InviteReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberCreator.java index 0d4b537cf3..9181e99d36 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberCreator.java @@ -103,16 +103,14 @@ public MemberCreator setXTwilioWebhookEnabled( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberDeleter.java index 664aaeae91..17981c5e43 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberFetcher.java index d1f7e81219..cb65b10427 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberReader.java index 448211778d..bb2af389eb 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberReader.java @@ -86,16 +86,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberUpdater.java index 8323dc99de..c5db8ffb29 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MemberUpdater.java @@ -99,16 +99,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageCreator.java index 0e26346d68..38f2672474 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageCreator.java @@ -98,16 +98,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageDeleter.java index 0bb552183c..9b2f721cf5 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageDeleter.java @@ -58,16 +58,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageFetcher.java index 0343de9577..6f90c6c4cf 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageReader.java index 121e8ce759..1b87a8d654 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageReader.java @@ -85,16 +85,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageUpdater.java index e311e73e59..89d49d2eba 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/MessageUpdater.java @@ -95,16 +95,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookCreator.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookCreator.java index f2e8b0ca5d..b40af49eb9 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookCreator.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookCreator.java @@ -119,16 +119,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookDeleter.java index fd11faad47..ff5b1f9e4e 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookFetcher.java index e5c3918d18..a807d18d19 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookReader.java index 8572808a8d..261c77460f 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookUpdater.java index 1ca83966ab..6609b46fcb 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/channel/WebhookUpdater.java @@ -114,16 +114,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingDeleter.java index d749b200b2..6ae933dabe 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingDeleter.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingFetcher.java index dc30f22f1e..f37a522c1a 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingFetcher.java @@ -47,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingReader.java index 0244794b48..8be0bd10b0 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserBindingReader.java @@ -94,11 +94,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelDeleter.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelDeleter.java index 872b877266..8b46278fbe 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelDeleter.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelDeleter.java @@ -48,17 +48,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelFetcher.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelFetcher.java index 601810b009..987371881d 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelFetcher.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelFetcher.java @@ -47,17 +47,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelReader.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelReader.java index 34639a4922..85f7b61173 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelReader.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelUpdater.java b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelUpdater.java index faf320acfb..0219803a17 100644 --- a/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelUpdater.java +++ b/src/main/java/com/twilio/rest/ipmessaging/v2/service/user/UserChannelUpdater.java @@ -75,17 +75,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - path = - path.replace( - "{" + "ChannelSid" + "}", - this.pathChannelSid.toString() - ); + path = path.replace( + "{" + "ChannelSid" + "}", + this.pathChannelSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 0a8e2902dd..0f11209abf 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java @@ -69,6 +69,7 @@ public static KnowledgeUpdater updater(final String pathId) { @JsonDeserialize( builder = KnowledgeV1ServiceUpdateKnowledgeRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeV1ServiceUpdateKnowledgeRequest { @@ -126,6 +127,7 @@ public static KnowledgeV1ServiceUpdateKnowledgeRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -239,6 +241,7 @@ public int hashCode() { @JsonDeserialize( builder = KnowledgeV1ServiceCreateKnowledgeRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeV1ServiceCreateKnowledgeRequest { @@ -296,6 +299,7 @@ public static KnowledgeV1ServiceCreateKnowledgeRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -404,6 +408,7 @@ public int hashCode() { @JsonDeserialize( builder = KnowledgeV1ServiceCreatePolicyRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeV1ServiceCreatePolicyRequest { @@ -455,6 +460,7 @@ public static KnowledgeV1ServiceCreatePolicyRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/knowledge/v2/Chunk.java b/src/main/java/com/twilio/rest/knowledge/v2/Chunk.java index 70485698fe..c33880febc 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/Chunk.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/Chunk.java @@ -34,6 +34,7 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; +import java.net.URI; import java.time.ZonedDateTime; import java.util.Objects; import lombok.Builder; @@ -113,7 +114,7 @@ public boolean equals(final Object o) { return false; } UpdateChunkResponse other = (UpdateChunkResponse) o; - return (true); + return true; } @Override @@ -164,19 +165,39 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class ListChunkResponse extends Resource { + @Getter + private final Integer chunkIndex; + @Getter private final String content; @Getter private final ZonedDateTime createdAt; + @Getter + private final Integer documentNumber; + + @Getter + private final String documentTitle; + + @Getter + private final URI documentUrl; + @JsonCreator private ListChunkResponse( + @JsonProperty("chunkIndex") final Integer chunkIndex, @JsonProperty("content") final String content, - @JsonProperty("createdAt") final ZonedDateTime createdAt + @JsonProperty("createdAt") final ZonedDateTime createdAt, + @JsonProperty("documentNumber") final Integer documentNumber, + @JsonProperty("documentTitle") final String documentTitle, + @JsonProperty("documentUrl") final URI documentUrl ) { + this.chunkIndex = chunkIndex; this.content = content; this.createdAt = createdAt; + this.documentNumber = documentNumber; + this.documentTitle = documentTitle; + this.documentUrl = documentUrl; } public static ListChunkResponse fromJson( @@ -204,14 +225,25 @@ public boolean equals(final Object o) { } ListChunkResponse other = (ListChunkResponse) o; return ( + Objects.equals(chunkIndex, other.chunkIndex) && Objects.equals(content, other.content) && - Objects.equals(createdAt, other.createdAt) + Objects.equals(createdAt, other.createdAt) && + Objects.equals(documentNumber, other.documentNumber) && + Objects.equals(documentTitle, other.documentTitle) && + Objects.equals(documentUrl, other.documentUrl) ); } @Override public int hashCode() { - return Objects.hash(content, createdAt); + return Objects.hash( + chunkIndex, + content, + createdAt, + documentNumber, + documentTitle, + documentUrl + ); } } @@ -301,6 +333,7 @@ public static ChunkReader reader( } @JsonDeserialize(builder = KnowledgeMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeMeta { @@ -343,6 +376,7 @@ public static KnowledgeMeta fromJson( return mapper.readValue(jsonString, KnowledgeMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -417,6 +451,7 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeChunk.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeChunk { @@ -433,9 +468,33 @@ public static class KnowledgeChunk { @Getter private final ZonedDateTime createdAt; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("chunkIndex") + @Getter + private final Integer chunkIndex; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentTitle") + @Getter + private final String documentTitle; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentUrl") + @Getter + private final URI documentUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentNumber") + @Getter + private final Integer documentNumber; + private KnowledgeChunk(Builder builder) { this.content = builder.content; this.createdAt = builder.createdAt; + this.chunkIndex = builder.chunkIndex; + this.documentTitle = builder.documentTitle; + this.documentUrl = builder.documentUrl; + this.documentNumber = builder.documentNumber; } public static Builder builder() { @@ -449,6 +508,7 @@ public static KnowledgeChunk fromJson( return mapper.readValue(jsonString, KnowledgeChunk.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -462,6 +522,18 @@ public static class Builder { @JsonProperty("createdAt") private ZonedDateTime createdAt; + @JsonProperty("chunkIndex") + private Integer chunkIndex; + + @JsonProperty("documentTitle") + private String documentTitle; + + @JsonProperty("documentUrl") + private URI documentUrl; + + @JsonProperty("documentNumber") + private Integer documentNumber; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("content") public Builder content(String content) { @@ -480,6 +552,34 @@ public Builder createdAt(ZonedDateTime createdAt) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("chunkIndex") + public Builder chunkIndex(Integer chunkIndex) { + this.chunkIndex = chunkIndex; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentTitle") + public Builder documentTitle(String documentTitle) { + this.documentTitle = documentTitle; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentUrl") + public Builder documentUrl(URI documentUrl) { + this.documentUrl = documentUrl; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentNumber") + public Builder documentNumber(Integer documentNumber) { + this.documentNumber = documentNumber; + return this; + } + public KnowledgeChunk build() { return new KnowledgeChunk(this); } @@ -498,13 +598,24 @@ public boolean equals(final Object o) { KnowledgeChunk other = (KnowledgeChunk) o; return ( Objects.equals(content, other.content) && - Objects.equals(createdAt, other.createdAt) + Objects.equals(createdAt, other.createdAt) && + Objects.equals(chunkIndex, other.chunkIndex) && + Objects.equals(documentTitle, other.documentTitle) && + Objects.equals(documentUrl, other.documentUrl) && + Objects.equals(documentNumber, other.documentNumber) ); } @Override public int hashCode() { - return Objects.hash(content, createdAt); + return Objects.hash( + content, + createdAt, + chunkIndex, + documentTitle, + documentUrl, + documentNumber + ); } } diff --git a/src/main/java/com/twilio/rest/knowledge/v2/ChunkReader.java b/src/main/java/com/twilio/rest/knowledge/v2/ChunkReader.java index af48f887b9..1c1e5bb2b2 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/ChunkReader.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/ChunkReader.java @@ -85,11 +85,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}/Chunks"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -191,11 +190,10 @@ public Page previousPage( "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}/Chunks"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -216,11 +214,10 @@ public Page nextPage( "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}/Chunks"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/Knowledge.java b/src/main/java/com/twilio/rest/knowledge/v2/Knowledge.java index 36b7dc2e77..68adc4e454 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/Knowledge.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/Knowledge.java @@ -38,6 +38,7 @@ import java.io.InputStream; import java.net.URI; import java.time.ZonedDateTime; +import java.util.List; import java.util.Objects; import lombok.Builder; import lombok.Getter; @@ -568,7 +569,9 @@ public static Status forValue(final String value) { } public enum Type { - TEXT("Text"); + TEXT("Text"), + WEB("Web"), + FILE("File"); private final String value; @@ -587,17 +590,15 @@ public static Type forValue(final String value) { } } - public enum SupportedFileMimeType { - TEXT_CSV("text/csv"), - TEXT_MARKDOWN("text/markdown"), - TEXT_MDX("text/mdx"), - APPLICATION_PDF("application/pdf"), - TEXT_TAB_SEPARATED_VALUES("text/tab-separated-values"), - TEXT_PLAIN("text/plain"); + public enum CrawlPeriod { + WEEKLY("WEEKLY"), + BIWEEKLY("BIWEEKLY"), + MONTHLY("MONTHLY"), + NEVER("NEVER"); private final String value; - private SupportedFileMimeType(final String value) { + private CrawlPeriod(final String value) { this.value = value; } @@ -607,38 +608,125 @@ public String toString() { } @JsonCreator - public static SupportedFileMimeType forValue(final String value) { - return Promoter.enumFromString( - value, - SupportedFileMimeType.values() - ); + public static CrawlPeriod forValue(final String value) { + return Promoter.enumFromString(value, CrawlPeriod.values()); } } - public enum CrawlPeriod { - WEEKLY("WEEKLY"), - BIWEEKLY("BIWEEKLY"), - MONTHLY("MONTHLY"), - NEVER("NEVER"); + @JsonDeserialize(builder = KnowledgeErrorInstance.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class KnowledgeErrorInstance { - private final String value; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final String type; - private CrawlPeriod(final String value) { - this.value = value; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("code") + @Getter + private final Integer code; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("instance") + @Getter + private final String instance; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("detail") + @Getter + private final String detail; + + private KnowledgeErrorInstance(Builder builder) { + this.type = builder.type; + this.code = builder.code; + this.instance = builder.instance; + this.detail = builder.detail; } - @JsonValue - public String toString() { - return value; + public static Builder builder( + final String type, + final Integer code, + final String instance + ) { + return new Builder(type, code, instance); } - @JsonCreator - public static CrawlPeriod forValue(final String value) { - return Promoter.enumFromString(value, CrawlPeriod.values()); + public static KnowledgeErrorInstance fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, KnowledgeErrorInstance.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("type") + private String type; + + @JsonProperty("code") + private Integer code; + + @JsonProperty("instance") + private String instance; + + @JsonProperty("detail") + private String detail; + + @JsonCreator + public Builder( + @JsonProperty("type") final String type, + @JsonProperty("code") final Integer code, + @JsonProperty("instance") final String instance + ) { + this.type = type; + this.code = code; + this.instance = instance; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("detail") + public Builder detail(String detail) { + this.detail = detail; + return this; + } + + public KnowledgeErrorInstance build() { + return new KnowledgeErrorInstance(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + KnowledgeErrorInstance other = (KnowledgeErrorInstance) o; + return ( + Objects.equals(type, other.type) && + Objects.equals(code, other.code) && + Objects.equals(instance, other.instance) && + Objects.equals(detail, other.detail) + ); + } + + @Override + public int hashCode() { + return Objects.hash(type, code, instance, detail); } } @JsonDeserialize(builder = KnowledgeCore.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeCore { @@ -675,6 +763,7 @@ public static KnowledgeCore fromJson( return mapper.readValue(jsonString, KnowledgeCore.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -736,6 +825,7 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeMeta { @@ -778,6 +868,7 @@ public static KnowledgeMeta fromJson( return mapper.readValue(jsonString, KnowledgeMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -852,15 +943,26 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeSourceTypes.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeSourceTypes { + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final Knowledge.Type type; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("content") @Getter private final String content; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + @Getter + private final URI url; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("crawlDepth") @Getter @@ -871,6 +973,11 @@ public static class KnowledgeSourceTypes { @Getter private final Knowledge.CrawlPeriod crawlPeriod; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("errors") + @Getter + private final List errors; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("fileName") @Getter @@ -881,20 +988,15 @@ public static class KnowledgeSourceTypes { @Getter private final Integer fileSize; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("importUrl") - @Getter - private final URI importUrl; - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("mimeType") @Getter - private final Knowledge.SupportedFileMimeType mimeType; + private final SupportedFileMimeType mimeType; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") + @JsonProperty("importUrl") @Getter - private final Knowledge.Type type; + private final URI importUrl; @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @@ -903,22 +1005,18 @@ public static class KnowledgeSourceTypes { @Getter private final ZonedDateTime uploadExpiration; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - @Getter - private final URI url; - private KnowledgeSourceTypes(Builder builder) { + this.type = builder.type; this.content = builder.content; + this.url = builder.url; this.crawlDepth = builder.crawlDepth; this.crawlPeriod = builder.crawlPeriod; + this.errors = builder.errors; this.fileName = builder.fileName; this.fileSize = builder.fileSize; - this.importUrl = builder.importUrl; this.mimeType = builder.mimeType; - this.type = builder.type; + this.importUrl = builder.importUrl; this.uploadExpiration = builder.uploadExpiration; - this.url = builder.url; } public static Builder builder() { @@ -932,32 +1030,39 @@ public static KnowledgeSourceTypes fromJson( return mapper.readValue(jsonString, KnowledgeSourceTypes.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { + @JsonProperty("type") + private Knowledge.Type type; + @JsonProperty("content") private String content; + @JsonProperty("url") + private URI url; + @JsonProperty("crawlDepth") private Integer crawlDepth; @JsonProperty("crawlPeriod") private Knowledge.CrawlPeriod crawlPeriod; + @JsonProperty("errors") + private List errors; + @JsonProperty("fileName") private String fileName; @JsonProperty("fileSize") private Integer fileSize; - @JsonProperty("importUrl") - private URI importUrl; - @JsonProperty("mimeType") - private Knowledge.SupportedFileMimeType mimeType; + private SupportedFileMimeType mimeType; - @JsonProperty("type") - private Knowledge.Type type; + @JsonProperty("importUrl") + private URI importUrl; @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class @@ -966,8 +1071,12 @@ public static class Builder { @JsonProperty("uploadExpiration") private ZonedDateTime uploadExpiration; - @JsonProperty("url") - private URI url; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + public Builder type(Knowledge.Type type) { + this.type = type; + return this; + } @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("content") @@ -976,6 +1085,13 @@ public Builder content(String content) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + public Builder url(URI url) { + this.url = url; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("crawlDepth") public Builder crawlDepth(Integer crawlDepth) { @@ -990,6 +1106,13 @@ public Builder crawlPeriod(Knowledge.CrawlPeriod crawlPeriod) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("errors") + public Builder errors(List errors) { + this.errors = errors; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("fileName") public Builder fileName(String fileName) { @@ -1004,24 +1127,17 @@ public Builder fileSize(Integer fileSize) { return this; } - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("importUrl") - public Builder importUrl(URI importUrl) { - this.importUrl = importUrl; - return this; - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("mimeType") - public Builder mimeType(Knowledge.SupportedFileMimeType mimeType) { + public Builder mimeType(SupportedFileMimeType mimeType) { this.mimeType = mimeType; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - public Builder type(Knowledge.Type type) { - this.type = type; + @JsonProperty("importUrl") + public Builder importUrl(URI importUrl) { + this.importUrl = importUrl; return this; } @@ -1036,13 +1152,6 @@ public Builder uploadExpiration(ZonedDateTime uploadExpiration) { return this; } - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("url") - public Builder url(URI url) { - this.url = url; - return this; - } - public KnowledgeSourceTypes build() { return new KnowledgeSourceTypes(this); } @@ -1060,37 +1169,87 @@ public boolean equals(final Object o) { KnowledgeSourceTypes other = (KnowledgeSourceTypes) o; return ( + Objects.equals(type, other.type) && Objects.equals(content, other.content) && + Objects.equals(url, other.url) && Objects.equals(crawlDepth, other.crawlDepth) && Objects.equals(crawlPeriod, other.crawlPeriod) && + Objects.equals(errors, other.errors) && Objects.equals(fileName, other.fileName) && Objects.equals(fileSize, other.fileSize) && - Objects.equals(importUrl, other.importUrl) && Objects.equals(mimeType, other.mimeType) && - Objects.equals(type, other.type) && - Objects.equals(uploadExpiration, other.uploadExpiration) && - Objects.equals(url, other.url) + Objects.equals(importUrl, other.importUrl) && + Objects.equals(uploadExpiration, other.uploadExpiration) ); } @Override public int hashCode() { return Objects.hash( + type, content, + url, crawlDepth, crawlPeriod, + errors, fileName, fileSize, - importUrl, mimeType, - type, - uploadExpiration, - url + importUrl, + uploadExpiration ); } } + @JsonDeserialize(builder = SupportedFileMimeType.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class SupportedFileMimeType { + + private SupportedFileMimeType(Builder builder) {} + + public static Builder builder() { + return new Builder(); + } + + public static SupportedFileMimeType fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, SupportedFileMimeType.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + public SupportedFileMimeType build() { + return new SupportedFileMimeType(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + } + @JsonDeserialize(builder = _Knowledge.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class _Knowledge { @@ -1161,6 +1320,7 @@ public static _Knowledge fromJson( return mapper.readValue(jsonString, _Knowledge.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1263,6 +1423,90 @@ public int hashCode() { } } + @JsonDeserialize(builder = KnowledgeErrorGroup.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class KnowledgeErrorGroup { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("title") + @Getter + private final String title; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("instances") + @Getter + private final List instances; + + private KnowledgeErrorGroup(Builder builder) { + this.title = builder.title; + this.instances = builder.instances; + } + + public static Builder builder( + final String title, + final List instances + ) { + return new Builder(title, instances); + } + + public static KnowledgeErrorGroup fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, KnowledgeErrorGroup.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("title") + private String title; + + @JsonProperty("instances") + private List instances; + + @JsonCreator + public Builder( + @JsonProperty("title") final String title, + @JsonProperty( + "instances" + ) final List instances + ) { + this.title = title; + this.instances = instances; + } + + public KnowledgeErrorGroup build() { + return new KnowledgeErrorGroup(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + KnowledgeErrorGroup other = (KnowledgeErrorGroup) o; + return ( + Objects.equals(title, other.title) && + Objects.equals(instances, other.instances) + ); + } + + @Override + public int hashCode() { + return Objects.hash(title, instances); + } + } + /** * Converts a JSON String into a Knowledge object using the provided ObjectMapper. * diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasis.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasis.java index eb6069831a..d8773af716 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasis.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasis.java @@ -168,11 +168,16 @@ public static class DeleteKnowledgeBasisResponse extends Resource { @Getter private final String message; + @Getter + private final String statusUrl; + @JsonCreator private DeleteKnowledgeBasisResponse( - @JsonProperty("message") final String message + @JsonProperty("message") final String message, + @JsonProperty("statusUrl") final String statusUrl ) { this.message = message; + this.statusUrl = statusUrl; } public static DeleteKnowledgeBasisResponse fromJson( @@ -203,12 +208,15 @@ public boolean equals(final Object o) { } DeleteKnowledgeBasisResponse other = (DeleteKnowledgeBasisResponse) o; - return Objects.equals(message, other.message); + return ( + Objects.equals(message, other.message) && + Objects.equals(statusUrl, other.statusUrl) + ); } @Override public int hashCode() { - return Objects.hash(message); + return Objects.hash(message, statusUrl); } } @@ -515,6 +523,7 @@ public static OrderBy forValue(final String value) { } @JsonDeserialize(builder = Meta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Meta { @@ -555,6 +564,7 @@ public static Meta fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Meta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -629,6 +639,7 @@ public int hashCode() { } @JsonDeserialize(builder = UpdateKnowledgeBaseRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateKnowledgeBaseRequest { @@ -662,6 +673,7 @@ public static UpdateKnowledgeBaseRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -714,6 +726,7 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeBase.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeBase { @@ -792,6 +805,7 @@ public static KnowledgeBase fromJson( return mapper.readValue(jsonString, KnowledgeBase.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -890,6 +904,7 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeBaseCore.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeBaseCore { @@ -920,6 +935,7 @@ public static KnowledgeBaseCore fromJson( return mapper.readValue(jsonString, KnowledgeBaseCore.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisCreator.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisCreator.java index a649ee62c8..f7f92cf0f7 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisCreator.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class KnowledgeBasisCreator - extends Creator { + extends Creator +{ private KnowledgeBasis.KnowledgeBaseCore knowledgeBaseCore; @@ -93,9 +94,9 @@ public KnowledgeBasis.CreateKnowledgeBasisResponse create( } @Override - public TwilioResponse< - KnowledgeBasis.CreateKnowledgeBasisResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); KnowledgeBasis.CreateKnowledgeBasisResponse content = KnowledgeBasis.CreateKnowledgeBasisResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisDeleter.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisDeleter.java index 8f8b1e1b2f..c0c8897654 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisDeleter.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisDeleter.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,7 +32,8 @@ public class KnowledgeBasisDeleter extends ResourceDeleter< KnowledgeBasis, KnowledgeBasis.DeleteKnowledgeBasisResponse - > { + > +{ private String pathKbId; @@ -62,16 +62,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -99,9 +89,9 @@ public KnowledgeBasis.DeleteKnowledgeBasisResponse delete( } @Override - public TwilioResponse< - KnowledgeBasis.DeleteKnowledgeBasisResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); KnowledgeBasis.DeleteKnowledgeBasisResponse content = KnowledgeBasis.DeleteKnowledgeBasisResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisFetcher.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisFetcher.java index 51c596fe9b..dfed0b0828 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisFetcher.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class KnowledgeBasisFetcher - extends Fetcher { + extends Fetcher +{ private String pathKbId; @@ -56,16 +56,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -93,9 +83,9 @@ public KnowledgeBasis.FetchKnowledgeBasisResponse fetch( } @Override - public TwilioResponse< - KnowledgeBasis.FetchKnowledgeBasisResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); KnowledgeBasis.FetchKnowledgeBasisResponse content = KnowledgeBasis.FetchKnowledgeBasisResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisReader.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisReader.java index e9f6794624..8c969c6efb 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisReader.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisReader.java @@ -36,7 +36,8 @@ import java.io.InputStream; public class KnowledgeBasisReader - extends Reader { + extends Reader +{ private Integer pageSize; private String pageToken; @@ -61,9 +62,9 @@ public KnowledgeBasisReader setOrderBy( return this; } - public ResourceSetResponse< - KnowledgeBasis.ListKnowledgeBasisResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisUpdater.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisUpdater.java index b72e27e241..a59f4f276e 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisUpdater.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeBasisUpdater.java @@ -23,7 +23,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,7 +32,8 @@ import java.io.InputStream; public class KnowledgeBasisUpdater - extends Updater { + extends Updater +{ private String pathKbId; private String ifMatch; @@ -81,16 +81,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -118,9 +108,9 @@ public KnowledgeBasis.UpdateKnowledgeBasisResponse update( } @Override - public TwilioResponse< - KnowledgeBasis.UpdateKnowledgeBasisResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); KnowledgeBasis.UpdateKnowledgeBasisResponse content = KnowledgeBasis.UpdateKnowledgeBasisResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeCreator.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeCreator.java index daa2c76c92..6138793056 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class KnowledgeCreator - extends Creator { + extends Creator +{ private String pathKbId; private Knowledge.KnowledgeCore knowledgeCore; diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeDeleter.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeDeleter.java index 4db010cbaa..4ec86c3010 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeDeleter.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeDeleter.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -46,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -68,16 +66,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeFetcher.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeFetcher.java index 9c6af60f61..a8d1e170e3 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeFetcher.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class KnowledgeFetcher - extends Fetcher { + extends Fetcher +{ private String pathKbId; private String pathKnowledgeId; @@ -46,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -66,16 +65,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeReader.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeReader.java index 1482f5f401..bbac3e775d 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeReader.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeReader.java @@ -61,9 +61,9 @@ public KnowledgeReader setPageToken(final String pageToken) { return this; } - public ResourceSetResponse< - Knowledge.ListKnowledgeResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeUpdater.java b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeUpdater.java index a1fa2dedef..e974eefcf9 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeUpdater.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/KnowledgeUpdater.java @@ -23,7 +23,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,7 +32,8 @@ import java.io.InputStream; public class KnowledgeUpdater - extends Updater { + extends Updater +{ private String pathKbId; private String pathKnowledgeId; @@ -64,11 +64,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/KnowledgeBases/{kbId}/Knowledge/{knowledgeId}"; path = path.replace("{" + "kbId" + "}", this.pathKbId.toString()); - path = - path.replace( - "{" + "knowledgeId" + "}", - this.pathKnowledgeId.toString() - ); + path = path.replace( + "{" + "knowledgeId" + "}", + this.pathKnowledgeId.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -87,16 +86,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/knowledge/v2/Operation.java b/src/main/java/com/twilio/rest/knowledge/v2/Operation.java index 5e256f21f1..e22f278a91 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/Operation.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/Operation.java @@ -121,7 +121,7 @@ public boolean equals(final Object o) { return false; } UpdateOperationResponse other = (UpdateOperationResponse) o; - return (true); + return true; } @Override @@ -205,7 +205,7 @@ public boolean equals(final Object o) { return false; } ListOperationResponse other = (ListOperationResponse) o; - return (true); + return true; } @Override @@ -407,6 +407,7 @@ public static Type forValue(final String value) { } @JsonDeserialize(builder = OperationResultResourceId.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperationResultResourceId { @@ -443,6 +444,7 @@ public static OperationResultResourceId fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -489,6 +491,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperationStatusError.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperationStatusError { @@ -531,6 +534,7 @@ public static OperationStatusError fromJson( return mapper.readValue(jsonString, OperationStatusError.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/knowledge/v2/OperationFetcher.java b/src/main/java/com/twilio/rest/knowledge/v2/OperationFetcher.java index 92b62b911e..8469ce44e7 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/OperationFetcher.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/OperationFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class OperationFetcher - extends Fetcher { + extends Fetcher +{ private String pathOperationId; @@ -40,11 +40,10 @@ public OperationFetcher(final String pathOperationId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/ControlPlane/Operations/{operationId}"; - path = - path.replace( - "{" + "operationId" + "}", - this.pathOperationId.toString() - ); + path = path.replace( + "{" + "operationId" + "}", + this.pathOperationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -60,16 +59,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/knowledge/v2/Search.java b/src/main/java/com/twilio/rest/knowledge/v2/Search.java index b603769f15..0aa5a4a990 100644 --- a/src/main/java/com/twilio/rest/knowledge/v2/Search.java +++ b/src/main/java/com/twilio/rest/knowledge/v2/Search.java @@ -34,6 +34,7 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; +import java.net.URI; import java.time.ZonedDateTime; import java.util.List; import java.util.Objects; @@ -121,7 +122,7 @@ public boolean equals(final Object o) { return false; } UpdateSearchResponse other = (UpdateSearchResponse) o; - return (true); + return true; } @Override @@ -199,7 +200,7 @@ public boolean equals(final Object o) { return false; } ListSearchResponse other = (ListSearchResponse) o; - return (true); + return true; } @Override @@ -291,6 +292,7 @@ public static SearchCreator creator(final String pathKbId) { } @JsonDeserialize(builder = KnowledgeSearch.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeSearch { @@ -327,6 +329,7 @@ public static KnowledgeSearch fromJson( return mapper.readValue(jsonString, KnowledgeSearch.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -385,6 +388,7 @@ public int hashCode() { } @JsonDeserialize(builder = KnowledgeChunkResult.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class KnowledgeChunkResult { @@ -401,6 +405,26 @@ public static class KnowledgeChunkResult { @Getter private final ZonedDateTime createdAt; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("chunkIndex") + @Getter + private final Integer chunkIndex; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentTitle") + @Getter + private final String documentTitle; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentUrl") + @Getter + private final URI documentUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentNumber") + @Getter + private final Integer documentNumber; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("score") @Getter @@ -414,6 +438,10 @@ public static class KnowledgeChunkResult { private KnowledgeChunkResult(Builder builder) { this.content = builder.content; this.createdAt = builder.createdAt; + this.chunkIndex = builder.chunkIndex; + this.documentTitle = builder.documentTitle; + this.documentUrl = builder.documentUrl; + this.documentNumber = builder.documentNumber; this.score = builder.score; this.knowledgeId = builder.knowledgeId; } @@ -429,6 +457,7 @@ public static KnowledgeChunkResult fromJson( return mapper.readValue(jsonString, KnowledgeChunkResult.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -442,6 +471,18 @@ public static class Builder { @JsonProperty("createdAt") private ZonedDateTime createdAt; + @JsonProperty("chunkIndex") + private Integer chunkIndex; + + @JsonProperty("documentTitle") + private String documentTitle; + + @JsonProperty("documentUrl") + private URI documentUrl; + + @JsonProperty("documentNumber") + private Integer documentNumber; + @JsonProperty("score") private Float score; @@ -466,6 +507,34 @@ public Builder createdAt(ZonedDateTime createdAt) { return this; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("chunkIndex") + public Builder chunkIndex(Integer chunkIndex) { + this.chunkIndex = chunkIndex; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentTitle") + public Builder documentTitle(String documentTitle) { + this.documentTitle = documentTitle; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentUrl") + public Builder documentUrl(URI documentUrl) { + this.documentUrl = documentUrl; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("documentNumber") + public Builder documentNumber(Integer documentNumber) { + this.documentNumber = documentNumber; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("score") public Builder score(Float score) { @@ -499,6 +568,10 @@ public boolean equals(final Object o) { return ( Objects.equals(content, other.content) && Objects.equals(createdAt, other.createdAt) && + Objects.equals(chunkIndex, other.chunkIndex) && + Objects.equals(documentTitle, other.documentTitle) && + Objects.equals(documentUrl, other.documentUrl) && + Objects.equals(documentNumber, other.documentNumber) && Objects.equals(score, other.score) && Objects.equals(knowledgeId, other.knowledgeId) ); @@ -506,7 +579,16 @@ public boolean equals(final Object o) { @Override public int hashCode() { - return Objects.hash(content, createdAt, score, knowledgeId); + return Objects.hash( + content, + createdAt, + chunkIndex, + documentTitle, + documentUrl, + documentNumber, + score, + knowledgeId + ); } } diff --git a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumberFetcher.java index b8a1c73f98..091ef09b96 100644 --- a/src/main/java/com/twilio/rest/lookups/v1/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v1/PhoneNumberFetcher.java @@ -77,11 +77,10 @@ public PhoneNumberFetcher setAddOnsData( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PhoneNumbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, 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..ca59e28a64 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java @@ -64,6 +64,7 @@ public static BucketUpdater updater( } @JsonDeserialize(builder = RateLimitRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RateLimitRequest { @@ -94,6 +95,7 @@ public static RateLimitRequest fromJson( return mapper.readValue(jsonString, RateLimitRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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 639ce41a06..28fc201f6f 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java @@ -168,6 +168,7 @@ public static OriginalLineType forValue(final String value) { } @JsonDeserialize(builder = OverridesRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OverridesRequest { @@ -198,6 +199,7 @@ public static OverridesRequest fromJson( return mapper.readValue(jsonString, OverridesRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..e7f18748c7 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java @@ -54,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; path = path.replace("{" + "Field" + "}", this.pathField.toString()); - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java index 2720fc518a..ce6ea6298d 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; path = path.replace("{" + "Field" + "}", this.pathField.toString()); - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java index 975be329db..4e6e7c4a29 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; path = path.replace("{" + "Field" + "}", this.pathField.toString()); - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, 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..727ae36e61 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java @@ -54,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; path = path.replace("{" + "Field" + "}", this.pathField.toString()); - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.PUT, 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 8045bf30b0..b8d3a1a009 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java +++ b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumber.java @@ -106,6 +106,7 @@ public static ValidationError forValue(final String value) { } @JsonDeserialize(builder = CallForwardingInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CallForwardingInfo { @@ -136,6 +137,7 @@ public static CallForwardingInfo fromJson( return mapper.readValue(jsonString, CallForwardingInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -181,8 +183,7 @@ public boolean equals(final Object o) { Objects.equals( callForwardingEnabled, other.callForwardingEnabled - ) && - Objects.equals(errorCode, other.errorCode) + ) && Objects.equals(errorCode, other.errorCode) ); } @@ -193,6 +194,7 @@ public int hashCode() { } @JsonDeserialize(builder = SmsPumpingRiskInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SmsPumpingRiskInfo { @@ -249,6 +251,7 @@ public static SmsPumpingRiskInfo fromJson( return mapper.readValue(jsonString, SmsPumpingRiskInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -371,6 +374,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReassignedNumberInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReassignedNumberInfo { @@ -407,6 +411,7 @@ public static ReassignedNumberInfo fromJson( return mapper.readValue(jsonString, ReassignedNumberInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -474,6 +479,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentityMatchInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentityMatchInfo { @@ -564,6 +570,7 @@ public static IdentityMatchInfo fromJson( return mapper.readValue(jsonString, IdentityMatchInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -742,6 +749,7 @@ public int hashCode() { } @JsonDeserialize(builder = LastSimSwapInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LastSimSwapInfo { @@ -780,6 +788,7 @@ public static LastSimSwapInfo fromJson( return mapper.readValue(jsonString, LastSimSwapInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -855,6 +864,7 @@ public int hashCode() { } @JsonDeserialize(builder = LineTypeIntelligenceInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LineTypeIntelligenceInfo { @@ -903,6 +913,7 @@ public static LineTypeIntelligenceInfo fromJson( return mapper.readValue(jsonString, LineTypeIntelligenceInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -994,6 +1005,7 @@ public int hashCode() { } @JsonDeserialize(builder = SimSwapInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SimSwapInfo { @@ -1042,6 +1054,7 @@ public static SimSwapInfo fromJson( return mapper.readValue(jsonString, SimSwapInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1133,6 +1146,7 @@ public int hashCode() { } @JsonDeserialize(builder = LineStatusInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LineStatusInfo { @@ -1163,6 +1177,7 @@ public static LineStatusInfo fromJson( return mapper.readValue(jsonString, LineStatusInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1215,6 +1230,7 @@ public int hashCode() { } @JsonDeserialize(builder = CallerNameInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CallerNameInfo { @@ -1251,6 +1267,7 @@ public static CallerNameInfo fromJson( return mapper.readValue(jsonString, CallerNameInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1449,9 +1466,9 @@ private PhoneNumber( ) final SmsPumpingRiskInfo smsPumpingRisk, @JsonProperty("url") final URI url, @JsonProperty("valid") final Boolean valid, - @JsonProperty("validation_errors") final List< - PhoneNumber.ValidationError - > validationErrors + @JsonProperty( + "validation_errors" + ) final List validationErrors ) { this.callForwarding = callForwarding; this.callerName = callerName; diff --git a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumberFetcher.java index 8ba3807a3a..3bc537c4b1 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v2/PhoneNumberFetcher.java @@ -134,11 +134,10 @@ public PhoneNumberFetcher setPartnerSubId(final String partnerSubId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, 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 4e6411e06e..e4765ee303 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/Query.java +++ b/src/main/java/com/twilio/rest/lookups/v2/Query.java @@ -79,6 +79,7 @@ public static Fields forValue(final String value) { } @JsonDeserialize(builder = LookupBatchRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LookupBatchRequest { @@ -139,6 +140,7 @@ public static LookupBatchRequest fromJson( return mapper.readValue(jsonString, LookupBatchRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -258,6 +260,7 @@ public int hashCode() { } @JsonDeserialize(builder = LookupBatchResponse.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LookupBatchResponse { @@ -384,6 +387,7 @@ public static LookupBatchResponse fromJson( return mapper.readValue(jsonString, LookupBatchResponse.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -643,6 +647,7 @@ public int hashCode() { } @JsonDeserialize(builder = LastSimSwapInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LastSimSwapInfo { @@ -681,6 +686,7 @@ public static LastSimSwapInfo fromJson( return mapper.readValue(jsonString, LastSimSwapInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -756,6 +762,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReassignedNumberParameters.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReassignedNumberParameters { @@ -783,6 +790,7 @@ public static ReassignedNumberParameters fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -812,7 +820,7 @@ public boolean equals(final Object o) { } ReassignedNumberParameters other = (ReassignedNumberParameters) o; - return (Objects.equals(lastVerifiedDate, other.lastVerifiedDate)); + return Objects.equals(lastVerifiedDate, other.lastVerifiedDate); } @Override @@ -822,6 +830,7 @@ public int hashCode() { } @JsonDeserialize(builder = RiskParameters.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RiskParameters { @@ -846,6 +855,7 @@ public static RiskParameters fromJson( return mapper.readValue(jsonString, RiskParameters.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -875,7 +885,7 @@ public boolean equals(final Object o) { } RiskParameters other = (RiskParameters) o; - return (Objects.equals(partnerSubId, other.partnerSubId)); + return Objects.equals(partnerSubId, other.partnerSubId); } @Override @@ -885,6 +895,7 @@ public int hashCode() { } @JsonDeserialize(builder = LineStatusInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LineStatusInfo { @@ -915,6 +926,7 @@ public static LineStatusInfo fromJson( return mapper.readValue(jsonString, LineStatusInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -967,6 +979,7 @@ public int hashCode() { } @JsonDeserialize(builder = LookupRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LookupRequest { @@ -991,6 +1004,7 @@ public static LookupRequest fromJson( return mapper.readValue(jsonString, LookupRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1020,7 +1034,7 @@ public boolean equals(final Object o) { } LookupRequest other = (LookupRequest) o; - return (Objects.equals(phoneNumbers, other.phoneNumbers)); + return Objects.equals(phoneNumbers, other.phoneNumbers); } @Override @@ -1030,6 +1044,7 @@ public int hashCode() { } @JsonDeserialize(builder = CallForwardingInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CallForwardingInfo { @@ -1060,6 +1075,7 @@ public static CallForwardingInfo fromJson( return mapper.readValue(jsonString, CallForwardingInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1105,8 +1121,7 @@ public boolean equals(final Object o) { Objects.equals( callForwardingEnabled, other.callForwardingEnabled - ) && - Objects.equals(errorCode, other.errorCode) + ) && Objects.equals(errorCode, other.errorCode) ); } @@ -1117,6 +1132,7 @@ public int hashCode() { } @JsonDeserialize(builder = SmsPumpingRiskInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SmsPumpingRiskInfo { @@ -1173,6 +1189,7 @@ public static SmsPumpingRiskInfo fromJson( return mapper.readValue(jsonString, SmsPumpingRiskInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1295,6 +1312,7 @@ public int hashCode() { } @JsonDeserialize(builder = ReassignedNumberInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ReassignedNumberInfo { @@ -1331,6 +1349,7 @@ public static ReassignedNumberInfo fromJson( return mapper.readValue(jsonString, ReassignedNumberInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1398,6 +1417,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentityMatchParameters.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentityMatchParameters { @@ -1476,6 +1496,7 @@ public static IdentityMatchParameters fromJson( return mapper.readValue(jsonString, IdentityMatchParameters.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1627,6 +1648,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentityMatchInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentityMatchInfo { @@ -1717,6 +1739,7 @@ public static IdentityMatchInfo fromJson( return mapper.readValue(jsonString, IdentityMatchInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1895,6 +1918,7 @@ public int hashCode() { } @JsonDeserialize(builder = LineTypeIntelligenceInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class LineTypeIntelligenceInfo { @@ -1943,6 +1967,7 @@ public static LineTypeIntelligenceInfo fromJson( return mapper.readValue(jsonString, LineTypeIntelligenceInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2034,6 +2059,7 @@ public int hashCode() { } @JsonDeserialize(builder = SimSwapInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SimSwapInfo { @@ -2082,6 +2108,7 @@ public static SimSwapInfo fromJson( return mapper.readValue(jsonString, SimSwapInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2173,6 +2200,7 @@ public int hashCode() { } @JsonDeserialize(builder = CallerNameInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CallerNameInfo { @@ -2209,6 +2237,7 @@ public static CallerNameInfo fromJson( return mapper.readValue(jsonString, CallerNameInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2331,9 +2360,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private Query( - @JsonProperty("phone_numbers") final List< - LookupBatchResponse - > phoneNumbers + @JsonProperty( + "phone_numbers" + ) final List phoneNumbers ) { this.phoneNumbers = phoneNumbers; } @@ -2349,7 +2378,7 @@ public boolean equals(final Object o) { } Query other = (Query) o; - return (Objects.equals(phoneNumbers, other.phoneNumbers)); + return Objects.equals(phoneNumbers, other.phoneNumbers); } @Override 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..137b621a20 100644 --- a/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java +++ b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java @@ -48,6 +48,7 @@ public static RateLimitFetcher fetcher() { } @JsonDeserialize(builder = RateLimitResponse.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RateLimitResponse { @@ -96,6 +97,7 @@ public static RateLimitResponse fromJson( return mapper.readValue(jsonString, RateLimitResponse.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -256,7 +258,7 @@ public boolean equals(final Object o) { } RateLimit other = (RateLimit) o; - return (Objects.equals(rateLimits, other.rateLimits)); + return Objects.equals(rateLimits, other.rateLimits); } @Override 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..19c5eed743 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/ReferralConversion.java @@ -49,6 +49,7 @@ public static ReferralConversionCreator creator( } @JsonDeserialize(builder = CreateReferralConversionRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateReferralConversionRequest { @@ -76,6 +77,7 @@ public static CreateReferralConversionRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -106,9 +108,7 @@ public boolean equals(final Object o) { CreateReferralConversionRequest other = (CreateReferralConversionRequest) o; - return ( - Objects.equals(referralAccountSid, other.referralAccountSid) - ); + return Objects.equals(referralAccountSid, other.referralAccountSid); } @Override @@ -193,7 +193,7 @@ public boolean equals(final Object o) { } ReferralConversion other = (ReferralConversion) o; - return (Objects.equals(convertedAccountSid, other.convertedAccountSid)); + return Objects.equals(convertedAccountSid, other.convertedAccountSid); } @Override diff --git a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionFetcher.java b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionFetcher.java index 770a9bee38..9de89687ed 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionFetcher.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AvailableAddOnExtensionFetcher - extends Fetcher { + extends Fetcher +{ private String pathAvailableAddOnSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "AvailableAddOnSid" + "}", - this.pathAvailableAddOnSid.toString() - ); + path = path.replace( + "{" + "AvailableAddOnSid" + "}", + this.pathAvailableAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionReader.java b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionReader.java index 3025e40a3f..e797537c60 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionReader.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/availableaddon/AvailableAddOnExtensionReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AvailableAddOnExtensionReader - extends Reader { + extends Reader +{ private String pathAvailableAddOnSid; private Integer pageSize; @@ -74,11 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/AvailableAddOns/{AvailableAddOnSid}/Extensions"; - path = - path.replace( - "{" + "AvailableAddOnSid" + "}", - this.pathAvailableAddOnSid.toString() - ); + path = path.replace( + "{" + "AvailableAddOnSid" + "}", + this.pathAvailableAddOnSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionFetcher.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionFetcher.java index 86a4e2a257..1237c4a543 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionFetcher.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionFetcher - extends Fetcher { + extends Fetcher +{ private String pathInstalledAddOnSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionReader.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionReader.java index 8028fb8909..6d5ba05c55 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionReader.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionReader - extends Reader { + extends Reader +{ private String pathInstalledAddOnSid; private Integer pageSize; @@ -74,11 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionUpdater.java b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionUpdater.java index 47c7f79865..f93b2da380 100644 --- a/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionUpdater.java +++ b/src/main/java/com/twilio/rest/marketplace/v1/installedaddon/InstalledAddOnExtensionUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionUpdater - extends Updater { + extends Updater +{ private String pathInstalledAddOnSid; private String pathSid; @@ -56,11 +57,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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..7ffda82364 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 @@ -57,6 +57,7 @@ public static InstalledAddOnUsageCreator creator( @JsonDeserialize( builder = MarketplaceV1InstalledAddOnInstalledAddOnUsage.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MarketplaceV1InstalledAddOnInstalledAddOnUsage { @@ -69,9 +70,7 @@ public static class MarketplaceV1InstalledAddOnInstalledAddOnUsage { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("billable_items") @Getter - private final List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems; + private final List billableItems; private MarketplaceV1InstalledAddOnInstalledAddOnUsage( Builder builder @@ -81,9 +80,7 @@ private MarketplaceV1InstalledAddOnInstalledAddOnUsage( } public static Builder builder( - final List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems + final List billableItems ) { return new Builder(billableItems); } @@ -98,6 +95,7 @@ public static MarketplaceV1InstalledAddOnInstalledAddOnUsage fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -105,15 +103,13 @@ public static class Builder { private BigDecimal totalSubmitted; @JsonProperty("billable_items") - private List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems; + private List billableItems; @JsonCreator public Builder( - @JsonProperty("billable_items") final List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems + @JsonProperty( + "billable_items" + ) final List billableItems ) { this.billableItems = billableItems; } @@ -157,6 +153,7 @@ public int hashCode() { @JsonDeserialize( builder = MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems { @@ -201,6 +198,7 @@ public static MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems fromJs ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -317,18 +315,16 @@ public static String toJson(Object object, ObjectMapper mapper) { } @Getter - private final List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems; + private final List billableItems; @Getter private final BigDecimal totalSubmitted; @JsonCreator private InstalledAddOnUsage( - @JsonProperty("billable_items") final List< - MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems - > billableItems, + @JsonProperty( + "billable_items" + ) final List billableItems, @JsonProperty("total_submitted") final BigDecimal totalSubmitted ) { this.billableItems = billableItems; 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..7930ca5c0a 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 @@ -54,11 +54,10 @@ public InstalledAddOnUsageCreator setMarketplaceV1InstalledAddOnInstalledAddOnUs private Response makeRequest(final TwilioRestClient client) { String path = "/v1/InstalledAddOns/{InstalledAddOnSid}/Usage"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/memory/v1/Bulk.java b/src/main/java/com/twilio/rest/memory/v1/Bulk.java index 87b3c38dd3..6960e8d44f 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Bulk.java +++ b/src/main/java/com/twilio/rest/memory/v1/Bulk.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -120,7 +120,7 @@ public boolean equals(final Object o) { return false; } UpdateBulkResponse other = (UpdateBulkResponse) o; - return (Objects.equals(message, other.message)); + return Objects.equals(message, other.message); } @Override @@ -198,7 +198,7 @@ public boolean equals(final Object o) { return false; } ListBulkResponse other = (ListBulkResponse) o; - return (true); + return true; } @Override @@ -293,6 +293,7 @@ public static BulkUpdater updater( } @JsonDeserialize(builder = UpdateProfilesBulkRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class UpdateProfilesBulkRequest { @@ -320,6 +321,7 @@ public static UpdateProfilesBulkRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -349,7 +351,7 @@ public boolean equals(final Object o) { } UpdateProfilesBulkRequest other = (UpdateProfilesBulkRequest) o; - return (Objects.equals(profiles, other.profiles)); + return Objects.equals(profiles, other.profiles); } @Override @@ -359,6 +361,7 @@ public int hashCode() { } @JsonDeserialize(builder = ProfileData.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ProfileData { @@ -383,6 +386,7 @@ public static ProfileData fromJson( return mapper.readValue(jsonString, ProfileData.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -412,7 +416,7 @@ public boolean equals(final Object o) { } ProfileData other = (ProfileData) o; - return (Objects.equals(traits, other.traits)); + return Objects.equals(traits, other.traits); } @Override diff --git a/src/main/java/com/twilio/rest/memory/v1/BulkUpdater.java b/src/main/java/com/twilio/rest/memory/v1/BulkUpdater.java index 38857f873a..3a1a6a4329 100644 --- a/src/main/java/com/twilio/rest/memory/v1/BulkUpdater.java +++ b/src/main/java/com/twilio/rest/memory/v1/BulkUpdater.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -71,16 +70,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummary.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummary.java index bf7129d453..9b20cffcaf 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummary.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummary.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -131,7 +131,7 @@ public boolean equals(final Object o) { } UpdateConversationSummaryResponse other = (UpdateConversationSummaryResponse) o; - return (true); + return true; } @Override @@ -513,6 +513,7 @@ public static ContentEncoding forValue(final String value) { } @JsonDeserialize(builder = CreateSummariesRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateSummariesRequest { @@ -537,6 +538,7 @@ public static CreateSummariesRequest fromJson( return mapper.readValue(jsonString, CreateSummariesRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -566,7 +568,7 @@ public boolean equals(final Object o) { } CreateSummariesRequest other = (CreateSummariesRequest) o; - return (Objects.equals(summaries, other.summaries)); + return Objects.equals(summaries, other.summaries); } @Override @@ -576,6 +578,7 @@ public int hashCode() { } @JsonDeserialize(builder = ObservationsMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ObservationsMeta { @@ -618,6 +621,7 @@ public static ObservationsMeta fromJson( return mapper.readValue(jsonString, ObservationsMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -692,6 +696,7 @@ public int hashCode() { } @JsonDeserialize(builder = SummaryCorePatch.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SummaryCorePatch { @@ -736,6 +741,7 @@ public static SummaryCorePatch fromJson( return mapper.readValue(jsonString, SummaryCorePatch.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -818,6 +824,7 @@ public int hashCode() { } @JsonDeserialize(builder = SummaryCore.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SummaryCore { @@ -866,6 +873,7 @@ public static SummaryCore fromJson( return mapper.readValue(jsonString, SummaryCore.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -934,6 +942,7 @@ public int hashCode() { } @JsonDeserialize(builder = SummaryInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class SummaryInfo { @@ -1014,6 +1023,7 @@ public static SummaryInfo fromJson( return mapper.readValue(jsonString, SummaryInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryCreator.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryCreator.java index 87552f4699..0dda494352 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -32,7 +32,8 @@ import java.io.InputStream; public class ConversationSummaryCreator - extends Creator { + extends Creator +{ private String pathStoreId; private String pathProfileId; @@ -76,11 +77,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.POST, @@ -126,9 +126,9 @@ public ConversationSummary.CreateConversationSummaryResponse create( } @Override - public TwilioResponse< - ConversationSummary.CreateConversationSummaryResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); ConversationSummary.CreateConversationSummaryResponse content = ConversationSummary.CreateConversationSummaryResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryDeleter.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryDeleter.java index df8bd22015..652467a54a 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,7 +32,8 @@ public class ConversationSummaryDeleter extends ResourceDeleter< ConversationSummary, ConversationSummary.DeleteConversationSummaryResponse - > { + > +{ private String pathStoreId; private String pathProfileId; @@ -54,16 +54,14 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries/{summaryId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "summaryId" + "}", - this.pathSummaryId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "summaryId" + "}", + this.pathSummaryId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -81,16 +79,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -118,9 +106,9 @@ public ConversationSummary.DeleteConversationSummaryResponse delete( } @Override - public TwilioResponse< - ConversationSummary.DeleteConversationSummaryResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); ConversationSummary.DeleteConversationSummaryResponse content = ConversationSummary.DeleteConversationSummaryResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryFetcher.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryFetcher.java index 350ab42fb7..14d6487581 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class ConversationSummaryFetcher - extends Fetcher { + extends Fetcher +{ private String pathStoreId; private String pathProfileId; @@ -50,16 +50,14 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries/{summaryId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "summaryId" + "}", - this.pathSummaryId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "summaryId" + "}", + this.pathSummaryId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -75,16 +73,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -112,9 +100,9 @@ public ConversationSummary.FetchConversationSummaryResponse fetch( } @Override - public TwilioResponse< - ConversationSummary.FetchConversationSummaryResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); ConversationSummary.FetchConversationSummaryResponse content = ConversationSummary.FetchConversationSummaryResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryPatcher.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryPatcher.java index f9be3acb63..85006f7498 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryPatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryPatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -20,7 +20,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,7 +29,8 @@ import java.io.InputStream; public class ConversationSummaryPatcher - extends Patcher { + extends Patcher +{ private String pathStoreId; private String pathProfileId; @@ -64,16 +64,14 @@ public ConversationSummary.PatchConversationSummaryResponse patch( "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries/{summaryId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "summaryId" + "}", - this.pathSummaryId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "summaryId" + "}", + this.pathSummaryId.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -91,16 +89,6 @@ public ConversationSummary.PatchConversationSummaryResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryReader.java b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryReader.java index 459fc49c89..7c74a51cfd 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/ConversationSummaryReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -36,12 +36,14 @@ import java.io.InputStream; public class ConversationSummaryReader - extends Reader { + extends Reader +{ private String pathStoreId; private String pathProfileId; private Integer pageSize; private String pageToken; + private String conversationId; private String acceptEncoding; public ConversationSummaryReader( @@ -62,6 +64,13 @@ public ConversationSummaryReader setPageToken(final String pageToken) { return this; } + public ConversationSummaryReader setConversationId( + final String conversationId + ) { + this.conversationId = conversationId; + return this; + } + public ConversationSummaryReader setAcceptEncoding( final String acceptEncoding ) { @@ -69,9 +78,9 @@ public ConversationSummaryReader setAcceptEncoding( return this; } - public ResourceSetResponse< - ConversationSummary.ListConversationSummaryResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = @@ -81,9 +90,8 @@ > readWithResponse(final TwilioRestClient client) { ConversationSummary.ListConversationSummaryResponse.class, client.getObjectMapper() ); - ResourceSet< - ConversationSummary.ListConversationSummaryResponse - > resourceSet = new ResourceSet<>(this, client, page); + ResourceSet resourceSet = + new ResourceSet<>(this, client, page); return new ResourceSetResponse<>( resourceSet, response.getStatusCode(), @@ -96,11 +104,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -113,9 +120,9 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { } @Override - public ResourceSet< - ConversationSummary.ListConversationSummaryResponse - > read(final TwilioRestClient client) { + public ResourceSet read( + final TwilioRestClient client + ) { return new ResourceSet<>(this, client, firstPage(client)); } @@ -182,9 +189,10 @@ private Response makeRequest( return response; } - private Page< - ConversationSummary.ListConversationSummaryResponse - > pageForRequest(final TwilioRestClient client, final Request request) { + private Page pageForRequest( + final TwilioRestClient client, + final Request request + ) { Response response = makeRequest(client, request); return TokenPaginationPage.fromJson( "summaries", @@ -195,9 +203,7 @@ > pageForRequest(final TwilioRestClient client, final Request request) { } @Override - public Page< - ConversationSummary.ListConversationSummaryResponse - > previousPage( + public Page previousPage( final Page page, final TwilioRestClient client ) { @@ -205,11 +211,10 @@ > previousPage( "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -230,11 +235,10 @@ public Page nextPage( "/v1/Stores/{storeId}/Profiles/{profileId}/ConversationSummaries"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( @@ -279,6 +283,15 @@ private void addQueryParams(final Request request) { ); } + if (conversationId != null) { + Serializer.toString( + request, + "conversationId", + conversationId, + ParameterType.QUERY + ); + } + if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMapping.java b/src/main/java/com/twilio/rest/memory/v1/DataMapping.java index 32da91ffbb..8bb89064a1 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMapping.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMapping.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -137,7 +137,7 @@ public boolean equals(final Object o) { return false; } UpdateDataMappingResponse other = (UpdateDataMappingResponse) o; - return (true); + return true; } @Override @@ -222,7 +222,7 @@ public static class ListDataMappingResponse extends Resource { private final Boolean isEnabled; @Getter - private final DataMappingFromDataSet mappingFrom; + private final DataMappingFromTypes mappingFrom; @Getter private final DataMappingToTraits mappingTo; @@ -240,9 +240,7 @@ private ListDataMappingResponse( @JsonProperty("displayName") final String displayName, @JsonProperty("id") final String id, @JsonProperty("isEnabled") final Boolean isEnabled, - @JsonProperty( - "mappingFrom" - ) final DataMappingFromDataSet mappingFrom, + @JsonProperty("mappingFrom") final DataMappingFromTypes mappingFrom, @JsonProperty("mappingTo") final DataMappingToTraits mappingTo, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, @JsonProperty("version") final Integer version @@ -390,7 +388,7 @@ public static class FetchDataMappingResponse extends Resource { private final Boolean isEnabled; @Getter - private final DataMappingFromDataSet mappingFrom; + private final DataMappingFromTypes mappingFrom; @Getter private final DataMappingToTraits mappingTo; @@ -408,9 +406,7 @@ private FetchDataMappingResponse( @JsonProperty("displayName") final String displayName, @JsonProperty("id") final String id, @JsonProperty("isEnabled") final Boolean isEnabled, - @JsonProperty( - "mappingFrom" - ) final DataMappingFromDataSet mappingFrom, + @JsonProperty("mappingFrom") final DataMappingFromTypes mappingFrom, @JsonProperty("mappingTo") final DataMappingToTraits mappingTo, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, @JsonProperty("version") final Integer version @@ -556,7 +552,9 @@ public static Type forValue(final String value) { } public enum DataMappingType { - DATASET("DATASET"); + INGRESS("INGRESS"), + DATASET_CLOUDAPP("DATASET_CLOUDAPP"), + DATASET_WAREHOUSE("DATASET_WAREHOUSE"); private final String value; @@ -576,6 +574,7 @@ public static DataMappingType forValue(final String value) { } @JsonDeserialize(builder = Meta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Meta { @@ -616,6 +615,7 @@ public static Meta fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Meta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -690,6 +690,7 @@ public int hashCode() { } @JsonDeserialize(builder = DataMappingCore.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class DataMappingCore { @@ -732,6 +733,7 @@ public static DataMappingCore fromJson( return mapper.readValue(jsonString, DataMappingCore.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -805,7 +807,109 @@ public int hashCode() { } } + @JsonDeserialize(builder = DataMappingFromTypes.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class DataMappingFromTypes { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final DataMapping.Type type; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("columns") + @Getter + private final List columns; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("datasetId") + @Getter + private final String datasetId; + + private DataMappingFromTypes(Builder builder) { + this.type = builder.type; + this.columns = builder.columns; + this.datasetId = builder.datasetId; + } + + public static Builder builder() { + return new Builder(); + } + + public static DataMappingFromTypes fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, DataMappingFromTypes.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("type") + private DataMapping.Type type; + + @JsonProperty("columns") + private List columns; + + @JsonProperty("datasetId") + private String datasetId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + public Builder type(DataMapping.Type type) { + this.type = type; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("columns") + public Builder columns(List columns) { + this.columns = columns; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("datasetId") + public Builder datasetId(String datasetId) { + this.datasetId = datasetId; + return this; + } + + public DataMappingFromTypes build() { + return new DataMappingFromTypes(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + DataMappingFromTypes other = (DataMappingFromTypes) o; + return ( + Objects.equals(type, other.type) && + Objects.equals(columns, other.columns) && + Objects.equals(datasetId, other.datasetId) + ); + } + + @Override + public int hashCode() { + return Objects.hash(type, columns, datasetId); + } + } + @JsonDeserialize(builder = DataMappingToTraits.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class DataMappingToTraits { @@ -839,6 +943,7 @@ public static DataMappingToTraits fromJson( return mapper.readValue(jsonString, DataMappingToTraits.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -886,15 +991,11 @@ public int hashCode() { } @JsonDeserialize(builder = MappingTraitItem.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MappingTraitItem { - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("fieldName") - @Getter - private final String fieldName; - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("expression") @Getter @@ -911,18 +1012,17 @@ public static class MappingTraitItem { private final String traitName; private MappingTraitItem(Builder builder) { - this.fieldName = builder.fieldName; this.expression = builder.expression; this.traitGroup = builder.traitGroup; this.traitName = builder.traitName; } public static Builder builder( - final String fieldName, + final String expression, final String traitGroup, final String traitName ) { - return new Builder(fieldName, traitGroup, traitName); + return new Builder(expression, traitGroup, traitName); } public static MappingTraitItem fromJson( @@ -932,12 +1032,10 @@ public static MappingTraitItem fromJson( return mapper.readValue(jsonString, MappingTraitItem.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("fieldName") - private String fieldName; - @JsonProperty("expression") private String expression; @@ -949,22 +1047,15 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("fieldName") final String fieldName, + @JsonProperty("expression") final String expression, @JsonProperty("traitGroup") final String traitGroup, @JsonProperty("traitName") final String traitName ) { - this.fieldName = fieldName; + this.expression = expression; this.traitGroup = traitGroup; this.traitName = traitName; } - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("expression") - public Builder expression(String expression) { - this.expression = expression; - return this; - } - public MappingTraitItem build() { return new MappingTraitItem(this); } @@ -982,7 +1073,6 @@ public boolean equals(final Object o) { MappingTraitItem other = (MappingTraitItem) o; return ( - Objects.equals(fieldName, other.fieldName) && Objects.equals(expression, other.expression) && Objects.equals(traitGroup, other.traitGroup) && Objects.equals(traitName, other.traitName) @@ -991,11 +1081,12 @@ public boolean equals(final Object o) { @Override public int hashCode() { - return Objects.hash(fieldName, expression, traitGroup, traitName); + return Objects.hash(expression, traitGroup, traitName); } } @JsonDeserialize(builder = CreateDataMappingInput.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateDataMappingInput { @@ -1023,7 +1114,7 @@ public static class CreateDataMappingInput { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("mappingFrom") @Getter - private final DataMappingFromDataSet mappingFrom; + private final DataMappingFromTypes mappingFrom; private CreateDataMappingInput(Builder builder) { this.displayName = builder.displayName; @@ -1036,7 +1127,7 @@ private CreateDataMappingInput(Builder builder) { public static Builder builder( final String displayName, final DataMappingToTraits mappingTo, - final DataMappingFromDataSet mappingFrom + final DataMappingFromTypes mappingFrom ) { return new Builder(displayName, mappingTo, mappingFrom); } @@ -1048,6 +1139,7 @@ public static CreateDataMappingInput fromJson( return mapper.readValue(jsonString, CreateDataMappingInput.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1064,7 +1156,7 @@ public static class Builder { private DataMappingToTraits mappingTo; @JsonProperty("mappingFrom") - private DataMappingFromDataSet mappingFrom; + private DataMappingFromTypes mappingFrom; @JsonCreator public Builder( @@ -1072,7 +1164,7 @@ public Builder( @JsonProperty("mappingTo") final DataMappingToTraits mappingTo, @JsonProperty( "mappingFrom" - ) final DataMappingFromDataSet mappingFrom + ) final DataMappingFromTypes mappingFrom ) { this.displayName = displayName; this.mappingTo = mappingTo; @@ -1130,87 +1222,8 @@ public int hashCode() { } } - @JsonDeserialize(builder = DataMappingFromDataSet.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class DataMappingFromDataSet { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final DataMapping.Type type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("datasetId") - @Getter - private final String datasetId; - - private DataMappingFromDataSet(Builder builder) { - this.type = builder.type; - this.datasetId = builder.datasetId; - } - - public static Builder builder( - final DataMapping.Type type, - final String datasetId - ) { - return new Builder(type, datasetId); - } - - public static DataMappingFromDataSet fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue(jsonString, DataMappingFromDataSet.class); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("type") - private DataMapping.Type type; - - @JsonProperty("datasetId") - private String datasetId; - - @JsonCreator - public Builder( - @JsonProperty("type") final DataMapping.Type type, - @JsonProperty("datasetId") final String datasetId - ) { - this.type = type; - this.datasetId = datasetId; - } - - public DataMappingFromDataSet build() { - return new DataMappingFromDataSet(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - DataMappingFromDataSet other = (DataMappingFromDataSet) o; - return ( - Objects.equals(type, other.type) && - Objects.equals(datasetId, other.datasetId) - ); - } - - @Override - public int hashCode() { - return Objects.hash(type, datasetId); - } - } - @JsonDeserialize(builder = _DataMapping.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class _DataMapping { @@ -1238,7 +1251,7 @@ public static class _DataMapping { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("mappingFrom") @Getter - private final DataMappingFromDataSet mappingFrom; + private final DataMappingFromTypes mappingFrom; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("id") @@ -1279,7 +1292,7 @@ private _DataMapping(Builder builder) { public static Builder builder( final String displayName, final DataMappingToTraits mappingTo, - final DataMappingFromDataSet mappingFrom, + final DataMappingFromTypes mappingFrom, final String id, final ZonedDateTime createdAt, final ZonedDateTime updatedAt, @@ -1303,6 +1316,7 @@ public static _DataMapping fromJson( return mapper.readValue(jsonString, _DataMapping.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1319,7 +1333,7 @@ public static class Builder { private DataMappingToTraits mappingTo; @JsonProperty("mappingFrom") - private DataMappingFromDataSet mappingFrom; + private DataMappingFromTypes mappingFrom; @JsonProperty("id") private String id; @@ -1347,7 +1361,7 @@ public Builder( @JsonProperty("mappingTo") final DataMappingToTraits mappingTo, @JsonProperty( "mappingFrom" - ) final DataMappingFromDataSet mappingFrom, + ) final DataMappingFromTypes mappingFrom, @JsonProperty("id") final String id, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("updatedAt") final ZonedDateTime updatedAt, diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMappingCreator.java b/src/main/java/com/twilio/rest/memory/v1/DataMappingCreator.java index e817e3ef5a..68923d20bc 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMappingCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMappingCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -30,7 +30,8 @@ import java.io.InputStream; public class DataMappingCreator - extends Creator { + extends Creator +{ private String pathStoreId; private DataMapping.CreateDataMappingInput createDataMappingInput; @@ -98,9 +99,9 @@ public DataMapping.CreateDataMappingResponse create( } @Override - public TwilioResponse< - DataMapping.CreateDataMappingResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); DataMapping.CreateDataMappingResponse content = DataMapping.CreateDataMappingResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMappingDeleter.java b/src/main/java/com/twilio/rest/memory/v1/DataMappingDeleter.java index 4e68de0044..460c2a0f38 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMappingDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMappingDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,10 +29,8 @@ import java.util.function.Predicate; public class DataMappingDeleter - extends ResourceDeleter< - DataMapping, - DataMapping.DeleteDataMappingResponse - > { + extends ResourceDeleter +{ private String pathStoreId; private String pathDataMappingId; @@ -51,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/ControlPlane/Stores/{storeId}/DataMappings/{dataMappingId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "dataMappingId" + "}", - this.pathDataMappingId.toString() - ); + path = path.replace( + "{" + "dataMappingId" + "}", + this.pathDataMappingId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -73,16 +69,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -110,9 +96,9 @@ public DataMapping.DeleteDataMappingResponse delete( } @Override - public TwilioResponse< - DataMapping.DeleteDataMappingResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); DataMapping.DeleteDataMappingResponse content = DataMapping.DeleteDataMappingResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMappingFetcher.java b/src/main/java/com/twilio/rest/memory/v1/DataMappingFetcher.java index 5b58727481..a0374d0ebb 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMappingFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMappingFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class DataMappingFetcher - extends Fetcher { + extends Fetcher +{ private String pathStoreId; private String pathDataMappingId; @@ -47,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/ControlPlane/Stores/{storeId}/DataMappings/{dataMappingId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "dataMappingId" + "}", - this.pathDataMappingId.toString() - ); + path = path.replace( + "{" + "dataMappingId" + "}", + this.pathDataMappingId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -67,16 +66,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -104,9 +93,9 @@ public DataMapping.FetchDataMappingResponse fetch( } @Override - public TwilioResponse< - DataMapping.FetchDataMappingResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); DataMapping.FetchDataMappingResponse content = DataMapping.FetchDataMappingResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMappingPatcher.java b/src/main/java/com/twilio/rest/memory/v1/DataMappingPatcher.java index d508c500bf..7e52e678e9 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMappingPatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMappingPatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -22,7 +22,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -32,7 +31,8 @@ import java.io.InputStream; public class DataMappingPatcher - extends Patcher { + extends Patcher +{ private String pathStoreId; private String pathDataMappingId; @@ -67,11 +67,10 @@ public DataMapping.PatchDataMappingResponse patch( "/v1/ControlPlane/Stores/{storeId}/DataMappings/{dataMappingId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "dataMappingId" + "}", - this.pathDataMappingId.toString() - ); + path = path.replace( + "{" + "dataMappingId" + "}", + this.pathDataMappingId.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -90,16 +89,6 @@ public DataMapping.PatchDataMappingResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/DataMappingReader.java b/src/main/java/com/twilio/rest/memory/v1/DataMappingReader.java index 7e1c6267aa..96b7e71ee1 100644 --- a/src/main/java/com/twilio/rest/memory/v1/DataMappingReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/DataMappingReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -36,7 +36,8 @@ import java.io.InputStream; public class DataMappingReader - extends Reader { + extends Reader +{ private String pathStoreId; private Integer pageSize; @@ -68,9 +69,9 @@ public DataMappingReader setType(final DataMapping.DataMappingType type) { return this; } - public ResourceSetResponse< - DataMapping.ListDataMappingResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/Event.java b/src/main/java/com/twilio/rest/memory/v1/Event.java deleted file mode 100644 index 96ef0079c0..0000000000 --- a/src/main/java/com/twilio/rest/memory/v1/Event.java +++ /dev/null @@ -1,924 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.memory.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.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.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.twilio.base.Resource; -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; -import java.util.Objects; -import lombok.Builder; -import lombok.Getter; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Event extends Resource { - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class CreateEventResponse extends Resource { - - @Getter - private final String message; - - @JsonCreator - private CreateEventResponse( - @JsonProperty("message") final String message - ) { - this.message = message; - } - - public static CreateEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, CreateEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEventResponse other = (CreateEventResponse) o; - return Objects.equals(message, other.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class UpdateEventResponse extends Resource { - - @JsonCreator - private UpdateEventResponse() {} - - public static UpdateEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, UpdateEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateEventResponse other = (UpdateEventResponse) o; - return (true); - } - - @Override - public int hashCode() { - return Objects.hash(); - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class DeleteEventResponse extends Resource { - - @JsonCreator - private DeleteEventResponse() {} - - public static DeleteEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, DeleteEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteEventResponse other = (DeleteEventResponse) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class ListEventResponse extends Resource { - - @JsonCreator - private ListEventResponse() {} - - public static ListEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, ListEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - ListEventResponse other = (ListEventResponse) o; - return (true); - } - - @Override - public int hashCode() { - return Objects.hash(); - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class PatchEventResponse extends Resource { - - @JsonCreator - private PatchEventResponse() {} - - public static PatchEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, PatchEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchEventResponse other = (PatchEventResponse) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static class FetchEventResponse extends Resource { - - @JsonCreator - private FetchEventResponse() {} - - public static FetchEventResponse fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, FetchEventResponse.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - FetchEventResponse other = (FetchEventResponse) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - } - - public static EventCreator creator( - final String pathStoreId, - final String pathProfileId - ) { - return new EventCreator(pathStoreId, pathProfileId); - } - - public enum Type { - TWILIO_COMMUNICATION_EVENT("twilio-communication-event"), - TWILIO_COMMS_LIFECYCLE("twilio-comms-lifecycle"); - - private final String value; - - private Type(final String value) { - this.value = value; - } - - @JsonValue - public String toString() { - return value; - } - - @JsonCreator - public static Type forValue(final String value) { - return Promoter.enumFromString(value, Type.values()); - } - } - - public enum Direction { - INBOUND("INBOUND"), - OUTBOUND("OUTBOUND"); - - private final String value; - - private Direction(final String value) { - this.value = value; - } - - @JsonValue - public String toString() { - return value; - } - - @JsonCreator - public static Direction forValue(final String value) { - return Promoter.enumFromString(value, Direction.values()); - } - } - - @JsonDeserialize( - builder = CommunicationLifecycleEventRecipient.Builder.class - ) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class CommunicationLifecycleEventRecipient { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("address") - @Getter - private final String address; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") - @Getter - private final String participantId; - - private CommunicationLifecycleEventRecipient(Builder builder) { - this.address = builder.address; - this.participantId = builder.participantId; - } - - public static Builder builder( - final String address, - final String participantId - ) { - return new Builder(address, participantId); - } - - public static CommunicationLifecycleEventRecipient fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - CommunicationLifecycleEventRecipient.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("address") - private String address; - - @JsonProperty("participantId") - private String participantId; - - @JsonCreator - public Builder( - @JsonProperty("address") final String address, - @JsonProperty("participantId") final String participantId - ) { - this.address = address; - this.participantId = participantId; - } - - public CommunicationLifecycleEventRecipient build() { - return new CommunicationLifecycleEventRecipient(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - CommunicationLifecycleEventRecipient other = - (CommunicationLifecycleEventRecipient) o; - return ( - Objects.equals(address, other.address) && - Objects.equals(participantId, other.participantId) - ); - } - - @Override - public int hashCode() { - return Objects.hash(address, participantId); - } - } - - @JsonDeserialize(builder = ProfileEventRequest.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class ProfileEventRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - private final Event.Type type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("events") - @Getter - private final List events; - - private ProfileEventRequest(Builder builder) { - this.type = builder.type; - this.events = builder.events; - } - - public static Builder builder( - final Event.Type type, - final List events - ) { - return new Builder(type, events); - } - - public static ProfileEventRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue(jsonString, ProfileEventRequest.class); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("type") - private Event.Type type; - - @JsonProperty("events") - private List events; - - @JsonCreator - public Builder( - @JsonProperty("type") final Event.Type type, - @JsonProperty("events") final List< - ProfileEventRequestEvents - > events - ) { - this.type = type; - this.events = events; - } - - public ProfileEventRequest build() { - return new ProfileEventRequest(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - ProfileEventRequest other = (ProfileEventRequest) o; - return ( - Objects.equals(type, other.type) && - Objects.equals(events, other.events) - ); - } - - @Override - public int hashCode() { - return Objects.hash(type, events); - } - } - - @JsonDeserialize(builder = CommunicationLifecycleEventSender.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class CommunicationLifecycleEventSender { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("address") - @Getter - private final String address; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("participantId") - @Getter - private final String participantId; - - private CommunicationLifecycleEventSender(Builder builder) { - this.address = builder.address; - this.participantId = builder.participantId; - } - - public static Builder builder( - final String address, - final String participantId - ) { - return new Builder(address, participantId); - } - - public static CommunicationLifecycleEventSender fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - CommunicationLifecycleEventSender.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("address") - private String address; - - @JsonProperty("participantId") - private String participantId; - - @JsonCreator - public Builder( - @JsonProperty("address") final String address, - @JsonProperty("participantId") final String participantId - ) { - this.address = address; - this.participantId = participantId; - } - - public CommunicationLifecycleEventSender build() { - return new CommunicationLifecycleEventSender(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - CommunicationLifecycleEventSender other = - (CommunicationLifecycleEventSender) o; - return ( - Objects.equals(address, other.address) && - Objects.equals(participantId, other.participantId) - ); - } - - @Override - public int hashCode() { - return Objects.hash(address, participantId); - } - } - - @JsonDeserialize(builder = ProfileEventRequestEvents.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class ProfileEventRequestEvents { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationId") - @Getter - private final String communicationId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationStatus") - @Getter - private final String communicationStatus; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationType") - @Getter - private final String communicationType; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("conversationId") - @Getter - private final String conversationId; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("direction") - @Getter - private final Event.Direction direction; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("errorCode") - @Getter - private final String errorCode; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("errorMessage") - @Getter - private final String errorMessage; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("lifecycle") - @Getter - private final String lifecycle; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("recipient") - @Getter - private final CommunicationLifecycleEventRecipient recipient; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("sender") - @Getter - private final CommunicationLifecycleEventSender sender; - - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("timestamp") - @Getter - private final ZonedDateTime timestamp; - - private ProfileEventRequestEvents(Builder builder) { - this.communicationId = builder.communicationId; - this.communicationStatus = builder.communicationStatus; - this.communicationType = builder.communicationType; - this.conversationId = builder.conversationId; - this.direction = builder.direction; - this.errorCode = builder.errorCode; - this.errorMessage = builder.errorMessage; - this.lifecycle = builder.lifecycle; - this.recipient = builder.recipient; - this.sender = builder.sender; - this.timestamp = builder.timestamp; - } - - public static Builder builder() { - return new Builder(); - } - - public static ProfileEventRequestEvents fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - ProfileEventRequestEvents.class - ); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("communicationId") - private String communicationId; - - @JsonProperty("communicationStatus") - private String communicationStatus; - - @JsonProperty("communicationType") - private String communicationType; - - @JsonProperty("conversationId") - private String conversationId; - - @JsonProperty("direction") - private Event.Direction direction; - - @JsonProperty("errorCode") - private String errorCode; - - @JsonProperty("errorMessage") - private String errorMessage; - - @JsonProperty("lifecycle") - private String lifecycle; - - @JsonProperty("recipient") - private CommunicationLifecycleEventRecipient recipient; - - @JsonProperty("sender") - private CommunicationLifecycleEventSender sender; - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("timestamp") - private ZonedDateTime timestamp; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationId") - public Builder communicationId(String communicationId) { - this.communicationId = communicationId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationStatus") - public Builder communicationStatus(String communicationStatus) { - this.communicationStatus = communicationStatus; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("communicationType") - public Builder communicationType(String communicationType) { - this.communicationType = communicationType; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("conversationId") - public Builder conversationId(String conversationId) { - this.conversationId = conversationId; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("direction") - public Builder direction(Event.Direction direction) { - this.direction = direction; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("errorCode") - public Builder errorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("errorMessage") - public Builder errorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("lifecycle") - public Builder lifecycle(String lifecycle) { - this.lifecycle = lifecycle; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("recipient") - public Builder recipient( - CommunicationLifecycleEventRecipient recipient - ) { - this.recipient = recipient; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("sender") - public Builder sender(CommunicationLifecycleEventSender sender) { - this.sender = sender; - return this; - } - - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("timestamp") - public Builder timestamp(ZonedDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - public ProfileEventRequestEvents build() { - return new ProfileEventRequestEvents(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - ProfileEventRequestEvents other = (ProfileEventRequestEvents) o; - return ( - Objects.equals(communicationId, other.communicationId) && - Objects.equals( - communicationStatus, - other.communicationStatus - ) && - Objects.equals(communicationType, other.communicationType) && - Objects.equals(conversationId, other.conversationId) && - Objects.equals(direction, other.direction) && - Objects.equals(errorCode, other.errorCode) && - Objects.equals(errorMessage, other.errorMessage) && - Objects.equals(lifecycle, other.lifecycle) && - Objects.equals(recipient, other.recipient) && - Objects.equals(sender, other.sender) && - Objects.equals(timestamp, other.timestamp) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - communicationId, - communicationStatus, - communicationType, - conversationId, - direction, - errorCode, - errorMessage, - lifecycle, - recipient, - sender, - timestamp - ); - } - } - - /** - * Converts a JSON String into a Event object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Event object represented by the provided JSON - */ - public static Event fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Event object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Event object represented by the provided JSON - */ - public static Event fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Event.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException 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); - } - } - - @JsonCreator - private Event() {} - - @Override - public boolean equals(Object obj) { - return obj != null && obj.getClass() == this.getClass(); - } - - @Override - public int hashCode() { - return 1; - } -} diff --git a/src/main/java/com/twilio/rest/memory/v1/EventCreator.java b/src/main/java/com/twilio/rest/memory/v1/EventCreator.java deleted file mode 100644 index fc7d92b808..0000000000 --- a/src/main/java/com/twilio/rest/memory/v1/EventCreator.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. - * - * NOTE: This class is auto generated by OpenAPI Generator. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.twilio.rest.memory.v1; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Creator; -import com.twilio.base.TwilioResponse; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; -import com.twilio.type.*; -import java.io.InputStream; - -public class EventCreator extends Creator { - - private String pathStoreId; - private String pathProfileId; - private Event.ProfileEventRequest profileEventRequest; - - public EventCreator(final String pathStoreId, final String pathProfileId) { - this.pathStoreId = pathStoreId; - this.pathProfileId = pathProfileId; - } - - public EventCreator setProfileEventRequest( - final Event.ProfileEventRequest profileEventRequest - ) { - this.profileEventRequest = profileEventRequest; - return this; - } - - private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Events"; - - path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - - Request request = new Request( - HttpMethod.POST, - Domains.MEMORY.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.JSON); - addPostParams(request, client); - - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "Event creation failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - InputStream inputStream = response.getStream(); - RestException restException = RestException.fromJson( - inputStream, - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response; - } - - @Override - public Event.CreateEventResponse create(final TwilioRestClient client) { - Response response = makeRequest(client); - return Event.CreateEventResponse.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - @Override - public TwilioResponse createWithResponse( - final TwilioRestClient client - ) { - Response response = makeRequest(client); - Event.CreateEventResponse content = Event.CreateEventResponse.fromJson( - response.getStream(), - client.getObjectMapper() - ); - return new TwilioResponse<>( - content, - response.getStatusCode(), - response.getHeaders() - ); - } - - private void addPostParams(final Request request, TwilioRestClient client) { - ObjectMapper objectMapper = client.getObjectMapper(); - if (profileEventRequest != null) { - request.setBody(Event.toJson(profileEventRequest, objectMapper)); - } - } -} diff --git a/src/main/java/com/twilio/rest/memory/v1/Identifier.java b/src/main/java/com/twilio/rest/memory/v1/Identifier.java index ccf53c778a..3aa8107a39 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Identifier.java +++ b/src/main/java/com/twilio/rest/memory/v1/Identifier.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -125,7 +125,7 @@ public boolean equals(final Object o) { return false; } UpdateIdentifierResponse other = (UpdateIdentifierResponse) o; - return (true); + return true; } @Override @@ -392,6 +392,7 @@ public static IdentifierPatcher patcher( } @JsonDeserialize(builder = _Identifier.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class _Identifier { @@ -422,6 +423,7 @@ public static _Identifier fromJson( return mapper.readValue(jsonString, _Identifier.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -469,6 +471,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentifierSet.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentifierSet { @@ -502,6 +505,7 @@ public static IdentifierSet fromJson( return mapper.readValue(jsonString, IdentifierSet.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -549,6 +553,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentifierUpdate.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentifierUpdate { @@ -589,6 +594,7 @@ public static IdentifierUpdate fromJson( return mapper.readValue(jsonString, IdentifierUpdate.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentifierCreator.java b/src/main/java/com/twilio/rest/memory/v1/IdentifierCreator.java index 665697d1d3..4d7f411b4d 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentifierCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentifierCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -30,7 +30,8 @@ import java.io.InputStream; public class IdentifierCreator - extends Creator { + extends Creator +{ private String pathStoreId; private String pathProfileId; @@ -57,11 +58,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.POST, @@ -106,9 +106,9 @@ public Identifier.CreateIdentifierResponse create( } @Override - public TwilioResponse< - Identifier.CreateIdentifierResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Identifier.CreateIdentifierResponse content = Identifier.CreateIdentifierResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentifierDeleter.java b/src/main/java/com/twilio/rest/memory/v1/IdentifierDeleter.java index 72f60b0bae..f02de23ed3 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentifierDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentifierDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -32,7 +31,8 @@ import java.util.function.Predicate; public class IdentifierDeleter - extends ResourceDeleter { + extends ResourceDeleter +{ private String pathStoreId; private String pathProfileId; @@ -59,11 +59,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers/{idType}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path.replace("{" + "idType" + "}", this.pathIdType.toString()); Predicate deleteStatuses = i -> @@ -83,16 +82,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -120,9 +109,9 @@ public Identifier.DeleteIdentifierResponse delete( } @Override - public TwilioResponse< - Identifier.DeleteIdentifierResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Identifier.DeleteIdentifierResponse content = Identifier.DeleteIdentifierResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentifierFetcher.java b/src/main/java/com/twilio/rest/memory/v1/IdentifierFetcher.java index b9ee9bb37e..8748caca15 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentifierFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentifierFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class IdentifierFetcher - extends Fetcher { + extends Fetcher +{ private String pathStoreId; private String pathProfileId; @@ -50,11 +50,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers/{idType}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path.replace("{" + "idType" + "}", this.pathIdType.toString()); Request request = new Request( @@ -71,16 +70,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentifierPatcher.java b/src/main/java/com/twilio/rest/memory/v1/IdentifierPatcher.java index 1a8b857033..3cf85a964e 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentifierPatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentifierPatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -20,7 +20,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,7 +29,8 @@ import java.io.InputStream; public class IdentifierPatcher - extends Patcher { + extends Patcher +{ private String pathStoreId; private String pathProfileId; @@ -64,11 +64,10 @@ public Identifier.PatchIdentifierResponse patch( "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers/{idType}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path.replace("{" + "idType" + "}", this.pathIdType.toString()); Request request = new Request( @@ -87,16 +86,6 @@ public Identifier.PatchIdentifierResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentifierReader.java b/src/main/java/com/twilio/rest/memory/v1/IdentifierReader.java index 6a82088ebb..2b8ba7d31d 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentifierReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentifierReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -34,7 +34,8 @@ import java.io.InputStream; public class IdentifierReader - extends Reader { + extends Reader +{ private String pathStoreId; private String pathProfileId; @@ -47,9 +48,9 @@ public IdentifierReader( this.pathProfileId = pathProfileId; } - public ResourceSetResponse< - Identifier.ListIdentifierResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -71,11 +72,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -175,11 +175,10 @@ public Page previousPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -199,11 +198,10 @@ public Page nextPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Identifiers"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSetting.java b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSetting.java index 665e6ce8e2..c19d0c10a1 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSetting.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSetting.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -47,7 +47,8 @@ public class IdentityResolutionSetting extends Resource { @JsonIgnoreProperties(ignoreUnknown = true) public static class CreateIdentityResolutionSettingResponse - extends Resource { + extends Resource + { @JsonCreator private CreateIdentityResolutionSettingResponse() {} @@ -91,7 +92,8 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class UpdateIdentityResolutionSettingResponse - extends Resource { + extends Resource + { @Getter private final String message; @@ -150,7 +152,8 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class DeleteIdentityResolutionSettingResponse - extends Resource { + extends Resource + { @JsonCreator private DeleteIdentityResolutionSettingResponse() {} @@ -226,7 +229,7 @@ public boolean equals(final Object o) { } ListIdentityResolutionSettingResponse other = (ListIdentityResolutionSettingResponse) o; - return (true); + return true; } @Override @@ -237,7 +240,8 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class PatchIdentityResolutionSettingResponse - extends Resource { + extends Resource + { @JsonCreator private PatchIdentityResolutionSettingResponse() {} @@ -281,7 +285,8 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class FetchIdentityResolutionSettingResponse - extends Resource { + extends Resource + { @Getter private final List identifierConfigs; @@ -294,9 +299,9 @@ public static class FetchIdentityResolutionSettingResponse @JsonCreator private FetchIdentityResolutionSettingResponse( - @JsonProperty("identifierConfigs") final List< - IdentifierConfig - > identifierConfigs, + @JsonProperty( + "identifierConfigs" + ) final List identifierConfigs, @JsonProperty("matchingRules") final List matchingRules, @JsonProperty("version") final Integer version ) { @@ -428,6 +433,7 @@ public static MatchingAlgo forValue(final String value) { } @JsonDeserialize(builder = IdentifierConfig.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentifierConfig { @@ -488,6 +494,7 @@ public static IdentifierConfig fromJson( return mapper.readValue(jsonString, IdentifierConfig.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -607,6 +614,7 @@ public int hashCode() { } @JsonDeserialize(builder = IdentityResolutionSettingsCore.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class IdentityResolutionSettingsCore { @@ -626,8 +634,11 @@ private IdentityResolutionSettingsCore(Builder builder) { this.matchingRules = builder.matchingRules; } - public static Builder builder() { - return new Builder(); + public static Builder builder( + final List identifierConfigs, + final List matchingRules + ) { + return new Builder(identifierConfigs, matchingRules); } public static IdentityResolutionSettingsCore fromJson( @@ -640,6 +651,7 @@ public static IdentityResolutionSettingsCore fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -649,20 +661,15 @@ public static class Builder { @JsonProperty("matchingRules") private List matchingRules; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("identifierConfigs") - public Builder identifierConfigs( - List identifierConfigs + @JsonCreator + public Builder( + @JsonProperty( + "identifierConfigs" + ) final List identifierConfigs, + @JsonProperty("matchingRules") final List matchingRules ) { this.identifierConfigs = identifierConfigs; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("matchingRules") - public Builder matchingRules(List matchingRules) { this.matchingRules = matchingRules; - return this; } public IdentityResolutionSettingsCore build() { diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingFetcher.java b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingFetcher.java index f7cf5cd0a9..a38868c297 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,9 +28,8 @@ import java.io.InputStream; public class IdentityResolutionSettingFetcher - extends Fetcher< - IdentityResolutionSetting.FetchIdentityResolutionSettingResponse - > { + extends Fetcher +{ private String pathStoreId; @@ -59,16 +57,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -96,9 +84,9 @@ public IdentityResolutionSetting.FetchIdentityResolutionSettingResponse fetch( } @Override - public TwilioResponse< - IdentityResolutionSetting.FetchIdentityResolutionSettingResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); IdentityResolutionSetting.FetchIdentityResolutionSettingResponse content = IdentityResolutionSetting.FetchIdentityResolutionSettingResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingUpdater.java b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingUpdater.java index d54e7ff1ba..18b384d7d7 100644 --- a/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingUpdater.java +++ b/src/main/java/com/twilio/rest/memory/v1/IdentityResolutionSettingUpdater.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -23,7 +23,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -33,9 +32,8 @@ import java.io.InputStream; public class IdentityResolutionSettingUpdater - extends Updater< - IdentityResolutionSetting.UpdateIdentityResolutionSettingResponse - > { + extends Updater +{ private String pathStoreId; private String ifMatch; @@ -84,16 +82,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -121,9 +109,9 @@ public IdentityResolutionSetting.UpdateIdentityResolutionSettingResponse update( } @Override - public TwilioResponse< - IdentityResolutionSetting.UpdateIdentityResolutionSettingResponse - > updateWithResponse(final TwilioRestClient client) { + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); IdentityResolutionSetting.UpdateIdentityResolutionSettingResponse content = IdentityResolutionSetting.UpdateIdentityResolutionSettingResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/Import.java b/src/main/java/com/twilio/rest/memory/v1/Import.java index d11d290672..4f2707059d 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Import.java +++ b/src/main/java/com/twilio/rest/memory/v1/Import.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -130,7 +130,7 @@ public boolean equals(final Object o) { return false; } UpdateImportResponse other = (UpdateImportResponse) o; - return (true); + return true; } @Override @@ -215,7 +215,7 @@ public boolean equals(final Object o) { return false; } ListImportResponse other = (ListImportResponse) o; - return (Objects.equals(imports, other.imports)); + return Objects.equals(imports, other.imports); } @Override @@ -289,9 +289,9 @@ public static class FetchImportResponse extends Resource { @JsonCreator private FetchImportResponse( - @JsonProperty("columnMappings") final List< - ColumnMappingItem - > columnMappings, + @JsonProperty( + "columnMappings" + ) final List columnMappings, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("fileSize") final Integer fileSize, @JsonProperty("filename") final String filename, @@ -400,9 +400,31 @@ public static Status forValue(final String value) { } } + public enum OrderBy { + ASC("ASC"), + DESC("DESC"); + + private final String value; + + private OrderBy(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static OrderBy forValue(final String value) { + return Promoter.enumFromString(value, OrderBy.values()); + } + } + @JsonDeserialize( builder = FetchProfileImportV2200ResponseSummary.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class FetchProfileImportV2200ResponseSummary { @@ -436,6 +458,7 @@ public static FetchProfileImportV2200ResponseSummary fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -489,6 +512,7 @@ public int hashCode() { } @JsonDeserialize(builder = CreateProfilesImportV2Request.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateProfilesImportV2Request { @@ -532,6 +556,7 @@ public static CreateProfilesImportV2Request fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -548,9 +573,9 @@ public static class Builder { public Builder( @JsonProperty("filename") final String filename, @JsonProperty("fileSize") final Integer fileSize, - @JsonProperty("columnMappings") final List< - ColumnMappingItem - > columnMappings + @JsonProperty( + "columnMappings" + ) final List columnMappings ) { this.filename = filename; this.fileSize = fileSize; @@ -587,7 +612,132 @@ public int hashCode() { } } + @JsonDeserialize( + builder = ListProfileImportsV2200ResponseMeta.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ListProfileImportsV2200ResponseMeta { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + @Getter + private final Object key; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + @Getter + private final Integer pageSize; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + @Getter + private final String nextToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + @Getter + private final String previousToken; + + private ListProfileImportsV2200ResponseMeta(Builder builder) { + this.key = builder.key; + this.pageSize = builder.pageSize; + this.nextToken = builder.nextToken; + this.previousToken = builder.previousToken; + } + + public static Builder builder() { + return new Builder(); + } + + public static ListProfileImportsV2200ResponseMeta fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + ListProfileImportsV2200ResponseMeta.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("key") + private Object key; + + @JsonProperty("pageSize") + private Integer pageSize; + + @JsonProperty("nextToken") + private String nextToken; + + @JsonProperty("previousToken") + private String previousToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + public Builder key(Object key) { + this.key = key; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + public Builder pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + public Builder nextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + public Builder previousToken(String previousToken) { + this.previousToken = previousToken; + return this; + } + + public ListProfileImportsV2200ResponseMeta build() { + return new ListProfileImportsV2200ResponseMeta(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ListProfileImportsV2200ResponseMeta other = + (ListProfileImportsV2200ResponseMeta) o; + return ( + Objects.equals(key, other.key) && + Objects.equals(pageSize, other.pageSize) && + Objects.equals(nextToken, other.nextToken) && + Objects.equals(previousToken, other.previousToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(key, pageSize, nextToken, previousToken); + } + } + @JsonDeserialize(builder = ColumnMappingItem.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ColumnMappingItem { @@ -628,6 +778,7 @@ public static ColumnMappingItem fromJson( return mapper.readValue(jsonString, ColumnMappingItem.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/ImportCreator.java b/src/main/java/com/twilio/rest/memory/v1/ImportCreator.java index 19f31cd637..f71a0a253d 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ImportCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/ImportCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/ImportFetcher.java b/src/main/java/com/twilio/rest/memory/v1/ImportFetcher.java index fc9fe5b1e4..f4b6c73d60 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ImportFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ImportFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -42,8 +41,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/Imports/{importId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace("{" + "importId" + "}", this.pathImportId.toString()); + path = path.replace( + "{" + "importId" + "}", + this.pathImportId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -59,16 +60,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ImportReader.java b/src/main/java/com/twilio/rest/memory/v1/ImportReader.java index 9b20d0ea04..ac50a17797 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ImportReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/ImportReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -20,6 +20,8 @@ import com.twilio.base.ResourceSetResponse; import com.twilio.base.TokenPaginationPage; import com.twilio.base.TwilioResponse; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.converter.Serializer; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -36,11 +38,29 @@ public class ImportReader extends Reader { private String pathStoreId; + private Integer pageSize; + private String pageToken; + private Import.OrderBy orderBy; public ImportReader(final String pathStoreId) { this.pathStoreId = pathStoreId; } + public ImportReader setPageSize(final Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + public ImportReader setPageToken(final String pageToken) { + this.pageToken = pageToken; + return this; + } + + public ImportReader setOrderBy(final Import.OrderBy orderBy) { + this.orderBy = orderBy; + return this; + } + public ResourceSetResponse readWithResponse( final TwilioRestClient client ) { @@ -74,6 +94,7 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { Domains.MEMORY.toString(), path ); + addQueryParams(request); return request; } @@ -212,6 +233,33 @@ public Page getPage( } private void addQueryParams(final Request request) { + if (pageSize != null) { + Serializer.toString( + request, + "pageSize", + pageSize, + ParameterType.QUERY + ); + } + + if (pageToken != null) { + Serializer.toString( + request, + "pageToken", + pageToken, + ParameterType.QUERY + ); + } + + if (orderBy != null) { + Serializer.toString( + request, + "orderBy", + orderBy, + ParameterType.QUERY + ); + } + if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } diff --git a/src/main/java/com/twilio/rest/memory/v1/Lookup.java b/src/main/java/com/twilio/rest/memory/v1/Lookup.java index fdb61fa975..ef19e57757 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Lookup.java +++ b/src/main/java/com/twilio/rest/memory/v1/Lookup.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -127,7 +127,7 @@ public boolean equals(final Object o) { return false; } UpdateLookupResponse other = (UpdateLookupResponse) o; - return (true); + return true; } @Override @@ -205,7 +205,7 @@ public boolean equals(final Object o) { return false; } ListLookupResponse other = (ListLookupResponse) o; - return (true); + return true; } @Override @@ -300,6 +300,7 @@ public static LookupCreator creator( } @JsonDeserialize(builder = Identifier.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Identifier { @@ -330,6 +331,7 @@ public static Identifier fromJson( return mapper.readValue(jsonString, Identifier.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/LookupCreator.java b/src/main/java/com/twilio/rest/memory/v1/LookupCreator.java index 9e95e33fa3..8b6195e5fe 100644 --- a/src/main/java/com/twilio/rest/memory/v1/LookupCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/LookupCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/Observation.java b/src/main/java/com/twilio/rest/memory/v1/Observation.java index 23c85ab56d..2d2d4ad83c 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Observation.java +++ b/src/main/java/com/twilio/rest/memory/v1/Observation.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -129,7 +129,7 @@ public boolean equals(final Object o) { return false; } UpdateObservationResponse other = (UpdateObservationResponse) o; - return (true); + return true; } @Override @@ -473,13 +473,13 @@ public static ObservationPatcher patcher( final String pathStoreId, final String pathProfileId, final String pathObservationId, - final Observation.ObservationCore observationCore + final Observation.ObservationBase observationBase ) { return new ObservationPatcher( pathStoreId, pathProfileId, pathObservationId, - observationCore + observationBase ); } @@ -527,94 +527,106 @@ public static ContentEncoding forValue(final String value) { } } - @JsonDeserialize(builder = ObservationsMeta.Builder.class) + @JsonDeserialize(builder = ObservationBase.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ObservationsMeta { + public static class ObservationBase { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("key") + @JsonProperty("content") @Getter - private final String key; + private final String content; + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pageSize") + @JsonProperty("occurredAt") @Getter - private final Integer pageSize; + private final ZonedDateTime occurredAt; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("nextToken") + @JsonProperty("source") @Getter - private final String nextToken; + private final String source; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("previousToken") + @JsonProperty("conversationIds") @Getter - private final String previousToken; + private final List conversationIds; - private ObservationsMeta(Builder builder) { - this.key = builder.key; - this.pageSize = builder.pageSize; - this.nextToken = builder.nextToken; - this.previousToken = builder.previousToken; + private ObservationBase(Builder builder) { + this.content = builder.content; + this.occurredAt = builder.occurredAt; + this.source = builder.source; + this.conversationIds = builder.conversationIds; } public static Builder builder() { return new Builder(); } - public static ObservationsMeta fromJson( + public static ObservationBase fromJson( String jsonString, ObjectMapper mapper ) throws IOException { - return mapper.readValue(jsonString, ObservationsMeta.class); + return mapper.readValue(jsonString, ObservationBase.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("key") - private String key; + @JsonProperty("content") + private String content; - @JsonProperty("pageSize") - private Integer pageSize; + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonProperty("occurredAt") + private ZonedDateTime occurredAt; - @JsonProperty("nextToken") - private String nextToken; + @JsonProperty("source") + private String source; - @JsonProperty("previousToken") - private String previousToken; + @JsonProperty("conversationIds") + private List conversationIds; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("key") - public Builder key(String key) { - this.key = key; + @JsonProperty("content") + public Builder content(String content) { + this.content = content; return this; } + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pageSize") - public Builder pageSize(Integer pageSize) { - this.pageSize = pageSize; + @JsonProperty("occurredAt") + public Builder occurredAt(ZonedDateTime occurredAt) { + this.occurredAt = occurredAt; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("nextToken") - public Builder nextToken(String nextToken) { - this.nextToken = nextToken; + @JsonProperty("source") + public Builder source(String source) { + this.source = source; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("previousToken") - public Builder previousToken(String previousToken) { - this.previousToken = previousToken; + @JsonProperty("conversationIds") + public Builder conversationIds(List conversationIds) { + this.conversationIds = conversationIds; return this; } - public ObservationsMeta build() { - return new ObservationsMeta(this); + public ObservationBase build() { + return new ObservationBase(this); } } @@ -628,25 +640,26 @@ public boolean equals(final Object o) { return false; } - ObservationsMeta other = (ObservationsMeta) o; + ObservationBase other = (ObservationBase) o; return ( - Objects.equals(key, other.key) && - Objects.equals(pageSize, other.pageSize) && - Objects.equals(nextToken, other.nextToken) && - Objects.equals(previousToken, other.previousToken) + Objects.equals(content, other.content) && + Objects.equals(occurredAt, other.occurredAt) && + Objects.equals(source, other.source) && + Objects.equals(conversationIds, other.conversationIds) ); } @Override public int hashCode() { - return Objects.hash(key, pageSize, nextToken, previousToken); + return Objects.hash(content, occurredAt, source, conversationIds); } } - @JsonDeserialize(builder = ObservationCore.Builder.class) + @JsonDeserialize(builder = ObservationCreateRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ObservationCore { + public static class ObservationCreateRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("content") @@ -670,7 +683,7 @@ public static class ObservationCore { @Getter private final List conversationIds; - private ObservationCore(Builder builder) { + private ObservationCreateRequest(Builder builder) { this.content = builder.content; this.occurredAt = builder.occurredAt; this.source = builder.source; @@ -685,13 +698,14 @@ public static Builder builder( return new Builder(content, occurredAt, source); } - public static ObservationCore fromJson( + public static ObservationCreateRequest fromJson( String jsonString, ObjectMapper mapper ) throws IOException { - return mapper.readValue(jsonString, ObservationCore.class); + return mapper.readValue(jsonString, ObservationCreateRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -729,8 +743,8 @@ public Builder conversationIds(List conversationIds) { return this; } - public ObservationCore build() { - return new ObservationCore(this); + public ObservationCreateRequest build() { + return new ObservationCreateRequest(this); } } @@ -744,7 +758,7 @@ public boolean equals(final Object o) { return false; } - ObservationCore other = (ObservationCore) o; + ObservationCreateRequest other = (ObservationCreateRequest) o; return ( Objects.equals(content, other.content) && Objects.equals(occurredAt, other.occurredAt) && @@ -759,7 +773,126 @@ public int hashCode() { } } + @JsonDeserialize(builder = ObservationsMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class ObservationsMeta { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + @Getter + private final String key; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + @Getter + private final Integer pageSize; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + @Getter + private final String nextToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + @Getter + private final String previousToken; + + private ObservationsMeta(Builder builder) { + this.key = builder.key; + this.pageSize = builder.pageSize; + this.nextToken = builder.nextToken; + this.previousToken = builder.previousToken; + } + + public static Builder builder() { + return new Builder(); + } + + public static ObservationsMeta fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, ObservationsMeta.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("key") + private String key; + + @JsonProperty("pageSize") + private Integer pageSize; + + @JsonProperty("nextToken") + private String nextToken; + + @JsonProperty("previousToken") + private String previousToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + public Builder key(String key) { + this.key = key; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + public Builder pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + public Builder nextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + public Builder previousToken(String previousToken) { + this.previousToken = previousToken; + return this; + } + + public ObservationsMeta build() { + return new ObservationsMeta(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ObservationsMeta other = (ObservationsMeta) o; + return ( + Objects.equals(key, other.key) && + Objects.equals(pageSize, other.pageSize) && + Objects.equals(nextToken, other.nextToken) && + Objects.equals(previousToken, other.previousToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(key, pageSize, nextToken, previousToken); + } + } + @JsonDeserialize(builder = CreateObservationsRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateObservationsRequest { @@ -767,14 +900,14 @@ public static class CreateObservationsRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("observations") @Getter - private final List observations; + private final List observations; private CreateObservationsRequest(Builder builder) { this.observations = builder.observations; } public static Builder builder( - final List observations + final List observations ) { return new Builder(observations); } @@ -789,17 +922,18 @@ public static CreateObservationsRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("observations") - private List observations; + private List observations; @JsonCreator public Builder( - @JsonProperty("observations") final List< - ObservationCore - > observations + @JsonProperty( + "observations" + ) final List observations ) { this.observations = observations; } @@ -820,7 +954,7 @@ public boolean equals(final Object o) { } CreateObservationsRequest other = (CreateObservationsRequest) o; - return (Objects.equals(observations, other.observations)); + return Objects.equals(observations, other.observations); } @Override @@ -830,6 +964,7 @@ public int hashCode() { } @JsonDeserialize(builder = ObservationInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ObservationInfo { @@ -886,21 +1021,11 @@ private ObservationInfo(Builder builder) { } public static Builder builder( - final String content, - final ZonedDateTime occurredAt, - final String source, final String id, final ZonedDateTime createdAt, final ZonedDateTime updatedAt ) { - return new Builder( - content, - occurredAt, - source, - id, - createdAt, - updatedAt - ); + return new Builder(id, createdAt, updatedAt); } public static ObservationInfo fromJson( @@ -910,6 +1035,7 @@ public static ObservationInfo fromJson( return mapper.readValue(jsonString, ObservationInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -948,21 +1074,40 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("content") final String content, - @JsonProperty("occurredAt") final ZonedDateTime occurredAt, - @JsonProperty("source") final String source, @JsonProperty("id") final String id, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { - this.content = content; - this.occurredAt = occurredAt; - this.source = source; this.id = id; this.createdAt = createdAt; this.updatedAt = updatedAt; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("content") + public Builder content(String content) { + this.content = content; + return this; + } + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("occurredAt") + public Builder occurredAt(ZonedDateTime occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("source") + public Builder source(String source) { + this.source = source; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("conversationIds") public Builder conversationIds(List conversationIds) { diff --git a/src/main/java/com/twilio/rest/memory/v1/ObservationCreator.java b/src/main/java/com/twilio/rest/memory/v1/ObservationCreator.java index 06c4aac4f7..3837df8c86 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ObservationCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/ObservationCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -32,7 +32,8 @@ import java.io.InputStream; public class ObservationCreator - extends Creator { + extends Creator +{ private String pathStoreId; private String pathProfileId; @@ -73,11 +74,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Observations"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.POST, @@ -123,9 +123,9 @@ public Observation.CreateObservationResponse create( } @Override - public TwilioResponse< - Observation.CreateObservationResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Observation.CreateObservationResponse content = Observation.CreateObservationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ObservationDeleter.java b/src/main/java/com/twilio/rest/memory/v1/ObservationDeleter.java index d65aa61e7d..8f65f9abed 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ObservationDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/ObservationDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,10 +29,8 @@ import java.util.function.Predicate; public class ObservationDeleter - extends ResourceDeleter< - Observation, - Observation.DeleteObservationResponse - > { + extends ResourceDeleter +{ private String pathStoreId; private String pathProfileId; @@ -54,16 +51,14 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -81,16 +76,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -118,9 +103,9 @@ public Observation.DeleteObservationResponse delete( } @Override - public TwilioResponse< - Observation.DeleteObservationResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Observation.DeleteObservationResponse content = Observation.DeleteObservationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ObservationFetcher.java b/src/main/java/com/twilio/rest/memory/v1/ObservationFetcher.java index 9656a63acb..f327040a71 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ObservationFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ObservationFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class ObservationFetcher - extends Fetcher { + extends Fetcher +{ private String pathStoreId; private String pathProfileId; @@ -50,16 +50,14 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -75,16 +73,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -112,9 +100,9 @@ public Observation.FetchObservationResponse fetch( } @Override - public TwilioResponse< - Observation.FetchObservationResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Observation.FetchObservationResponse content = Observation.FetchObservationResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/ObservationPatcher.java b/src/main/java/com/twilio/rest/memory/v1/ObservationPatcher.java index da2044d8fa..7af0a8a9df 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ObservationPatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ObservationPatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -20,7 +20,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,29 +29,30 @@ import java.io.InputStream; public class ObservationPatcher - extends Patcher { + extends Patcher +{ private String pathStoreId; private String pathProfileId; private String pathObservationId; - private Observation.ObservationCore observationCore; + private Observation.ObservationBase observationBase; public ObservationPatcher( final String pathStoreId, final String pathProfileId, final String pathObservationId, - final Observation.ObservationCore observationCore + final Observation.ObservationBase observationBase ) { this.pathStoreId = pathStoreId; this.pathProfileId = pathProfileId; this.pathObservationId = pathObservationId; - this.observationCore = observationCore; + this.observationBase = observationBase; } - public ObservationPatcher setObservationCore( - final Observation.ObservationCore observationCore + public ObservationPatcher setObservationBase( + final Observation.ObservationBase observationBase ) { - this.observationCore = observationCore; + this.observationBase = observationBase; return this; } @@ -64,16 +64,14 @@ public Observation.PatchObservationResponse patch( "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -91,16 +89,6 @@ public Observation.PatchObservationResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -122,8 +110,8 @@ public Observation.PatchObservationResponse patch( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (observationCore != null) { - request.setBody(Observation.toJson(observationCore, objectMapper)); + if (observationBase != null) { + request.setBody(Observation.toJson(observationBase, objectMapper)); } } } diff --git a/src/main/java/com/twilio/rest/memory/v1/ObservationReader.java b/src/main/java/com/twilio/rest/memory/v1/ObservationReader.java index bc89da043c..bdd00b0efe 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ObservationReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/ObservationReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -37,7 +37,8 @@ import java.time.ZonedDateTime; public class ObservationReader - extends Reader { + extends Reader +{ private String pathStoreId; private String pathProfileId; @@ -47,6 +48,7 @@ public class ObservationReader private String source; private ZonedDateTime createdAfter; private ZonedDateTime createdBefore; + private String conversationId; private String acceptEncoding; public ObservationReader( @@ -89,14 +91,19 @@ public ObservationReader setCreatedBefore( return this; } + public ObservationReader setConversationId(final String conversationId) { + this.conversationId = conversationId; + return this; + } + public ObservationReader setAcceptEncoding(final String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } - public ResourceSetResponse< - Observation.ListObservationResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -118,11 +125,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Observations"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -224,11 +230,10 @@ public Page previousPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Observations"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -248,11 +253,10 @@ public Page nextPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Observations"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( @@ -328,6 +332,15 @@ private void addQueryParams(final Request request) { ); } + if (conversationId != null) { + Serializer.toString( + request, + "conversationId", + conversationId, + ParameterType.QUERY + ); + } + if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } diff --git a/src/main/java/com/twilio/rest/memory/v1/Operation.java b/src/main/java/com/twilio/rest/memory/v1/Operation.java index 26c384e9f5..b9bb1169b6 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Operation.java +++ b/src/main/java/com/twilio/rest/memory/v1/Operation.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -121,7 +121,7 @@ public boolean equals(final Object o) { return false; } UpdateOperationResponse other = (UpdateOperationResponse) o; - return (true); + return true; } @Override @@ -205,7 +205,7 @@ public boolean equals(final Object o) { return false; } ListOperationResponse other = (ListOperationResponse) o; - return (true); + return true; } @Override @@ -407,6 +407,7 @@ public static Type forValue(final String value) { } @JsonDeserialize(builder = OperationResultResourceId.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperationResultResourceId { @@ -443,6 +444,7 @@ public static OperationResultResourceId fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -489,6 +491,7 @@ public int hashCode() { } @JsonDeserialize(builder = OperationStatusError.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class OperationStatusError { @@ -531,6 +534,7 @@ public static OperationStatusError fromJson( return mapper.readValue(jsonString, OperationStatusError.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/OperationFetcher.java b/src/main/java/com/twilio/rest/memory/v1/OperationFetcher.java index 5fc772e59d..283d20ccf0 100644 --- a/src/main/java/com/twilio/rest/memory/v1/OperationFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/OperationFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class OperationFetcher - extends Fetcher { + extends Fetcher +{ private String pathOperationId; @@ -40,11 +40,10 @@ public OperationFetcher(final String pathOperationId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ControlPlane/Operations/{operationId}"; - path = - path.replace( - "{" + "operationId" + "}", - this.pathOperationId.toString() - ); + path = path.replace( + "{" + "operationId" + "}", + this.pathOperationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -60,16 +59,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/Profile.java b/src/main/java/com/twilio/rest/memory/v1/Profile.java index 1b961e6d3d..7ff9d077a9 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Profile.java +++ b/src/main/java/com/twilio/rest/memory/v1/Profile.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -137,7 +137,7 @@ public boolean equals(final Object o) { return false; } UpdateProfileResponse other = (UpdateProfileResponse) o; - return (true); + return true; } @Override @@ -232,7 +232,7 @@ public boolean equals(final Object o) { return false; } ListProfileResponse other = (ListProfileResponse) o; - return (Objects.equals(profiles, other.profiles)); + return Objects.equals(profiles, other.profiles); } @Override @@ -404,10 +404,11 @@ public static OrderBy forValue(final String value) { } } - @JsonDeserialize(builder = ProfilesMeta.Builder.class) + @JsonDeserialize(builder = IdentityProfilesMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ProfilesMeta { + public static class IdentityProfilesMeta { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("key") @@ -429,7 +430,7 @@ public static class ProfilesMeta { @Getter private final String previousToken; - private ProfilesMeta(Builder builder) { + private IdentityProfilesMeta(Builder builder) { this.key = builder.key; this.pageSize = builder.pageSize; this.nextToken = builder.nextToken; @@ -440,13 +441,14 @@ public static Builder builder() { return new Builder(); } - public static ProfilesMeta fromJson( + public static IdentityProfilesMeta fromJson( String jsonString, ObjectMapper mapper ) throws IOException { - return mapper.readValue(jsonString, ProfilesMeta.class); + return mapper.readValue(jsonString, IdentityProfilesMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -490,8 +492,8 @@ public Builder previousToken(String previousToken) { return this; } - public ProfilesMeta build() { - return new ProfilesMeta(this); + public IdentityProfilesMeta build() { + return new IdentityProfilesMeta(this); } } @@ -505,7 +507,7 @@ public boolean equals(final Object o) { return false; } - ProfilesMeta other = (ProfilesMeta) o; + IdentityProfilesMeta other = (IdentityProfilesMeta) o; return ( Objects.equals(key, other.key) && Objects.equals(pageSize, other.pageSize) && @@ -521,6 +523,7 @@ public int hashCode() { } @JsonDeserialize(builder = ProfileData.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ProfileData { @@ -545,6 +548,7 @@ public static ProfileData fromJson( return mapper.readValue(jsonString, ProfileData.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -574,7 +578,7 @@ public boolean equals(final Object o) { } ProfileData other = (ProfileData) o; - return (Objects.equals(traits, other.traits)); + return Objects.equals(traits, other.traits); } @Override @@ -584,6 +588,7 @@ public int hashCode() { } @JsonDeserialize(builder = ProfilePatch.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ProfilePatch { @@ -608,6 +613,7 @@ public static ProfilePatch fromJson( return mapper.readValue(jsonString, ProfilePatch.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -637,7 +643,7 @@ public boolean equals(final Object o) { } ProfilePatch other = (ProfilePatch) o; - return (Objects.equals(traits, other.traits)); + return Objects.equals(traits, other.traits); } @Override diff --git a/src/main/java/com/twilio/rest/memory/v1/ProfileCreator.java b/src/main/java/com/twilio/rest/memory/v1/ProfileCreator.java index 480a02a25e..7ca31e48b9 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ProfileCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/ProfileCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/ProfileDeleter.java b/src/main/java/com/twilio/rest/memory/v1/ProfileDeleter.java index c3b68135a4..0748b5bf8b 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ProfileDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/ProfileDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,7 +29,8 @@ import java.util.function.Predicate; public class ProfileDeleter - extends ResourceDeleter { + extends ResourceDeleter +{ private String pathStoreId; private String pathProfileId; @@ -47,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -69,16 +68,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ProfileFetcher.java b/src/main/java/com/twilio/rest/memory/v1/ProfileFetcher.java index aa484a5e10..370d78b42a 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ProfileFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ProfileFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -53,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -74,16 +72,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ProfilePatcher.java b/src/main/java/com/twilio/rest/memory/v1/ProfilePatcher.java index 8b37b2def4..a67ab6ee67 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ProfilePatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/ProfilePatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -20,7 +20,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -57,11 +56,10 @@ public Profile.PatchProfileResponse patch(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -79,16 +77,6 @@ public Profile.PatchProfileResponse patch(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/ProfileReader.java b/src/main/java/com/twilio/rest/memory/v1/ProfileReader.java index f0c2086706..973f2e4ff4 100644 --- a/src/main/java/com/twilio/rest/memory/v1/ProfileReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/ProfileReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/Recall.java b/src/main/java/com/twilio/rest/memory/v1/Recall.java index dc030cf9de..f03ac2d67b 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Recall.java +++ b/src/main/java/com/twilio/rest/memory/v1/Recall.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -64,13 +64,13 @@ public static class CreateRecallResponse extends Resource { @JsonCreator private CreateRecallResponse( - @JsonProperty("communications") final List< - Communication - > communications, + @JsonProperty( + "communications" + ) final List communications, @JsonProperty("meta") final MemoryRetrievalResponseMeta meta, - @JsonProperty("observations") final List< - RecallObservationInfo - > observations, + @JsonProperty( + "observations" + ) final List observations, @JsonProperty("summaries") final List summaries ) { this.communications = communications; @@ -147,7 +147,7 @@ public boolean equals(final Object o) { return false; } UpdateRecallResponse other = (UpdateRecallResponse) o; - return (true); + return true; } @Override @@ -225,7 +225,7 @@ public boolean equals(final Object o) { return false; } ListRecallResponse other = (ListRecallResponse) o; - return (true); + return true; } @Override @@ -423,6 +423,7 @@ public static ContentEncoding forValue(final String value) { } @JsonDeserialize(builder = MemoryRetrievalResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MemoryRetrievalResponseMeta { @@ -450,6 +451,7 @@ public static MemoryRetrievalResponseMeta fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -477,7 +479,7 @@ public boolean equals(final Object o) { } MemoryRetrievalResponseMeta other = (MemoryRetrievalResponseMeta) o; - return (Objects.equals(queryTime, other.queryTime)); + return Objects.equals(queryTime, other.queryTime); } @Override @@ -487,6 +489,7 @@ public int hashCode() { } @JsonDeserialize(builder = Participant.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Participant { @@ -546,6 +549,7 @@ public static Participant fromJson( return mapper.readValue(jsonString, Participant.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -627,6 +631,7 @@ public int hashCode() { } @JsonDeserialize(builder = CommunicationContent.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CommunicationContent { @@ -651,6 +656,7 @@ public static CommunicationContent fromJson( return mapper.readValue(jsonString, CommunicationContent.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -680,7 +686,7 @@ public boolean equals(final Object o) { } CommunicationContent other = (CommunicationContent) o; - return (Objects.equals(text, other.text)); + return Objects.equals(text, other.text); } @Override @@ -690,6 +696,7 @@ public int hashCode() { } @JsonDeserialize(builder = CommunicationRecipients.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CommunicationRecipients { @@ -755,6 +762,7 @@ public static CommunicationRecipients fromJson( return mapper.readValue(jsonString, CommunicationRecipients.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -857,6 +865,7 @@ public int hashCode() { } @JsonDeserialize(builder = MemoryRetrievalRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MemoryRetrievalRequest { @@ -927,6 +936,7 @@ public static MemoryRetrievalRequest fromJson( return mapper.readValue(jsonString, MemoryRetrievalRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1073,6 +1083,7 @@ public int hashCode() { } @JsonDeserialize(builder = RecallObservationInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RecallObservationInfo { @@ -1159,6 +1170,7 @@ public static RecallObservationInfo fromJson( return mapper.readValue(jsonString, RecallObservationInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1273,6 +1285,7 @@ public int hashCode() { } @JsonDeserialize(builder = RecallSummaryInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class RecallSummaryInfo { @@ -1359,6 +1372,7 @@ public static RecallSummaryInfo fromJson( return mapper.readValue(jsonString, RecallSummaryInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1473,6 +1487,7 @@ public int hashCode() { } @JsonDeserialize(builder = Communication.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Communication { @@ -1542,6 +1557,7 @@ public static Communication fromJson( return mapper.readValue(jsonString, Communication.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1579,9 +1595,9 @@ public Builder( @JsonProperty("id") final String id, @JsonProperty("content") final CommunicationContent content, @JsonProperty("author") final Participant author, - @JsonProperty("recipients") final List< - CommunicationRecipients - > recipients + @JsonProperty( + "recipients" + ) final List recipients ) { this.id = id; this.content = content; diff --git a/src/main/java/com/twilio/rest/memory/v1/RecallCreator.java b/src/main/java/com/twilio/rest/memory/v1/RecallCreator.java index 41f7b9f5da..e4bcec4da3 100644 --- a/src/main/java/com/twilio/rest/memory/v1/RecallCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/RecallCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -72,11 +72,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Recall"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/memory/v1/Revision.java b/src/main/java/com/twilio/rest/memory/v1/Revision.java index 431b059c99..723134802a 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Revision.java +++ b/src/main/java/com/twilio/rest/memory/v1/Revision.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -120,7 +120,7 @@ public boolean equals(final Object o) { return false; } UpdateRevisionResponse other = (UpdateRevisionResponse) o; - return (true); + return true; } @Override @@ -360,6 +360,7 @@ public static RevisionReader reader( } @JsonDeserialize(builder = ObservationsMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ObservationsMeta { @@ -402,6 +403,7 @@ public static ObservationsMeta fromJson( return mapper.readValue(jsonString, ObservationsMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -476,6 +478,7 @@ public int hashCode() { } @JsonDeserialize(builder = ObservationInfo.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ObservationInfo { @@ -532,21 +535,11 @@ private ObservationInfo(Builder builder) { } public static Builder builder( - final String content, - final ZonedDateTime occurredAt, - final String source, final String id, final ZonedDateTime createdAt, final ZonedDateTime updatedAt ) { - return new Builder( - content, - occurredAt, - source, - id, - createdAt, - updatedAt - ); + return new Builder(id, createdAt, updatedAt); } public static ObservationInfo fromJson( @@ -556,6 +549,7 @@ public static ObservationInfo fromJson( return mapper.readValue(jsonString, ObservationInfo.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -594,21 +588,40 @@ public static class Builder { @JsonCreator public Builder( - @JsonProperty("content") final String content, - @JsonProperty("occurredAt") final ZonedDateTime occurredAt, - @JsonProperty("source") final String source, @JsonProperty("id") final String id, @JsonProperty("createdAt") final ZonedDateTime createdAt, @JsonProperty("updatedAt") final ZonedDateTime updatedAt ) { - this.content = content; - this.occurredAt = occurredAt; - this.source = source; this.id = id; this.createdAt = createdAt; this.updatedAt = updatedAt; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("content") + public Builder content(String content) { + this.content = content; + return this; + } + + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("occurredAt") + public Builder occurredAt(ZonedDateTime occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("source") + public Builder source(String source) { + this.source = source; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("conversationIds") public Builder conversationIds(List conversationIds) { diff --git a/src/main/java/com/twilio/rest/memory/v1/RevisionReader.java b/src/main/java/com/twilio/rest/memory/v1/RevisionReader.java index 2296a7e8a9..204bd7763f 100644 --- a/src/main/java/com/twilio/rest/memory/v1/RevisionReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/RevisionReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -94,16 +94,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}/Revisions"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -206,16 +204,14 @@ public Page previousPage( "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}/Revisions"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -236,16 +232,14 @@ public Page nextPage( "/v1/Stores/{storeId}/Profiles/{profileId}/Observations/{observationId}/Revisions"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); - path = - path.replace( - "{" + "observationId" + "}", - this.pathObservationId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); + path = path.replace( + "{" + "observationId" + "}", + this.pathObservationId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/memory/v1/Store.java b/src/main/java/com/twilio/rest/memory/v1/Store.java index 6770d7cc70..555b25c696 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Store.java +++ b/src/main/java/com/twilio/rest/memory/v1/Store.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -129,7 +129,7 @@ public boolean equals(final Object o) { return false; } UpdateStoreResponse other = (UpdateStoreResponse) o; - return (true); + return true; } @Override @@ -229,7 +229,7 @@ public boolean equals(final Object o) { return false; } ListStoreResponse other = (ListStoreResponse) o; - return (Objects.equals(stores, other.stores)); + return Objects.equals(stores, other.stores); } @Override @@ -449,6 +449,7 @@ public static OrderBy forValue(final String value) { } @JsonDeserialize(builder = Meta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Meta { @@ -489,6 +490,7 @@ public static Meta fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Meta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -563,6 +565,7 @@ public int hashCode() { } @JsonDeserialize(builder = PatchStoreRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PatchStoreRequest { @@ -593,6 +596,7 @@ public static PatchStoreRequest fromJson( return mapper.readValue(jsonString, PatchStoreRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -645,6 +649,7 @@ public int hashCode() { } @JsonDeserialize(builder = ServiceRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ServiceRequest { @@ -675,6 +680,7 @@ public static ServiceRequest fromJson( return mapper.readValue(jsonString, ServiceRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/StoreCreator.java b/src/main/java/com/twilio/rest/memory/v1/StoreCreator.java index 737c7d117f..65a2d1bd3c 100644 --- a/src/main/java/com/twilio/rest/memory/v1/StoreCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/StoreCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/StoreDeleter.java b/src/main/java/com/twilio/rest/memory/v1/StoreDeleter.java index d7b5921624..b087428371 100644 --- a/src/main/java/com/twilio/rest/memory/v1/StoreDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/StoreDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,7 +29,8 @@ import java.util.function.Predicate; public class StoreDeleter - extends ResourceDeleter { + extends ResourceDeleter +{ private String pathStoreId; @@ -59,16 +59,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/StoreFetcher.java b/src/main/java/com/twilio/rest/memory/v1/StoreFetcher.java index 4b3c7f070b..3875c05957 100644 --- a/src/main/java/com/twilio/rest/memory/v1/StoreFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/StoreFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -55,16 +54,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/StorePatcher.java b/src/main/java/com/twilio/rest/memory/v1/StorePatcher.java index c8f0d54dd6..25b264d39f 100644 --- a/src/main/java/com/twilio/rest/memory/v1/StorePatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/StorePatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -22,7 +22,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -76,16 +75,6 @@ public Store.PatchStoreResponse patch(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/StoreReader.java b/src/main/java/com/twilio/rest/memory/v1/StoreReader.java index 64a46f8074..6a70228171 100644 --- a/src/main/java/com/twilio/rest/memory/v1/StoreReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/StoreReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech diff --git a/src/main/java/com/twilio/rest/memory/v1/Trait.java b/src/main/java/com/twilio/rest/memory/v1/Trait.java index 8fe8e53859..387efdc1d4 100644 --- a/src/main/java/com/twilio/rest/memory/v1/Trait.java +++ b/src/main/java/com/twilio/rest/memory/v1/Trait.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -115,7 +115,7 @@ public boolean equals(final Object o) { return false; } UpdateTraitResponse other = (UpdateTraitResponse) o; - return (true); + return true; } @Override @@ -335,15 +335,16 @@ public static OrderBy forValue(final String value) { } } - @JsonDeserialize(builder = ProfilesMeta.Builder.class) + @JsonDeserialize(builder = ListProfileTraits200ResponseMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class ProfilesMeta { + public static class ListProfileTraits200ResponseMeta { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("key") @Getter - private final String key; + private final Object key; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("pageSize") @@ -360,7 +361,7 @@ public static class ProfilesMeta { @Getter private final String previousToken; - private ProfilesMeta(Builder builder) { + private ListProfileTraits200ResponseMeta(Builder builder) { this.key = builder.key; this.pageSize = builder.pageSize; this.nextToken = builder.nextToken; @@ -371,18 +372,22 @@ public static Builder builder() { return new Builder(); } - public static ProfilesMeta fromJson( + public static ListProfileTraits200ResponseMeta fromJson( String jsonString, ObjectMapper mapper ) throws IOException { - return mapper.readValue(jsonString, ProfilesMeta.class); + return mapper.readValue( + jsonString, + ListProfileTraits200ResponseMeta.class + ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("key") - private String key; + private Object key; @JsonProperty("pageSize") private Integer pageSize; @@ -395,7 +400,7 @@ public static class Builder { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("key") - public Builder key(String key) { + public Builder key(Object key) { this.key = key; return this; } @@ -421,8 +426,8 @@ public Builder previousToken(String previousToken) { return this; } - public ProfilesMeta build() { - return new ProfilesMeta(this); + public ListProfileTraits200ResponseMeta build() { + return new ListProfileTraits200ResponseMeta(this); } } @@ -436,7 +441,8 @@ public boolean equals(final Object o) { return false; } - ProfilesMeta other = (ProfilesMeta) o; + ListProfileTraits200ResponseMeta other = + (ListProfileTraits200ResponseMeta) o; return ( Objects.equals(key, other.key) && Objects.equals(pageSize, other.pageSize) && @@ -452,6 +458,7 @@ public int hashCode() { } @JsonDeserialize(builder = FullTrait.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class FullTrait { @@ -492,13 +499,12 @@ public static Builder builder( return new Builder(name, traitGroup); } - public static FullTrait fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { + public static FullTrait fromJson(String jsonString, ObjectMapper mapper) + throws IOException { return mapper.readValue(jsonString, FullTrait.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroup.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroup.java index ad130d037c..813eb3d2f5 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroup.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroup.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -136,7 +136,7 @@ public boolean equals(final Object o) { return false; } UpdateTraitGroupResponse other = (UpdateTraitGroupResponse) o; - return (true); + return true; } @Override @@ -212,7 +212,7 @@ public static class ListTraitGroupResponse extends Resource { private final String displayName; @Getter - private final Map traits; + private final Map traits; @Getter private final Integer version; @@ -223,7 +223,7 @@ private ListTraitGroupResponse( @JsonProperty("displayName") final String displayName, @JsonProperty("traits") final Map< String, - TraitGroupCoreTraitsValue + TraitGroupCoreTraits > traits, @JsonProperty("version") final Integer version ) { @@ -463,7 +463,10 @@ public static DataType forValue(final String value) { } public enum RuleType { - STRING("STRING"); + STRING("STRING"), + NUMBER("NUMBER"), + BOOLEAN("BOOLEAN"), + ARRAY("ARRAY"); private final String value; @@ -483,6 +486,7 @@ public static RuleType forValue(final String value) { } @JsonDeserialize(builder = TraitDefinition.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TraitDefinition { @@ -497,105 +501,6 @@ public static class TraitDefinition { @Getter private final String description; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("idTypePromotion") - @Getter - private final String idTypePromotion; - - private TraitDefinition(Builder builder) { - this.dataType = builder.dataType; - this.description = builder.description; - this.idTypePromotion = builder.idTypePromotion; - } - - public static Builder builder(final TraitGroup.DataType dataType) { - return new Builder(dataType); - } - - public static TraitDefinition fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue(jsonString, TraitDefinition.class); - } - - @JsonPOJOBuilder(withPrefix = "") - public static class Builder { - - @JsonProperty("dataType") - private TraitGroup.DataType dataType; - - @JsonProperty("description") - private String description; - - @JsonProperty("idTypePromotion") - private String idTypePromotion; - - @JsonCreator - public Builder( - @JsonProperty("dataType") final TraitGroup.DataType dataType - ) { - this.dataType = dataType; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - public Builder description(String description) { - this.description = description; - return this; - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("idTypePromotion") - public Builder idTypePromotion(String idTypePromotion) { - this.idTypePromotion = idTypePromotion; - return this; - } - - public TraitDefinition build() { - return new TraitDefinition(this); - } - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - TraitDefinition other = (TraitDefinition) o; - return ( - Objects.equals(dataType, other.dataType) && - Objects.equals(description, other.description) && - Objects.equals(idTypePromotion, other.idTypePromotion) - ); - } - - @Override - public int hashCode() { - return Objects.hash(dataType, description, idTypePromotion); - } - } - - @JsonDeserialize(builder = TraitGroupCoreTraitsValue.Builder.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @ToString - public static class TraitGroupCoreTraitsValue { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("dataType") - @Getter - private final TraitGroup.DataType dataType; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - private final String description; - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("validationRule") @Getter @@ -606,7 +511,7 @@ public static class TraitGroupCoreTraitsValue { @Getter private final String idTypePromotion; - private TraitGroupCoreTraitsValue(Builder builder) { + private TraitDefinition(Builder builder) { this.dataType = builder.dataType; this.description = builder.description; this.validationRule = builder.validationRule; @@ -617,16 +522,14 @@ public static Builder builder(final TraitGroup.DataType dataType) { return new Builder(dataType); } - public static TraitGroupCoreTraitsValue fromJson( + public static TraitDefinition fromJson( String jsonString, ObjectMapper mapper ) throws IOException { - return mapper.readValue( - jsonString, - TraitGroupCoreTraitsValue.class - ); + return mapper.readValue(jsonString, TraitDefinition.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -670,8 +573,8 @@ public Builder idTypePromotion(String idTypePromotion) { return this; } - public TraitGroupCoreTraitsValue build() { - return new TraitGroupCoreTraitsValue(this); + public TraitDefinition build() { + return new TraitDefinition(this); } } @@ -685,7 +588,7 @@ public boolean equals(final Object o) { return false; } - TraitGroupCoreTraitsValue other = (TraitGroupCoreTraitsValue) o; + TraitDefinition other = (TraitDefinition) o; return ( Objects.equals(dataType, other.dataType) && Objects.equals(description, other.description) && @@ -706,6 +609,7 @@ public int hashCode() { } @JsonDeserialize(builder = _TraitGroup.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class _TraitGroup { @@ -723,7 +627,7 @@ public static class _TraitGroup { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("traits") @Getter - private final Map traits; + private final Map traits; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("version") @@ -751,6 +655,7 @@ public static _TraitGroup fromJson( return mapper.readValue(jsonString, _TraitGroup.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -761,7 +666,7 @@ public static class Builder { private String description; @JsonProperty("traits") - private Map traits; + private Map traits; @JsonProperty("version") private Integer version; @@ -784,9 +689,7 @@ public Builder description(String description) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("traits") - public Builder traits( - Map traits - ) { + public Builder traits(Map traits) { this.traits = traits; return this; } @@ -822,6 +725,7 @@ public int hashCode() { } @JsonDeserialize(builder = Meta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class Meta { @@ -862,6 +766,7 @@ public static Meta fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, Meta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -935,7 +840,131 @@ public int hashCode() { } } + @JsonDeserialize(builder = TraitGroupCoreTraits.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class TraitGroupCoreTraits { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("dataType") + @Getter + private final TraitGroup.DataType dataType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("validationRule") + @Getter + private final ValidationRule validationRule; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("idTypePromotion") + @Getter + private final String idTypePromotion; + + private TraitGroupCoreTraits(Builder builder) { + this.dataType = builder.dataType; + this.description = builder.description; + this.validationRule = builder.validationRule; + this.idTypePromotion = builder.idTypePromotion; + } + + public static Builder builder(final TraitGroup.DataType dataType) { + return new Builder(dataType); + } + + public static TraitGroupCoreTraits fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, TraitGroupCoreTraits.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("dataType") + private TraitGroup.DataType dataType; + + @JsonProperty("description") + private String description; + + @JsonProperty("validationRule") + private ValidationRule validationRule; + + @JsonProperty("idTypePromotion") + private String idTypePromotion; + + @JsonCreator + public Builder( + @JsonProperty("dataType") final TraitGroup.DataType dataType + ) { + this.dataType = dataType; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("validationRule") + public Builder validationRule(ValidationRule validationRule) { + this.validationRule = validationRule; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("idTypePromotion") + public Builder idTypePromotion(String idTypePromotion) { + this.idTypePromotion = idTypePromotion; + return this; + } + + public TraitGroupCoreTraits build() { + return new TraitGroupCoreTraits(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + TraitGroupCoreTraits other = (TraitGroupCoreTraits) o; + return ( + Objects.equals(dataType, other.dataType) && + Objects.equals(description, other.description) && + Objects.equals(validationRule, other.validationRule) && + Objects.equals(idTypePromotion, other.idTypePromotion) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + dataType, + description, + validationRule, + idTypePromotion + ); + } + } + @JsonDeserialize(builder = PatchTraitGroupRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PatchTraitGroupRequest { @@ -966,6 +995,7 @@ public static PatchTraitGroupRequest fromJson( return mapper.readValue(jsonString, PatchTraitGroupRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1017,7 +1047,131 @@ public int hashCode() { } } + @JsonDeserialize(builder = TraitGroupRequestTraits.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class TraitGroupRequestTraits { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("dataType") + @Getter + private final TraitGroup.DataType dataType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("validationRule") + @Getter + private final ValidationRule validationRule; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("idTypePromotion") + @Getter + private final String idTypePromotion; + + private TraitGroupRequestTraits(Builder builder) { + this.dataType = builder.dataType; + this.description = builder.description; + this.validationRule = builder.validationRule; + this.idTypePromotion = builder.idTypePromotion; + } + + public static Builder builder(final TraitGroup.DataType dataType) { + return new Builder(dataType); + } + + public static TraitGroupRequestTraits fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, TraitGroupRequestTraits.class); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("dataType") + private TraitGroup.DataType dataType; + + @JsonProperty("description") + private String description; + + @JsonProperty("validationRule") + private ValidationRule validationRule; + + @JsonProperty("idTypePromotion") + private String idTypePromotion; + + @JsonCreator + public Builder( + @JsonProperty("dataType") final TraitGroup.DataType dataType + ) { + this.dataType = dataType; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("validationRule") + public Builder validationRule(ValidationRule validationRule) { + this.validationRule = validationRule; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("idTypePromotion") + public Builder idTypePromotion(String idTypePromotion) { + this.idTypePromotion = idTypePromotion; + return this; + } + + public TraitGroupRequestTraits build() { + return new TraitGroupRequestTraits(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + TraitGroupRequestTraits other = (TraitGroupRequestTraits) o; + return ( + Objects.equals(dataType, other.dataType) && + Objects.equals(description, other.description) && + Objects.equals(validationRule, other.validationRule) && + Objects.equals(idTypePromotion, other.idTypePromotion) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + dataType, + description, + validationRule, + idTypePromotion + ); + } + } + @JsonDeserialize(builder = TraitGroupRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TraitGroupRequest { @@ -1035,7 +1189,7 @@ public static class TraitGroupRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("traits") @Getter - private final Map traits; + private final Map traits; private TraitGroupRequest(Builder builder) { this.displayName = builder.displayName; @@ -1054,6 +1208,7 @@ public static TraitGroupRequest fromJson( return mapper.readValue(jsonString, TraitGroupRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1064,7 +1219,7 @@ public static class Builder { private String description; @JsonProperty("traits") - private Map traits; + private Map traits; @JsonCreator public Builder( @@ -1082,9 +1237,7 @@ public Builder description(String description) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("traits") - public Builder traits( - Map traits - ) { + public Builder traits(Map traits) { this.traits = traits; return this; } @@ -1119,19 +1272,20 @@ public int hashCode() { } @JsonDeserialize(builder = ValidationRule.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ValidationRule { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("max") + @JsonProperty("pattern") @Getter - private final BigDecimal max; + private final String pattern; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("maxItems") + @JsonProperty("minLength") @Getter - private final Integer maxItems; + private final Integer minLength; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("maxLength") @@ -1139,39 +1293,39 @@ public static class ValidationRule { private final Integer maxLength; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("min") + @JsonProperty("ruleType") @Getter - private final BigDecimal min; + private final TraitGroup.RuleType ruleType; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("minItems") + @JsonProperty("min") @Getter - private final Integer minItems; + private final BigDecimal min; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("minLength") + @JsonProperty("max") @Getter - private final Integer minLength; + private final BigDecimal max; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pattern") + @JsonProperty("minItems") @Getter - private final String pattern; + private final Integer minItems; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("ruleType") + @JsonProperty("maxItems") @Getter - private final TraitGroup.RuleType ruleType; + private final Integer maxItems; private ValidationRule(Builder builder) { - this.max = builder.max; - this.maxItems = builder.maxItems; + this.pattern = builder.pattern; + this.minLength = builder.minLength; this.maxLength = builder.maxLength; + this.ruleType = builder.ruleType; this.min = builder.min; + this.max = builder.max; this.minItems = builder.minItems; - this.minLength = builder.minLength; - this.pattern = builder.pattern; - this.ruleType = builder.ruleType; + this.maxItems = builder.maxItems; } public static Builder builder() { @@ -1185,44 +1339,45 @@ public static ValidationRule fromJson( return mapper.readValue(jsonString, ValidationRule.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("max") - private BigDecimal max; + @JsonProperty("pattern") + private String pattern; - @JsonProperty("maxItems") - private Integer maxItems; + @JsonProperty("minLength") + private Integer minLength; @JsonProperty("maxLength") private Integer maxLength; + @JsonProperty("ruleType") + private TraitGroup.RuleType ruleType; + @JsonProperty("min") private BigDecimal min; + @JsonProperty("max") + private BigDecimal max; + @JsonProperty("minItems") private Integer minItems; - @JsonProperty("minLength") - private Integer minLength; - - @JsonProperty("pattern") - private String pattern; - - @JsonProperty("ruleType") - private TraitGroup.RuleType ruleType; + @JsonProperty("maxItems") + private Integer maxItems; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("max") - public Builder max(BigDecimal max) { - this.max = max; + @JsonProperty("pattern") + public Builder pattern(String pattern) { + this.pattern = pattern; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("maxItems") - public Builder maxItems(Integer maxItems) { - this.maxItems = maxItems; + @JsonProperty("minLength") + public Builder minLength(Integer minLength) { + this.minLength = minLength; return this; } @@ -1234,37 +1389,37 @@ public Builder maxLength(Integer maxLength) { } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("min") - public Builder min(BigDecimal min) { - this.min = min; + @JsonProperty("ruleType") + public Builder ruleType(TraitGroup.RuleType ruleType) { + this.ruleType = ruleType; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("minItems") - public Builder minItems(Integer minItems) { - this.minItems = minItems; + @JsonProperty("min") + public Builder min(BigDecimal min) { + this.min = min; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("minLength") - public Builder minLength(Integer minLength) { - this.minLength = minLength; + @JsonProperty("max") + public Builder max(BigDecimal max) { + this.max = max; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("pattern") - public Builder pattern(String pattern) { - this.pattern = pattern; + @JsonProperty("minItems") + public Builder minItems(Integer minItems) { + this.minItems = minItems; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("ruleType") - public Builder ruleType(TraitGroup.RuleType ruleType) { - this.ruleType = ruleType; + @JsonProperty("maxItems") + public Builder maxItems(Integer maxItems) { + this.maxItems = maxItems; return this; } @@ -1285,28 +1440,28 @@ public boolean equals(final Object o) { ValidationRule other = (ValidationRule) o; return ( - Objects.equals(max, other.max) && - Objects.equals(maxItems, other.maxItems) && + Objects.equals(pattern, other.pattern) && + Objects.equals(minLength, other.minLength) && Objects.equals(maxLength, other.maxLength) && + Objects.equals(ruleType, other.ruleType) && Objects.equals(min, other.min) && + Objects.equals(max, other.max) && Objects.equals(minItems, other.minItems) && - Objects.equals(minLength, other.minLength) && - Objects.equals(pattern, other.pattern) && - Objects.equals(ruleType, other.ruleType) + Objects.equals(maxItems, other.maxItems) ); } @Override public int hashCode() { return Objects.hash( - max, - maxItems, + pattern, + minLength, maxLength, + ruleType, min, + max, minItems, - minLength, - pattern, - ruleType + maxItems ); } } diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroupCreator.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroupCreator.java index a1c0276612..7b6ce38b7e 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroupCreator.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroupCreator.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -30,7 +30,8 @@ import java.io.InputStream; public class TraitGroupCreator - extends Creator { + extends Creator +{ private String pathStoreId; private TraitGroup.TraitGroupRequest traitGroupRequest; @@ -94,9 +95,9 @@ public TraitGroup.CreateTraitGroupResponse create( } @Override - public TwilioResponse< - TraitGroup.CreateTraitGroupResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); TraitGroup.CreateTraitGroupResponse content = TraitGroup.CreateTraitGroupResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroupDeleter.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroupDeleter.java index e92479c8f6..14522560a4 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroupDeleter.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroupDeleter.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -30,7 +29,8 @@ import java.util.function.Predicate; public class TraitGroupDeleter - extends ResourceDeleter { + extends ResourceDeleter +{ private String pathStoreId; private String pathTraitGroupName; @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/ControlPlane/Stores/{storeId}/TraitGroups/{traitGroupName}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "traitGroupName" + "}", - this.pathTraitGroupName.toString() - ); + path = path.replace( + "{" + "traitGroupName" + "}", + this.pathTraitGroupName.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; @@ -70,16 +69,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -107,9 +96,9 @@ public TraitGroup.DeleteTraitGroupResponse delete( } @Override - public TwilioResponse< - TraitGroup.DeleteTraitGroupResponse - > deleteWithResponse(final TwilioRestClient client) { + public TwilioResponse deleteWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); TraitGroup.DeleteTraitGroupResponse content = TraitGroup.DeleteTraitGroupResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroupFetcher.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroupFetcher.java index d872af1a77..8e4cb56458 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroupFetcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroupFetcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -21,7 +21,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -31,7 +30,8 @@ import java.io.InputStream; public class TraitGroupFetcher - extends Fetcher { + extends Fetcher +{ private String pathStoreId; private String pathTraitGroupName; @@ -73,11 +73,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/ControlPlane/Stores/{storeId}/TraitGroups/{traitGroupName}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "traitGroupName" + "}", - this.pathTraitGroupName.toString() - ); + path = path.replace( + "{" + "traitGroupName" + "}", + this.pathTraitGroupName.toString() + ); Request request = new Request( HttpMethod.GET, @@ -94,16 +93,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroupPatcher.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroupPatcher.java index b6de736060..de784ea8e8 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroupPatcher.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroupPatcher.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -22,7 +22,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -32,7 +31,8 @@ import java.io.InputStream; public class TraitGroupPatcher - extends Patcher { + extends Patcher +{ private String pathStoreId; private String pathTraitGroupName; @@ -67,11 +67,10 @@ public TraitGroup.PatchTraitGroupResponse patch( "/v1/ControlPlane/Stores/{storeId}/TraitGroups/{traitGroupName}"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "traitGroupName" + "}", - this.pathTraitGroupName.toString() - ); + path = path.replace( + "{" + "traitGroupName" + "}", + this.pathTraitGroupName.toString() + ); Request request = new Request( HttpMethod.PATCH, @@ -90,16 +89,6 @@ public TraitGroup.PatchTraitGroupResponse patch( ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitGroupReader.java b/src/main/java/com/twilio/rest/memory/v1/TraitGroupReader.java index 55309a04a0..55a2b5ef9e 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitGroupReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitGroupReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -36,7 +36,8 @@ import java.io.InputStream; public class TraitGroupReader - extends Reader { + extends Reader +{ private String pathStoreId; private Boolean includeTraits; @@ -68,9 +69,9 @@ public TraitGroupReader setOrderBy(final TraitGroup.OrderBy orderBy) { return this; } - public ResourceSetResponse< - TraitGroup.ListTraitGroupResponse - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( diff --git a/src/main/java/com/twilio/rest/memory/v1/TraitReader.java b/src/main/java/com/twilio/rest/memory/v1/TraitReader.java index ad8dacbf0f..efc3cb3177 100644 --- a/src/main/java/com/twilio/rest/memory/v1/TraitReader.java +++ b/src/main/java/com/twilio/rest/memory/v1/TraitReader.java @@ -5,7 +5,7 @@ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * * Twilio Memory API - * APIs for managing memory stores, profiles, events, and conversational intelligence capabilities. + * APIs for managing memory stores, profiles, and conversational intelligence capabilities. * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech @@ -96,11 +96,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Traits"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -201,11 +200,10 @@ public Page previousPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Traits"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.previousQueryString(); Request request = new Request( @@ -225,11 +223,10 @@ public Page nextPage( String path = "/v1/Stores/{storeId}/Profiles/{profileId}/Traits"; path = path.replace("{" + "storeId" + "}", this.pathStoreId.toString()); - path = - path.replace( - "{" + "profileId" + "}", - this.pathProfileId.toString() - ); + path = path.replace( + "{" + "profileId" + "}", + this.pathProfileId.toString() + ); path = path + page.nextQueryString(); Request request = new Request( 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 f508b05180..05eeaa0d9b 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java +++ b/src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java @@ -296,9 +296,9 @@ private BrandRegistration( "a2p_profile_bundle_sid" ) final String a2pProfileBundleSid, @JsonProperty("account_sid") final String accountSid, - @JsonProperty("brand_feedback") final List< - BrandRegistration.BrandFeedback - > brandFeedback, + @JsonProperty( + "brand_feedback" + ) final List brandFeedback, @JsonProperty("brand_score") final Integer brandScore, @JsonProperty("brand_type") final String brandType, @JsonProperty( 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..bea3563d2c 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Deactivations.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } Deactivations other = (Deactivations) o; - return (Objects.equals(redirectTo, other.redirectTo)); + return Objects.equals(redirectTo, other.redirectTo); } @Override diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsDeleter.java index 722425b162..0a48df53b6 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsDeleter.java @@ -39,11 +39,10 @@ public DomainCertsDeleter(final String pathDomainSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/Certificate"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsFetcher.java index 69ec51b395..b6870f3a10 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsFetcher.java @@ -38,11 +38,10 @@ public DomainCertsFetcher(final String pathDomainSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/Certificate"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsUpdater.java b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsUpdater.java index 7b85a09f78..2fde40e715 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainCertsUpdater.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainCertsUpdater.java @@ -51,11 +51,10 @@ public DomainCertsUpdater setTlsCert(final String tlsCert) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/Certificate"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigFetcher.java index 437331a219..70e1a08ce7 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigFetcher.java @@ -38,11 +38,10 @@ public DomainConfigFetcher(final String pathDomainSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/Config"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingServiceFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingServiceFetcher.java index 7b292fb326..0aab6f5749 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingServiceFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigMessagingServiceFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class DomainConfigMessagingServiceFetcher - extends Fetcher { + extends Fetcher +{ private String pathMessagingServiceSid; @@ -42,11 +43,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/MessagingService/{MessagingServiceSid}/DomainConfig"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigUpdater.java b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigUpdater.java index 86afbcabf4..1f8bff6309 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainConfigUpdater.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainConfigUpdater.java @@ -77,11 +77,10 @@ public DomainConfigUpdater setDisableHttps(final Boolean disableHttps) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/Config"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDnFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDnFetcher.java index 0b0b4982a9..df621dd2de 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDnFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/DomainValidateDnFetcher.java @@ -38,11 +38,10 @@ public DomainValidateDnFetcher(final String pathDomainSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/ValidateDns"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceCreator.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceCreator.java index f4b8c34d54..98336946bf 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceCreator.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class LinkshorteningMessagingServiceCreator - extends Creator { + extends Creator +{ private String pathDomainSid; private String pathMessagingServiceSid; @@ -45,16 +46,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDeleter.java index 802c827287..de4c1d71c5 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class LinkshorteningMessagingServiceDeleter - extends Deleter { + extends Deleter +{ private String pathDomainSid; private String pathMessagingServiceSid; @@ -46,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociationFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociationFetcher.java index c10232e1be..d57f45f418 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociationFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/LinkshorteningMessagingServiceDomainAssociationFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class LinkshorteningMessagingServiceDomainAssociationFetcher - extends Fetcher { + extends Fetcher +{ private String pathMessagingServiceSid; @@ -42,11 +43,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/MessagingServices/{MessagingServiceSid}/Domain"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, @@ -89,9 +89,9 @@ public LinkshorteningMessagingServiceDomainAssociation fetch( } @Override - public TwilioResponse< - LinkshorteningMessagingServiceDomainAssociation - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); LinkshorteningMessagingServiceDomainAssociation content = LinkshorteningMessagingServiceDomainAssociation.fromJson( diff --git a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCertUpdater.java b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCertUpdater.java index 08d34abd0b..82a003af7f 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCertUpdater.java +++ b/src/main/java/com/twilio/rest/messaging/v1/RequestManagedCertUpdater.java @@ -39,11 +39,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/LinkShortening/Domains/{DomainSid}/RequestManagedCert"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 7763fd1866..feea3e4409 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java +++ b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java @@ -458,9 +458,7 @@ public static String toJson(Object object, ObjectMapper mapper) { private final URI url; @Getter - private final List< - TollfreeVerification.UseCaseCategories - > useCaseCategories; + private final List useCaseCategories; @Getter private final String useCaseSummary; @@ -575,9 +573,9 @@ private TollfreeVerification( ) final String tollfreePhoneNumberSid, @JsonProperty("trust_product_sid") final String trustProductSid, @JsonProperty("url") final URI url, - @JsonProperty("use_case_categories") final List< - TollfreeVerification.UseCaseCategories - > useCaseCategories, + @JsonProperty( + "use_case_categories" + ) final List useCaseCategories, @JsonProperty("use_case_summary") final String useCaseSummary, @JsonProperty("vetting_id") final String vettingId, @JsonProperty("vetting_id_expiration") @JsonDeserialize( 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..884f4c29bf 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/Usecase.java +++ b/src/main/java/com/twilio/rest/messaging/v1/Usecase.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } Usecase other = (Usecase) o; - return (Objects.equals(usecases, other.usecases)); + return Objects.equals(usecases, other.usecases); } @Override diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtpCreator.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtpCreator.java index d8b4991359..c9a0c106b2 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtpCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandRegistrationOtpCreator.java @@ -39,11 +39,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/a2p/BrandRegistrations/{BrandRegistrationSid}/SmsOtp"; - path = - path.replace( - "{" + "BrandRegistrationSid" + "}", - this.pathBrandRegistrationSid.toString() - ); + path = path.replace( + "{" + "BrandRegistrationSid" + "}", + this.pathBrandRegistrationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingCreator.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingCreator.java index b157a9a78d..7e058befd0 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingCreator.java @@ -59,8 +59,10 @@ public BrandVettingCreator setVettingId(final String vettingId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/a2p/BrandRegistrations/{BrandSid}/Vettings"; - path = - path.replace("{" + "BrandSid" + "}", this.pathBrandSid.toString()); + path = path.replace( + "{" + "BrandSid" + "}", + this.pathBrandSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingFetcher.java index 6a8ba1830b..a8292ddda1 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingFetcher.java @@ -44,13 +44,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/a2p/BrandRegistrations/{BrandSid}/Vettings/{BrandVettingSid}"; - path = - path.replace("{" + "BrandSid" + "}", this.pathBrandSid.toString()); - path = - path.replace( - "{" + "BrandVettingSid" + "}", - this.pathBrandVettingSid.toString() - ); + path = path.replace( + "{" + "BrandSid" + "}", + this.pathBrandSid.toString() + ); + path = path.replace( + "{" + "BrandVettingSid" + "}", + this.pathBrandVettingSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingReader.java b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingReader.java index 6f4f0a609e..0fd85e8fce 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/brandregistration/BrandVettingReader.java @@ -75,8 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/a2p/BrandRegistrations/{BrandSid}/Vettings"; - path = - path.replace("{" + "BrandSid" + "}", this.pathBrandSid.toString()); + path = path.replace( + "{" + "BrandSid" + "}", + this.pathBrandSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderCreator.java index 720c663494..a9a4737006 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderCreator.java @@ -51,11 +51,10 @@ public AlphaSenderCreator setAlphaSender(final String alphaSender) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/AlphaSenders"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderDeleter.java index ccaf935116..cacc69a48c 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderDeleter.java @@ -44,11 +44,10 @@ public AlphaSenderDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderFetcher.java index e094ae439e..ba2c8a8b35 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderFetcher.java @@ -43,11 +43,10 @@ public AlphaSenderFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderReader.java index 09239f7f93..78beaf0268 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/AlphaSenderReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/AlphaSenders"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderCreator.java index 922b569805..fcf3e204c5 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderCreator.java @@ -51,11 +51,10 @@ public ChannelSenderCreator setSid(final String sid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/ChannelSenders"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderDeleter.java index c93aca6fff..b544b37bb4 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderDeleter.java @@ -44,11 +44,10 @@ public ChannelSenderDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/ChannelSenders/{Sid}"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderFetcher.java index 04555bf736..1181b2de75 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderFetcher.java @@ -43,11 +43,10 @@ public ChannelSenderFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/ChannelSenders/{Sid}"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderReader.java index d0f882e923..f61a403b16 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ChannelSenderReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/ChannelSenders"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderCreator.java index a1ced44d72..4392df2c72 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class DestinationAlphaSenderCreator - extends Creator { + extends Creator +{ private String pathServiceSid; private String alphaSender; @@ -62,11 +63,10 @@ public DestinationAlphaSenderCreator setIsoCountryCode( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/DestinationAlphaSenders"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderDeleter.java index 79295eb521..c3b6021fa7 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class DestinationAlphaSenderDeleter - extends Deleter { + extends Deleter +{ private String pathServiceSid; private String pathSid; @@ -45,11 +46,10 @@ public DestinationAlphaSenderDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/DestinationAlphaSenders/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderFetcher.java index e9d05421d8..aca88f320c 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class DestinationAlphaSenderFetcher - extends Fetcher { + extends Fetcher +{ private String pathServiceSid; private String pathSid; @@ -44,11 +45,10 @@ public DestinationAlphaSenderFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/DestinationAlphaSenders/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderReader.java index 303a2224cf..ce3da190d8 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class DestinationAlphaSenderReader - extends Reader { + extends Reader +{ private String pathServiceSid; private String isoCountryCode; @@ -82,11 +83,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/DestinationAlphaSenders"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberCreator.java index 6f00ae589e..5df20a2606 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberCreator.java @@ -51,11 +51,10 @@ public PhoneNumberCreator setPhoneNumberSid(final String phoneNumberSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberDeleter.java index a0ccce7a4f..6c8ea6c159 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberDeleter.java @@ -44,11 +44,10 @@ public PhoneNumberDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberFetcher.java index c893c069d4..ba23d91241 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberFetcher.java @@ -43,11 +43,10 @@ public PhoneNumberFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberReader.java index bbd03e1951..5a2555e002 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/PhoneNumberReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeCreator.java index 44067d3f9d..2f3ead7614 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeCreator.java @@ -51,11 +51,10 @@ public ShortCodeCreator setShortCodeSid(final String shortCodeSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/ShortCodes"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeDeleter.java index f30634f2ba..45889663eb 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeDeleter.java @@ -41,11 +41,10 @@ public ShortCodeDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/ShortCodes/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeFetcher.java index 140be854de..085e4e7e6c 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeFetcher.java @@ -40,11 +40,10 @@ public ShortCodeFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/ShortCodes/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeReader.java index 224f51cc16..7920992648 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/ShortCodeReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/ShortCodes"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonCreator.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonCreator.java index 6427cc670b..8fa6499c74 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonCreator.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonCreator.java @@ -228,11 +228,10 @@ public UsAppToPersonCreator setXTwilioApiVersion( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonDeleter.java index ffaa97dc44..970c2177ea 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonDeleter.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonDeleter.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonFetcher.java index 33c22ce4e3..cd85d71b37 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonFetcher.java @@ -54,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonReader.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonReader.java index c6a0bbbbb6..47d7b35b1a 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonReader.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonReader.java @@ -81,11 +81,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUpdater.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUpdater.java index be6114f7ca..224cc21e84 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUpdater.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUpdater.java @@ -154,11 +154,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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..b8ff282f73 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 @@ -105,9 +105,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private UsAppToPersonUsecase( - @JsonProperty("us_app_to_person_usecases") final List< - Object - > usAppToPersonUsecases + @JsonProperty( + "us_app_to_person_usecases" + ) final List usAppToPersonUsecases ) { this.usAppToPersonUsecases = usAppToPersonUsecases; } @@ -123,8 +123,9 @@ public boolean equals(final Object o) { } UsAppToPersonUsecase other = (UsAppToPersonUsecase) o; - return ( - Objects.equals(usAppToPersonUsecases, other.usAppToPersonUsecases) + return Objects.equals( + usAppToPersonUsecases, + other.usAppToPersonUsecases ); } diff --git a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecaseFetcher.java b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecaseFetcher.java index 6c61726a21..55d3f32b7b 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecaseFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v1/service/UsAppToPersonUsecaseFetcher.java @@ -49,11 +49,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/Usecases"; - path = - path.replace( - "{" + "MessagingServiceSid" + "}", - this.pathMessagingServiceSid.toString() - ); + path = path.replace( + "{" + "MessagingServiceSid" + "}", + this.pathMessagingServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 f64e8cac25..c379e13a42 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java @@ -119,15 +119,17 @@ public static CallbackMethod forValue(final String value) { } } - public enum MessagingVRcsCountryStatus { - ONLINE("ONLINE"), - OFFLINE("OFFLINE"), - TWILIO_REVIEW("TWILIO_REVIEW"), - PENDING_VERIFICATION("PENDING_VERIFICATION"); + public enum MessagingV2RcsCarrierStatus { + UNKNOWN("UNKNOWN"), + UNLAUNCHED("UNLAUNCHED"), + CARRIER_REVIEW("CARRIER_REVIEW"), + APPROVED("APPROVED"), + REJECTED("REJECTED"), + SUSPENDED("SUSPENDED"); private final String value; - private MessagingVRcsCountryStatus(final String value) { + private MessagingV2RcsCarrierStatus(final String value) { this.value = value; } @@ -137,10 +139,10 @@ public String toString() { } @JsonCreator - public static MessagingVRcsCountryStatus forValue(final String value) { + public static MessagingV2RcsCarrierStatus forValue(final String value) { return Promoter.enumFromString( value, - MessagingVRcsCountryStatus.values() + MessagingV2RcsCarrierStatus.values() ); } } @@ -189,17 +191,13 @@ public static UseCase forValue(final String value) { } } - public enum MessagingVRcsCarrierStatus { - UNKNOWN("UNKNOWN"), - UNLAUNCHED("UNLAUNCHED"), - CARRIER_REVIEW("CARRIER_REVIEW"), - APPROVED("APPROVED"), - REJECTED("REJECTED"), - SUSPENDED("SUSPENDED"); + public enum AccountType { + ISV("ISV"), + ISV_SUB_ACCOUNT("ISVSubAccount"); private final String value; - private MessagingVRcsCarrierStatus(final String value) { + private AccountType(final String value) { this.value = value; } @@ -209,21 +207,18 @@ public String toString() { } @JsonCreator - public static MessagingVRcsCarrierStatus forValue(final String value) { - return Promoter.enumFromString( - value, - MessagingVRcsCarrierStatus.values() - ); + public static AccountType forValue(final String value) { + return Promoter.enumFromString(value, AccountType.values()); } } - public enum AccountType { - ISV("ISV"), - ISV_SUB_ACCOUNT("ISVSubAccount"); + public enum FallbackMethod { + POST("POST"), + PUT("PUT"); private final String value; - private AccountType(final String value) { + private FallbackMethod(final String value) { this.value = value; } @@ -233,18 +228,20 @@ public String toString() { } @JsonCreator - public static AccountType forValue(final String value) { - return Promoter.enumFromString(value, AccountType.values()); + public static FallbackMethod forValue(final String value) { + return Promoter.enumFromString(value, FallbackMethod.values()); } } - public enum FallbackMethod { - POST("POST"), - PUT("PUT"); + public enum MessagingV2RcsCountryStatus { + ONLINE("ONLINE"), + OFFLINE("OFFLINE"), + TWILIO_REVIEW("TWILIO_REVIEW"), + PENDING_VERIFICATION("PENDING_VERIFICATION"); private final String value; - private FallbackMethod(final String value) { + private MessagingV2RcsCountryStatus(final String value) { this.value = value; } @@ -254,14 +251,18 @@ public String toString() { } @JsonCreator - public static FallbackMethod forValue(final String value) { - return Promoter.enumFromString(value, FallbackMethod.values()); + public static MessagingV2RcsCountryStatus forValue(final String value) { + return Promoter.enumFromString( + value, + MessagingV2RcsCountryStatus.values() + ); } } @JsonDeserialize( builder = MessagingV2ChannelsSenderProfileGenericResponseWebsites.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProfileGenericResponseWebsites { @@ -297,6 +298,7 @@ public static MessagingV2ChannelsSenderProfileGenericResponseWebsites fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -352,6 +354,7 @@ public int hashCode() { } @JsonDeserialize(builder = MessagingV2ChannelsSenderProfile.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProfile { @@ -457,6 +460,7 @@ public static MessagingV2ChannelsSenderProfile fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -657,6 +661,7 @@ public int hashCode() { } @JsonDeserialize(builder = MessagingV2RcsComplianceResponse.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2RcsComplianceResponse { @@ -690,6 +695,7 @@ public static MessagingV2RcsComplianceResponse fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -745,6 +751,7 @@ public int hashCode() { } @JsonDeserialize(builder = MessagingV2RcsCarrier.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2RcsCarrier { @@ -757,7 +764,7 @@ public static class MessagingV2RcsCarrier { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") @Getter - private final ChannelsSender.MessagingVRcsCarrierStatus status; + private final ChannelsSender.MessagingV2RcsCarrierStatus status; private MessagingV2RcsCarrier(Builder builder) { this.name = builder.name; @@ -775,6 +782,7 @@ public static MessagingV2RcsCarrier fromJson( return mapper.readValue(jsonString, MessagingV2RcsCarrier.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -782,7 +790,7 @@ public static class Builder { private String name; @JsonProperty("status") - private ChannelsSender.MessagingVRcsCarrierStatus status; + private ChannelsSender.MessagingV2RcsCarrierStatus status; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @@ -794,7 +802,7 @@ public Builder name(String name) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") public Builder status( - ChannelsSender.MessagingVRcsCarrierStatus status + ChannelsSender.MessagingV2RcsCarrierStatus status ) { this.status = status; return this; @@ -831,6 +839,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderRequestsCreate.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderRequestsCreate { @@ -840,6 +849,11 @@ public static class MessagingV2ChannelsSenderRequestsCreate { @Getter private final String senderId; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendly_name") + @Getter + private final String friendlyName; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("configuration") @Getter @@ -857,6 +871,7 @@ public static class MessagingV2ChannelsSenderRequestsCreate { private MessagingV2ChannelsSenderRequestsCreate(Builder builder) { this.senderId = builder.senderId; + this.friendlyName = builder.friendlyName; this.configuration = builder.configuration; this.webhook = builder.webhook; this.profile = builder.profile; @@ -876,12 +891,16 @@ public static MessagingV2ChannelsSenderRequestsCreate fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("sender_id") private String senderId; + @JsonProperty("friendly_name") + private String friendlyName; + @JsonProperty("configuration") private MessagingV2ChannelsSenderConfiguration configuration; @@ -896,6 +915,13 @@ public Builder(@JsonProperty("sender_id") final String senderId) { this.senderId = senderId; } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendly_name") + public Builder friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("configuration") public Builder configuration( @@ -938,6 +964,7 @@ public boolean equals(final Object o) { (MessagingV2ChannelsSenderRequestsCreate) o; return ( Objects.equals(senderId, other.senderId) && + Objects.equals(friendlyName, other.friendlyName) && Objects.equals(configuration, other.configuration) && Objects.equals(webhook, other.webhook) && Objects.equals(profile, other.profile) @@ -946,13 +973,20 @@ public boolean equals(final Object o) { @Override public int hashCode() { - return Objects.hash(senderId, configuration, webhook, profile); + return Objects.hash( + senderId, + friendlyName, + configuration, + webhook, + profile + ); } } @JsonDeserialize( builder = MessagingV2ChannelsSenderProfileGenericResponseEmails.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProfileGenericResponseEmails { @@ -988,6 +1022,7 @@ public static MessagingV2ChannelsSenderProfileGenericResponseEmails fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1045,6 +1080,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderProperties.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProperties { @@ -1078,6 +1114,7 @@ public static MessagingV2ChannelsSenderProperties fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1133,6 +1170,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderOfflineReasonsItems.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderOfflineReasonsItems { @@ -1172,6 +1210,7 @@ public static MessagingV2ChannelsSenderOfflineReasonsItems fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1238,10 +1277,16 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderRequestsUpdate.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderRequestsUpdate { + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendly_name") + @Getter + private final String friendlyName; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("configuration") @Getter @@ -1258,6 +1303,7 @@ public static class MessagingV2ChannelsSenderRequestsUpdate { private final MessagingV2ChannelsSenderProfile profile; private MessagingV2ChannelsSenderRequestsUpdate(Builder builder) { + this.friendlyName = builder.friendlyName; this.configuration = builder.configuration; this.webhook = builder.webhook; this.profile = builder.profile; @@ -1277,9 +1323,13 @@ public static MessagingV2ChannelsSenderRequestsUpdate fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { + @JsonProperty("friendly_name") + private String friendlyName; + @JsonProperty("configuration") private MessagingV2ChannelsSenderConfiguration configuration; @@ -1289,6 +1339,13 @@ public static class Builder { @JsonProperty("profile") private MessagingV2ChannelsSenderProfile profile; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendly_name") + public Builder friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("configuration") public Builder configuration( @@ -1330,6 +1387,7 @@ public boolean equals(final Object o) { MessagingV2ChannelsSenderRequestsUpdate other = (MessagingV2ChannelsSenderRequestsUpdate) o; return ( + Objects.equals(friendlyName, other.friendlyName) && Objects.equals(configuration, other.configuration) && Objects.equals(webhook, other.webhook) && Objects.equals(profile, other.profile) @@ -1338,13 +1396,14 @@ public boolean equals(final Object o) { @Override public int hashCode() { - return Objects.hash(configuration, webhook, profile); + return Objects.hash(friendlyName, configuration, webhook, profile); } } @JsonDeserialize( builder = MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers { @@ -1380,6 +1439,7 @@ public static MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers fromJs ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1437,6 +1497,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2RcsComplianceCountryResponse.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2RcsComplianceCountryResponse { @@ -1454,7 +1515,7 @@ public static class MessagingV2RcsComplianceCountryResponse { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") @Getter - private final ChannelsSender.MessagingVRcsCountryStatus status; + private final ChannelsSender.MessagingV2RcsCountryStatus status; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("carriers") @@ -1482,6 +1543,7 @@ public static MessagingV2RcsComplianceCountryResponse fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1492,7 +1554,7 @@ public static class Builder { private String registrationSid; @JsonProperty("status") - private ChannelsSender.MessagingVRcsCountryStatus status; + private ChannelsSender.MessagingV2RcsCountryStatus status; @JsonProperty("carriers") private List carriers; @@ -1512,7 +1574,7 @@ public Builder registrationSid(String registrationSid) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("status") public Builder status( - ChannelsSender.MessagingVRcsCountryStatus status + ChannelsSender.MessagingV2RcsCountryStatus status ) { this.status = status; return this; @@ -1557,6 +1619,7 @@ public int hashCode() { } @JsonDeserialize(builder = MessagingV2ChannelsSenderWebhook.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderWebhook { @@ -1614,6 +1677,7 @@ public static MessagingV2ChannelsSenderWebhook fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1724,6 +1788,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderProfileGenericResponse.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderProfileGenericResponse { @@ -1786,23 +1851,17 @@ public static class MessagingV2ChannelsSenderProfileGenericResponse { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("websites") @Getter - private final List< - MessagingV2ChannelsSenderProfileGenericResponseWebsites - > websites; + private final List websites; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("emails") @Getter - private final List< - MessagingV2ChannelsSenderProfileGenericResponseEmails - > emails; + private final List emails; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("phone_numbers") @Getter - private final List< - MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers - > phoneNumbers; + private final List phoneNumbers; private MessagingV2ChannelsSenderProfileGenericResponse( Builder builder @@ -1837,6 +1896,7 @@ public static MessagingV2ChannelsSenderProfileGenericResponse fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1874,19 +1934,13 @@ public static class Builder { private String vertical; @JsonProperty("websites") - private List< - MessagingV2ChannelsSenderProfileGenericResponseWebsites - > websites; + private List websites; @JsonProperty("emails") - private List< - MessagingV2ChannelsSenderProfileGenericResponseEmails - > emails; + private List emails; @JsonProperty("phone_numbers") - private List< - MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers - > phoneNumbers; + private List phoneNumbers; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @@ -1968,9 +2022,7 @@ public Builder vertical(String vertical) { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("websites") public Builder websites( - List< - MessagingV2ChannelsSenderProfileGenericResponseWebsites - > websites + List websites ) { this.websites = websites; return this; @@ -1979,9 +2031,7 @@ public Builder websites( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("emails") public Builder emails( - List< - MessagingV2ChannelsSenderProfileGenericResponseEmails - > emails + List emails ) { this.emails = emails; return this; @@ -1990,9 +2040,7 @@ public Builder emails( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("phone_numbers") public Builder phoneNumbers( - List< - MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers - > phoneNumbers + List phoneNumbers ) { this.phoneNumbers = phoneNumbers; return this; @@ -2059,6 +2107,7 @@ public int hashCode() { @JsonDeserialize( builder = MessagingV2ChannelsSenderConfiguration.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class MessagingV2ChannelsSenderConfiguration { @@ -2110,6 +2159,7 @@ public static MessagingV2ChannelsSenderConfiguration fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -2268,9 +2318,10 @@ public static String toJson(Object object, ObjectMapper mapper) { private final MessagingV2ChannelsSenderConfiguration configuration; @Getter - private final List< - MessagingV2ChannelsSenderOfflineReasonsItems - > offlineReasons; + private final String friendlyName; + + @Getter + private final List offlineReasons; @Getter private final MessagingV2ChannelsSenderProfileGenericResponse profile; @@ -2301,9 +2352,10 @@ private ChannelsSender( @JsonProperty( "configuration" ) final MessagingV2ChannelsSenderConfiguration configuration, - @JsonProperty("offline_reasons") final List< - MessagingV2ChannelsSenderOfflineReasonsItems - > offlineReasons, + @JsonProperty("friendly_name") final String friendlyName, + @JsonProperty( + "offline_reasons" + ) final List offlineReasons, @JsonProperty( "profile" ) final MessagingV2ChannelsSenderProfileGenericResponse profile, @@ -2318,6 +2370,7 @@ private ChannelsSender( ) { this.compliance = compliance; this.configuration = configuration; + this.friendlyName = friendlyName; this.offlineReasons = offlineReasons; this.profile = profile; this.properties = properties; @@ -2342,6 +2395,7 @@ public boolean equals(final Object o) { return ( Objects.equals(compliance, other.compliance) && Objects.equals(configuration, other.configuration) && + Objects.equals(friendlyName, other.friendlyName) && Objects.equals(offlineReasons, other.offlineReasons) && Objects.equals(profile, other.profile) && Objects.equals(properties, other.properties) && @@ -2358,6 +2412,7 @@ public int hashCode() { return Objects.hash( compliance, configuration, + friendlyName, offlineReasons, profile, properties, diff --git a/src/main/java/com/twilio/rest/messaging/v2/DomainCertsFetcher.java b/src/main/java/com/twilio/rest/messaging/v2/DomainCertsFetcher.java index 801d17bf3b..f26e5e5303 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/DomainCertsFetcher.java +++ b/src/main/java/com/twilio/rest/messaging/v2/DomainCertsFetcher.java @@ -38,11 +38,10 @@ public DomainCertsFetcher(final String pathDomainSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/LinkShortening/Domains/{DomainSid}/Certificate"; - path = - path.replace( - "{" + "DomainSid" + "}", - this.pathDomainSid.toString() - ); + path = path.replace( + "{" + "DomainSid" + "}", + this.pathDomainSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 95306b21b0..74ea34c22d 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java +++ b/src/main/java/com/twilio/rest/messaging/v2/TypingIndicator.java @@ -141,7 +141,7 @@ public boolean equals(final Object o) { } TypingIndicator other = (TypingIndicator) o; - return (Objects.equals(success, other.success)); + return Objects.equals(success, other.success); } @Override diff --git a/src/main/java/com/twilio/rest/messaging/v3/TypingIndicator.java b/src/main/java/com/twilio/rest/messaging/v3/TypingIndicator.java index f0e83c4775..800b295bdf 100644 --- a/src/main/java/com/twilio/rest/messaging/v3/TypingIndicator.java +++ b/src/main/java/com/twilio/rest/messaging/v3/TypingIndicator.java @@ -51,7 +51,9 @@ public static TypingIndicatorCreator creator( } public enum Channel { - WHATSAPP("WHATSAPP"); + WHATSAPP("WHATSAPP"), + APPLE("APPLE"), + RCS("RCS"); private final String value; @@ -92,6 +94,7 @@ public static Event forValue(final String value) { } @JsonDeserialize(builder = TypingIndicatorRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class TypingIndicatorRequest { @@ -102,9 +105,9 @@ public static class TypingIndicatorRequest { private final TypingIndicator.Channel channel; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("event") + @JsonProperty("messageId") @Getter - private final TypingIndicator.Event event; + private final String messageId; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("from") @@ -112,21 +115,21 @@ public static class TypingIndicatorRequest { private final String from; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("messageId") + @JsonProperty("to") @Getter - private final String messageId; + private final String to; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("to") + @JsonProperty("event") @Getter - private final String to; + private final TypingIndicator.Event event; private TypingIndicatorRequest(Builder builder) { this.channel = builder.channel; - this.event = builder.event; - this.from = builder.from; this.messageId = builder.messageId; + this.from = builder.from; this.to = builder.to; + this.event = builder.event; } public static Builder builder() { @@ -140,24 +143,25 @@ public static TypingIndicatorRequest fromJson( return mapper.readValue(jsonString, TypingIndicatorRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @JsonProperty("channel") private TypingIndicator.Channel channel; - @JsonProperty("event") - private TypingIndicator.Event event; + @JsonProperty("messageId") + private String messageId; @JsonProperty("from") private String from; - @JsonProperty("messageId") - private String messageId; - @JsonProperty("to") private String to; + @JsonProperty("event") + private TypingIndicator.Event event; + @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("channel") public Builder channel(TypingIndicator.Channel channel) { @@ -166,9 +170,9 @@ public Builder channel(TypingIndicator.Channel channel) { } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("event") - public Builder event(TypingIndicator.Event event) { - this.event = event; + @JsonProperty("messageId") + public Builder messageId(String messageId) { + this.messageId = messageId; return this; } @@ -180,16 +184,16 @@ public Builder from(String from) { } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("messageId") - public Builder messageId(String messageId) { - this.messageId = messageId; + @JsonProperty("to") + public Builder to(String to) { + this.to = to; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("to") - public Builder to(String to) { - this.to = to; + @JsonProperty("event") + public Builder event(TypingIndicator.Event event) { + this.event = event; return this; } @@ -211,16 +215,16 @@ public boolean equals(final Object o) { TypingIndicatorRequest other = (TypingIndicatorRequest) o; return ( Objects.equals(channel, other.channel) && - Objects.equals(event, other.event) && - Objects.equals(from, other.from) && Objects.equals(messageId, other.messageId) && - Objects.equals(to, other.to) + Objects.equals(from, other.from) && + Objects.equals(to, other.to) && + Objects.equals(event, other.event) ); } @Override public int hashCode() { - return Objects.hash(channel, event, from, messageId, to); + return Objects.hash(channel, messageId, from, to, event); } } @@ -298,7 +302,7 @@ public boolean equals(final Object o) { } TypingIndicator other = (TypingIndicator) o; - return (Objects.equals(success, other.success)); + return Objects.equals(success, other.success); } @Override diff --git a/src/main/java/com/twilio/rest/notify/v1/service/BindingCreator.java b/src/main/java/com/twilio/rest/notify/v1/service/BindingCreator.java index 7b45c80213..165962da16 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/BindingCreator.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/BindingCreator.java @@ -101,11 +101,10 @@ public BindingCreator setEndpoint(final String endpoint) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/notify/v1/service/BindingDeleter.java b/src/main/java/com/twilio/rest/notify/v1/service/BindingDeleter.java index 7917f09032..fb1251dbc8 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/BindingDeleter.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/BindingDeleter.java @@ -41,11 +41,10 @@ public BindingDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/notify/v1/service/BindingFetcher.java b/src/main/java/com/twilio/rest/notify/v1/service/BindingFetcher.java index c65d5241fb..04a1bd02ba 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/BindingFetcher.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/BindingFetcher.java @@ -40,11 +40,10 @@ public BindingFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Bindings/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/notify/v1/service/BindingReader.java b/src/main/java/com/twilio/rest/notify/v1/service/BindingReader.java index 49a4bea7b4..aad9fa940a 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/BindingReader.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/BindingReader.java @@ -108,11 +108,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Bindings"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java b/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java index cd7be87661..8877755f02 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java @@ -173,11 +173,10 @@ public NotificationCreator setTag(final String tag) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Notifications"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityFetcher.java index 1ee649bb6a..caa1de8c75 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/BulkEligibilityFetcher.java @@ -38,11 +38,10 @@ public BulkEligibilityFetcher(final String pathRequestId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/HostedNumber/Eligibility/Bulk/{RequestId}"; - path = - path.replace( - "{" + "RequestId" + "}", - this.pathRequestId.toString() - ); + path = path.replace( + "{" + "RequestId" + "}", + this.pathRequestId.toString() + ); Request request = new Request( HttpMethod.GET, 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..a99089aa49 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Eligibility.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } Eligibility other = (Eligibility) o; - return (Objects.equals(results, other.results)); + return Objects.equals(results, other.results); } @Override diff --git a/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSession.java b/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSession.java index 0882fade7b..8ffe1ca12d 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSession.java +++ b/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSession.java @@ -55,6 +55,7 @@ public static EmbeddedSessionCreator creator( @JsonDeserialize( builder = NumbersV1CreateEmbeddedSessionRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1CreateEmbeddedSessionRequest { @@ -82,6 +83,7 @@ public static NumbersV1CreateEmbeddedSessionRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -112,7 +114,7 @@ public boolean equals(final Object o) { NumbersV1CreateEmbeddedSessionRequest other = (NumbersV1CreateEmbeddedSessionRequest) o; - return (Objects.equals(themeSetId, other.themeSetId)); + return Objects.equals(themeSetId, other.themeSetId); } @Override diff --git a/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSessionCreator.java b/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSessionCreator.java index 4b10e109d8..63c749bbbb 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSessionCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/EmbeddedSessionCreator.java @@ -54,11 +54,10 @@ public EmbeddedSessionCreator setNumbersV1CreateEmbeddedSessionRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/SenderIdRegistrations/{BundleSid}/EmbeddedSessions"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 b42dbe6f6e..412bea1612 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java @@ -89,6 +89,7 @@ public static CustomerType forValue(final String value) { } @JsonDeserialize(builder = NumbersV1PortingAddress.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1PortingAddress { @@ -149,6 +150,7 @@ public static NumbersV1PortingAddress fromJson( return mapper.readValue(jsonString, NumbersV1PortingAddress.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -227,6 +229,7 @@ public int hashCode() { @JsonDeserialize( builder = NumbersV1PortingPortInCreatePhoneNumbers.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1PortingPortInCreatePhoneNumbers { @@ -260,6 +263,7 @@ public static NumbersV1PortingPortInCreatePhoneNumbers fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -315,6 +319,7 @@ public int hashCode() { @JsonDeserialize( builder = NumbersV1PortingPortInPhoneNumberResult.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1PortingPortInPhoneNumberResult { @@ -412,6 +417,7 @@ public static NumbersV1PortingPortInPhoneNumberResult fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -627,6 +633,7 @@ public int hashCode() { } @JsonDeserialize(builder = NumbersV1PortingPortInCreate.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1PortingPortInCreate { @@ -644,9 +651,7 @@ public static class NumbersV1PortingPortInCreate { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("phone_numbers") @Getter - private final List< - NumbersV1PortingPortInCreatePhoneNumbers - > phoneNumbers; + private final List phoneNumbers; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("losing_carrier_information") @@ -724,6 +729,7 @@ public static NumbersV1PortingPortInCreate fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -913,6 +919,7 @@ public int hashCode() { @JsonDeserialize( builder = NumbersV1PortingLosingCarrierInformation.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1PortingLosingCarrierInformation { @@ -1016,6 +1023,7 @@ public static NumbersV1PortingLosingCarrierInformation fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1331,15 +1339,15 @@ private PortingPortIn( @JsonProperty( "losing_carrier_information" ) final NumbersV1PortingLosingCarrierInformation losingCarrierInformation, - @JsonProperty("notification_emails") final List< - String - > notificationEmails, + @JsonProperty( + "notification_emails" + ) final List notificationEmails, @JsonProperty( "order_cancellation_reason" ) final String orderCancellationReason, - @JsonProperty("phone_numbers") final List< - NumbersV1PortingPortInPhoneNumberResult - > phoneNumbers, + @JsonProperty( + "phone_numbers" + ) final List phoneNumbers, @JsonProperty("port_in_request_sid") final String portInRequestSid, @JsonProperty( "port_in_request_status" diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInDeleter.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInDeleter.java index 860be7e6f4..440657644c 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInDeleter.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInDeleter.java @@ -39,11 +39,10 @@ public PortingPortInDeleter(final String pathPortInRequestSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/PortIn/{PortInRequestSid}"; - path = - path.replace( - "{" + "PortInRequestSid" + "}", - this.pathPortInRequestSid.toString() - ); + path = path.replace( + "{" + "PortInRequestSid" + "}", + this.pathPortInRequestSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInFetcher.java index 40896e3da1..1ae5848c76 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInFetcher.java @@ -38,11 +38,10 @@ public PortingPortInFetcher(final String pathPortInRequestSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/PortIn/{PortInRequestSid}"; - path = - path.replace( - "{" + "PortInRequestSid" + "}", - this.pathPortInRequestSid.toString() - ); + path = path.replace( + "{" + "PortInRequestSid" + "}", + this.pathPortInRequestSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberDeleter.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberDeleter.java index 8906c223d6..fa97f3e6fc 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberDeleter.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class PortingPortInPhoneNumberDeleter - extends Deleter { + extends Deleter +{ private String pathPortInRequestSid; private String pathPhoneNumberSid; @@ -46,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}"; - path = - path.replace( - "{" + "PortInRequestSid" + "}", - this.pathPortInRequestSid.toString() - ); - path = - path.replace( - "{" + "PhoneNumberSid" + "}", - this.pathPhoneNumberSid.toString() - ); + path = path.replace( + "{" + "PortInRequestSid" + "}", + this.pathPortInRequestSid.toString() + ); + path = path.replace( + "{" + "PhoneNumberSid" + "}", + this.pathPhoneNumberSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberFetcher.java index 7a0e16b987..927766d9ed 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortInPhoneNumberFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class PortingPortInPhoneNumberFetcher - extends Fetcher { + extends Fetcher +{ private String pathPortInRequestSid; private String pathPhoneNumberSid; @@ -45,16 +46,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}"; - path = - path.replace( - "{" + "PortInRequestSid" + "}", - this.pathPortInRequestSid.toString() - ); - path = - path.replace( - "{" + "PhoneNumberSid" + "}", - this.pathPhoneNumberSid.toString() - ); + path = path.replace( + "{" + "PortInRequestSid" + "}", + this.pathPortInRequestSid.toString() + ); + path = path.replace( + "{" + "PhoneNumberSid" + "}", + this.pathPhoneNumberSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java index 16a22dcf63..396fa175ef 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java @@ -56,11 +56,10 @@ public PortingPortabilityFetcher setAddressSid(final String addressSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/Portability/PhoneNumber/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, 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..456ba8dceb 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class PortingWebhookConfigurationCreator - extends Creator { + extends Creator +{ private Object body; diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDeleteDeleter.java b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDeleteDeleter.java index 87cdee2036..55a5dee810 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDeleteDeleter.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationDeleteDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class PortingWebhookConfigurationDeleteDeleter - extends Deleter { + extends Deleter +{ private PortingWebhookConfigurationDelete.WebhookType pathWebhookType; @@ -42,11 +43,10 @@ public PortingWebhookConfigurationDeleteDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Porting/Configuration/Webhook/{WebhookType}"; - path = - path.replace( - "{" + "WebhookType" + "}", - this.pathWebhookType.toString() - ); + path = path.replace( + "{" + "WebhookType" + "}", + this.pathWebhookType.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/numbers/v1/SenderIdRegistration.java b/src/main/java/com/twilio/rest/numbers/v1/SenderIdRegistration.java index 105e232896..ef06f9cac5 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SenderIdRegistration.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SenderIdRegistration.java @@ -55,6 +55,7 @@ public static SenderIdRegistrationCreator creator( } @JsonDeserialize(builder = NumbersV1EmbeddedSession.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1EmbeddedSession { @@ -88,6 +89,7 @@ public static NumbersV1EmbeddedSession fromJson( return mapper.readValue(jsonString, NumbersV1EmbeddedSession.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -137,6 +139,7 @@ public int hashCode() { @JsonDeserialize( builder = NumbersV1CreateEmbeddedRegistrationRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class NumbersV1CreateEmbeddedRegistrationRequest { @@ -216,6 +219,7 @@ public static NumbersV1CreateEmbeddedRegistrationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..b32a188852 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class SigningRequestConfigurationCreator - extends Creator { + extends Creator +{ private Object body; diff --git a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationReader.java b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationReader.java index c0aecc693c..86fc267d0b 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationReader.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SigningRequestConfigurationReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class SigningRequestConfigurationReader - extends Reader { + extends Reader +{ private String country; private String product; diff --git a/src/main/java/com/twilio/rest/numbers/v1/SmsVerification.java b/src/main/java/com/twilio/rest/numbers/v1/SmsVerification.java new file mode 100644 index 0000000000..f3cec2f808 --- /dev/null +++ b/src/main/java/com/twilio/rest/numbers/v1/SmsVerification.java @@ -0,0 +1,239 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.numbers.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +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 com.twilio.base.Resource; +import com.twilio.exception.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; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class SmsVerification extends Resource { + + public static SmsVerificationCreator creator() { + return new SmsVerificationCreator(); + } + + @JsonDeserialize( + builder = NumbersV1SmsVerificationSendCodeAttempts.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class NumbersV1SmsVerificationSendCodeAttempts { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("attemptSid") + @Getter + private final String attemptSid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time") + @Getter + private final String time; + + private NumbersV1SmsVerificationSendCodeAttempts(Builder builder) { + this.attemptSid = builder.attemptSid; + this.time = builder.time; + } + + public static Builder builder() { + return new Builder(); + } + + public static NumbersV1SmsVerificationSendCodeAttempts fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + NumbersV1SmsVerificationSendCodeAttempts.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("attemptSid") + private String attemptSid; + + @JsonProperty("time") + private String time; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("attemptSid") + public Builder attemptSid(String attemptSid) { + this.attemptSid = attemptSid; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("time") + public Builder time(String time) { + this.time = time; + return this; + } + + public NumbersV1SmsVerificationSendCodeAttempts build() { + return new NumbersV1SmsVerificationSendCodeAttempts(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + NumbersV1SmsVerificationSendCodeAttempts other = + (NumbersV1SmsVerificationSendCodeAttempts) o; + return ( + Objects.equals(attemptSid, other.attemptSid) && + Objects.equals(time, other.time) + ); + } + + @Override + public int hashCode() { + return Objects.hash(attemptSid, time); + } + } + + /** + * Converts a JSON String into a SmsVerification object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return SmsVerification object represented by the provided JSON + */ + public static SmsVerification fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, SmsVerification.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a SmsVerification object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return SmsVerification object represented by the provided JSON + */ + public static SmsVerification fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, SmsVerification.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final List sendCodeAttempts; + + @Getter + private final String to; + + @Getter + private final String verificationSid; + + @JsonCreator + private SmsVerification( + @JsonProperty( + "sendCodeAttempts" + ) final List sendCodeAttempts, + @JsonProperty("to") final String to, + @JsonProperty("verificationSid") final String verificationSid + ) { + this.sendCodeAttempts = sendCodeAttempts; + this.to = to; + this.verificationSid = verificationSid; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + SmsVerification other = (SmsVerification) o; + return ( + Objects.equals(sendCodeAttempts, other.sendCodeAttempts) && + Objects.equals(to, other.to) && + Objects.equals(verificationSid, other.verificationSid) + ); + } + + @Override + public int hashCode() { + return Objects.hash(sendCodeAttempts, to, verificationSid); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheck.java similarity index 55% rename from src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java rename to src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheck.java index 8641b04720..661e0f5967 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/Chunk.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheck.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Numbers * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.knowledge; +package com.twilio.rest.numbers.v1; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,8 +22,6 @@ import com.fasterxml.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.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; @@ -32,33 +30,32 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; -import java.time.ZonedDateTime; import java.util.Objects; import lombok.Getter; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class Chunk extends Resource { +public class SmsVerificationCheck extends Resource { - public static ChunkReader reader(final String pathId) { - return new ChunkReader(pathId); + public static SmsVerificationCheckCreator creator() { + return new SmsVerificationCheckCreator(); } /** - * Converts a JSON String into a Chunk object using the provided ObjectMapper. + * Converts a JSON String into a SmsVerificationCheck object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return Chunk object represented by the provided JSON + * @return SmsVerificationCheck object represented by the provided JSON */ - public static Chunk fromJson( + public static SmsVerificationCheck fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Chunk.class); + return objectMapper.readValue(json, SmsVerificationCheck.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -67,20 +64,20 @@ public static Chunk fromJson( } /** - * Converts a JSON InputStream into a Chunk object using the provided + * Converts a JSON InputStream into a SmsVerificationCheck object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return Chunk object represented by the provided JSON + * @return SmsVerificationCheck object represented by the provided JSON */ - public static Chunk fromJson( + public static SmsVerificationCheck fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Chunk.class); + return objectMapper.readValue(json, SmsVerificationCheck.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -101,43 +98,28 @@ public static String toJson(Object object, ObjectMapper mapper) { } @Getter - private final String accountSid; + private final String callerIdSid; @Getter - private final String content; + private final String status; - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter - private final ZonedDateTime dateCreated; + private final String to; - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter - private final ZonedDateTime dateUpdated; - - @Getter - private final Object metadata; + private final String verificationSid; @JsonCreator - private Chunk( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("content") final String content, - @JsonProperty("date_created") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateCreated, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, - @JsonProperty("metadata") final Object metadata + private SmsVerificationCheck( + @JsonProperty("callerIdSid") final String callerIdSid, + @JsonProperty("status") final String status, + @JsonProperty("to") final String to, + @JsonProperty("verificationSid") final String verificationSid ) { - this.accountSid = accountSid; - this.content = content; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; - this.metadata = metadata; + this.callerIdSid = callerIdSid; + this.status = status; + this.to = to; + this.verificationSid = verificationSid; } @Override @@ -150,24 +132,17 @@ public boolean equals(final Object o) { return false; } - Chunk other = (Chunk) o; + SmsVerificationCheck other = (SmsVerificationCheck) o; return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(content, other.content) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(metadata, other.metadata) + Objects.equals(callerIdSid, other.callerIdSid) && + Objects.equals(status, other.status) && + Objects.equals(to, other.to) && + Objects.equals(verificationSid, other.verificationSid) ); } @Override public int hashCode() { - return Objects.hash( - accountSid, - content, - dateCreated, - dateUpdated, - metadata - ); + return Objects.hash(callerIdSid, status, to, verificationSid); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheckCreator.java similarity index 75% rename from src/main/java/com/twilio/rest/assistants/v1/AssistantFetcher.java rename to src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheckCreator.java index 6f9f19c09e..fcae1f207c 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCheckCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Numbers * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,9 +12,9 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.numbers.v1; -import com.twilio.base.Fetcher; +import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -27,22 +27,16 @@ import com.twilio.type.*; import java.io.InputStream; -public class AssistantFetcher extends Fetcher { +public class SmsVerificationCheckCreator extends Creator { - private String pathId; - - public AssistantFetcher(final String pathId) { - this.pathId = pathId; - } + public SmsVerificationCheckCreator() {} private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); + String path = "/v1/CallerIds/SmsVerificationChecks"; Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), + HttpMethod.POST, + Domains.NUMBERS.toString(), path ); @@ -50,7 +44,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Assistant fetch failed: Unable to connect to server" + "SmsVerificationCheck creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -70,20 +64,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Assistant fetch(final TwilioRestClient client) { + public SmsVerificationCheck create(final TwilioRestClient client) { Response response = makeRequest(client); - return Assistant.fromJson( + return SmsVerificationCheck.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse fetchWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Assistant content = Assistant.fromJson( + SmsVerificationCheck content = SmsVerificationCheck.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCreator.java similarity index 74% rename from src/main/java/com/twilio/rest/assistants/v1/ToolFetcher.java rename to src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCreator.java index cde323e387..5cf07d8b74 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/SmsVerificationCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Numbers * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,9 +12,9 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.numbers.v1; -import com.twilio.base.Fetcher; +import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -27,22 +27,16 @@ import com.twilio.type.*; import java.io.InputStream; -public class ToolFetcher extends Fetcher { +public class SmsVerificationCreator extends Creator { - private String pathId; - - public ToolFetcher(final String pathId) { - this.pathId = pathId; - } + public SmsVerificationCreator() {} private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Tools/{id}"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); + String path = "/v1/CallerIds/SmsVerifications"; Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), + HttpMethod.POST, + Domains.NUMBERS.toString(), path ); @@ -50,7 +44,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Tool fetch failed: Unable to connect to server" + "SmsVerification creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -70,17 +64,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Tool fetch(final TwilioRestClient client) { + public SmsVerification create(final TwilioRestClient client) { Response response = makeRequest(client); - return Tool.fromJson(response.getStream(), client.getObjectMapper()); + return SmsVerification.fromJson( + response.getStream(), + client.getObjectMapper() + ); } @Override - public TwilioResponse fetchWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Tool content = Tool.fromJson( + SmsVerification content = SmsVerification.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerification.java similarity index 62% rename from src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java rename to src/main/java/com/twilio/rest/numbers/v1/VoiceVerification.java index 823e5fca9e..d825facc66 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatus.java +++ b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerification.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Numbers * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.knowledge; +package com.twilio.rest.numbers.v1; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,8 +22,6 @@ import com.fasterxml.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.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; @@ -32,33 +30,32 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; -import java.time.ZonedDateTime; import java.util.Objects; import lombok.Getter; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class KnowledgeStatus extends Resource { +public class VoiceVerification extends Resource { - public static KnowledgeStatusFetcher fetcher(final String pathId) { - return new KnowledgeStatusFetcher(pathId); + public static VoiceVerificationCreator creator() { + return new VoiceVerificationCreator(); } /** - * Converts a JSON String into a KnowledgeStatus object using the provided ObjectMapper. + * Converts a JSON String into a VoiceVerification object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return KnowledgeStatus object represented by the provided JSON + * @return VoiceVerification object represented by the provided JSON */ - public static KnowledgeStatus fromJson( + public static VoiceVerification fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, KnowledgeStatus.class); + return objectMapper.readValue(json, VoiceVerification.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -67,20 +64,20 @@ public static KnowledgeStatus fromJson( } /** - * Converts a JSON InputStream into a KnowledgeStatus object using the provided + * Converts a JSON InputStream into a VoiceVerification object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return KnowledgeStatus object represented by the provided JSON + * @return VoiceVerification object represented by the provided JSON */ - public static KnowledgeStatus fromJson( + public static VoiceVerification fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, KnowledgeStatus.class); + return objectMapper.readValue(json, VoiceVerification.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -103,31 +100,31 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String accountSid; - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter - private final ZonedDateTime dateUpdated; + private final String callSid; @Getter - private final String lastStatus; + private final String friendlyName; @Getter - private final String status; + private final String phoneNumber; + + @Getter + private final String validationCode; @JsonCreator - private KnowledgeStatus( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, - @JsonProperty("last_status") final String lastStatus, - @JsonProperty("status") final String status + private VoiceVerification( + @JsonProperty("accountSid") final String accountSid, + @JsonProperty("callSid") final String callSid, + @JsonProperty("friendlyName") final String friendlyName, + @JsonProperty("phoneNumber") final String phoneNumber, + @JsonProperty("validationCode") final String validationCode ) { this.accountSid = accountSid; - this.dateUpdated = dateUpdated; - this.lastStatus = lastStatus; - this.status = status; + this.callSid = callSid; + this.friendlyName = friendlyName; + this.phoneNumber = phoneNumber; + this.validationCode = validationCode; } @Override @@ -140,17 +137,24 @@ public boolean equals(final Object o) { return false; } - KnowledgeStatus other = (KnowledgeStatus) o; + VoiceVerification other = (VoiceVerification) o; return ( Objects.equals(accountSid, other.accountSid) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(lastStatus, other.lastStatus) && - Objects.equals(status, other.status) + Objects.equals(callSid, other.callSid) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(phoneNumber, other.phoneNumber) && + Objects.equals(validationCode, other.validationCode) ); } @Override public int hashCode() { - return Objects.hash(accountSid, dateUpdated, lastStatus, status); + return Objects.hash( + accountSid, + callSid, + friendlyName, + phoneNumber, + validationCode + ); } } diff --git a/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheck.java b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheck.java new file mode 100644 index 0000000000..3b46aacc60 --- /dev/null +++ b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheck.java @@ -0,0 +1,136 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.numbers.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.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 com.twilio.base.Resource; +import com.twilio.exception.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; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class VoiceVerificationCheck extends Resource { + + public static VoiceVerificationCheckCreator creator() { + return new VoiceVerificationCheckCreator(); + } + + /** + * Converts a JSON String into a VoiceVerificationCheck object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return VoiceVerificationCheck object represented by the provided JSON + */ + public static VoiceVerificationCheck fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, VoiceVerificationCheck.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a VoiceVerificationCheck object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return VoiceVerificationCheck object represented by the provided JSON + */ + public static VoiceVerificationCheck fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, VoiceVerificationCheck.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String callerIdSid; + + @Getter + private final String to; + + @JsonCreator + private VoiceVerificationCheck( + @JsonProperty("callerIdSid") final String callerIdSid, + @JsonProperty("to") final String to + ) { + this.callerIdSid = callerIdSid; + this.to = to; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceVerificationCheck other = (VoiceVerificationCheck) o; + return ( + Objects.equals(callerIdSid, other.callerIdSid) && + Objects.equals(to, other.to) + ); + } + + @Override + public int hashCode() { + return Objects.hash(callerIdSid, to); + } +} diff --git a/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheckCreator.java b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheckCreator.java new file mode 100644 index 0000000000..ff2e18f66d --- /dev/null +++ b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCheckCreator.java @@ -0,0 +1,92 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Numbers + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.numbers.v1; + +import com.twilio.base.Creator; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class VoiceVerificationCheckCreator + extends Creator +{ + + public VoiceVerificationCheckCreator() {} + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v1/CallerIds/VoiceVerificationChecks"; + + Request request = new Request( + HttpMethod.POST, + Domains.NUMBERS.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "VoiceVerificationCheck creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public VoiceVerificationCheck create(final TwilioRestClient client) { + Response response = makeRequest(client); + return VoiceVerificationCheck.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + VoiceVerificationCheck content = VoiceVerificationCheck.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCreator.java similarity index 75% rename from src/main/java/com/twilio/rest/assistants/v1/KnowledgeFetcher.java rename to src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCreator.java index d8a2b2656b..eee57ca8b4 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/VoiceVerificationCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Numbers * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,9 +12,9 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.numbers.v1; -import com.twilio.base.Fetcher; +import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -27,22 +27,16 @@ import com.twilio.type.*; import java.io.InputStream; -public class KnowledgeFetcher extends Fetcher { +public class VoiceVerificationCreator extends Creator { - private String pathId; - - public KnowledgeFetcher(final String pathId) { - this.pathId = pathId; - } + public VoiceVerificationCreator() {} private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); + String path = "/v1/CallerIds/VoiceVerifications"; Request request = new Request( - HttpMethod.GET, - Domains.ASSISTANTS.toString(), + HttpMethod.POST, + Domains.NUMBERS.toString(), path ); @@ -50,7 +44,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Knowledge fetch failed: Unable to connect to server" + "VoiceVerification creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -70,20 +64,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Knowledge fetch(final TwilioRestClient client) { + public VoiceVerification create(final TwilioRestClient client) { Response response = makeRequest(client); - return Knowledge.fromJson( + return VoiceVerification.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse fetchWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Knowledge content = Knowledge.fromJson( + VoiceVerification content = VoiceVerification.fromJson( response.getStream(), client.getObjectMapper() ); 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 be5a48ba14..e199d60791 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/Application.java +++ b/src/main/java/com/twilio/rest/numbers/v2/Application.java @@ -292,6 +292,7 @@ public static TrafficType forValue(final String value) { @JsonDeserialize( builder = CreateShortCodeApplicationResponseUserSignUp.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseUserSignUp { @@ -368,6 +369,7 @@ public static CreateShortCodeApplicationResponseUserSignUp fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -523,6 +525,7 @@ public int hashCode() { } @JsonDeserialize(builder = CreateShortCodeApplicationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationRequest { @@ -578,6 +581,7 @@ public static CreateShortCodeApplicationRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -652,6 +656,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationResponseSetup.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseSetup { @@ -739,6 +744,7 @@ public static CreateShortCodeApplicationResponseSetup fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -910,6 +916,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationRequestSetup.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationRequestSetup { @@ -937,6 +944,7 @@ public static CreateShortCodeApplicationRequestSetup fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -967,7 +975,7 @@ public boolean equals(final Object o) { CreateShortCodeApplicationRequestSetup other = (CreateShortCodeApplicationRequestSetup) o; - return (Objects.equals(chargesApply, other.chargesApply)); + return Objects.equals(chargesApply, other.chargesApply); } @Override @@ -979,6 +987,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationResponseComplianceKeywords.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseComplianceKeywords { @@ -1038,6 +1047,7 @@ public static CreateShortCodeApplicationResponseComplianceKeywords fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1139,6 +1149,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationResponseBusinessInformation.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseBusinessInformation { @@ -1192,6 +1203,7 @@ public static CreateShortCodeApplicationResponseBusinessInformation fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1306,6 +1318,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationResponseContentExamples.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseContentExamples { @@ -1335,6 +1348,7 @@ public static CreateShortCodeApplicationResponseContentExamples fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1367,7 +1381,7 @@ public boolean equals(final Object o) { CreateShortCodeApplicationResponseContentExamples other = (CreateShortCodeApplicationResponseContentExamples) o; - return (Objects.equals(examples, other.examples)); + return Objects.equals(examples, other.examples); } @Override @@ -1379,6 +1393,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationResponseSmsCampaignDetails.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationResponseSmsCampaignDetails { @@ -1508,6 +1523,7 @@ public static CreateShortCodeApplicationResponseSmsCampaignDetails fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1809,6 +1825,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateShortCodeApplicationRequestBusinessInformation.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateShortCodeApplicationRequestBusinessInformation { @@ -1838,6 +1855,7 @@ public static CreateShortCodeApplicationRequestBusinessInformation fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1872,11 +1890,9 @@ public boolean equals(final Object o) { CreateShortCodeApplicationRequestBusinessInformation other = (CreateShortCodeApplicationRequestBusinessInformation) o; - return ( - Objects.equals( - customerFacingProfile, - other.customerFacingProfile - ) + return Objects.equals( + customerFacingProfile, + other.customerFacingProfile ); } @@ -2038,9 +2054,9 @@ private Application( ) final ZonedDateTime dateUpdated, @JsonProperty("friendly_name") final String friendlyName, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("notification_emails") final List< - String - > notificationEmails, + @JsonProperty( + "notification_emails" + ) final List notificationEmails, @JsonProperty("reviewer") final String reviewer, @JsonProperty( "setup" diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java index a29265b270..8e7f646b5e 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java @@ -33,7 +33,8 @@ import java.util.List; public class AuthorizationDocumentCreator - extends Creator { + extends Creator +{ private String addressSid; private String email; diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentDeleter.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentDeleter.java index e9f217067e..288fdac9a2 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentDeleter.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class AuthorizationDocumentDeleter - extends Deleter { + extends Deleter +{ private String pathSid; diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentFetcher.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentFetcher.java index 34e5e5a0c8..3445c2a614 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AuthorizationDocumentFetcher - extends Fetcher { + extends Fetcher +{ private String pathSid; 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..4dae870ba4 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderCreator.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class BulkHostedNumberOrderCreator - extends Creator { + extends Creator +{ private Object body; diff --git a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderFetcher.java b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderFetcher.java index 7a7cfe4ab2..31deb0c4d0 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BulkHostedNumberOrderFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class BulkHostedNumberOrderFetcher - extends Fetcher { + extends Fetcher +{ private String pathBulkHostingSid; private String orderStatus; @@ -49,11 +50,10 @@ public BulkHostedNumberOrderFetcher setOrderStatus( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/HostedNumber/Orders/Bulk/{BulkHostingSid}"; - path = - path.replace( - "{" + "BulkHostingSid" + "}", - this.pathBulkHostingSid.toString() - ); + path = path.replace( + "{" + "BulkHostingSid" + "}", + this.pathBulkHostingSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v2/BundleCloneCreator.java b/src/main/java/com/twilio/rest/numbers/v2/BundleCloneCreator.java index 2fe027ab6f..a6017337c2 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/BundleCloneCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/BundleCloneCreator.java @@ -65,11 +65,10 @@ public BundleCloneCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Clones"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 b7aa8ab24e..c052ad897a 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrder.java @@ -308,9 +308,9 @@ private HostedNumberOrder( @JsonProperty( "verification_call_extension" ) final String verificationCallExtension, - @JsonProperty("verification_call_sids") final List< - String - > verificationCallSids, + @JsonProperty( + "verification_call_sids" + ) final List verificationCallSids, @JsonProperty("verification_code") final String verificationCode, @JsonProperty( "verification_type" diff --git a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrderReader.java b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrderReader.java index 61898ef7af..281eb0c348 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrderReader.java +++ b/src/main/java/com/twilio/rest/numbers/v2/authorizationdocument/DependentHostedNumberOrderReader.java @@ -35,7 +35,8 @@ import java.io.InputStream; public class DependentHostedNumberOrderReader - extends Reader { + extends Reader +{ private String pathSigningDocumentSid; private DependentHostedNumberOrder.Status status; @@ -116,11 +117,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/HostedNumber/AuthorizationDocuments/{SigningDocumentSid}/DependentHostedNumberOrders"; - path = - path.replace( - "{" + "SigningDocumentSid" + "}", - this.pathSigningDocumentSid.toString() - ); + path = path.replace( + "{" + "SigningDocumentSid" + "}", + this.pathSigningDocumentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeFetcher.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeFetcher.java index dfedfdffc4..c828b778d2 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class SupportingDocumentTypeFetcher - extends Fetcher { + extends Fetcher +{ private String pathSid; diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeReader.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeReader.java index 259b4ef52a..38de997c0a 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeReader.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentTypeReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class SupportingDocumentTypeReader - extends Reader { + extends Reader +{ private Long pageSize; diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyCreator.java index d66bc79656..5fa76de95d 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyCreator.java @@ -47,11 +47,10 @@ public BundleCopyCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Copies"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyReader.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyReader.java index 59c9f85257..cf96a8550a 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyReader.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/BundleCopyReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Copies"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationCreator.java index 82c07f08c1..44ab68f1ad 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationCreator.java @@ -39,11 +39,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationFetcher.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationFetcher.java index 3dded49828..1a0cb978f8 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationFetcher.java @@ -41,11 +41,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationReader.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationReader.java index 2567ba5cd9..086fc005c4 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationReader.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/EvaluationReader.java @@ -74,11 +74,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentCreator.java index f4a07ebbb7..38ab5f04c5 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentCreator.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentDeleter.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentDeleter.java index e20c3e4bce..52b95a9825 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentDeleter.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentDeleter.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentFetcher.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentFetcher.java index 46ae94625f..2e84677817 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentReader.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentReader.java index 123eb6d4d4..e42502d95f 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentReader.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ItemAssignmentReader.java @@ -74,11 +74,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItemsCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItemsCreator.java index c4c5753e57..903199a11f 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItemsCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/bundle/ReplaceItemsCreator.java @@ -52,11 +52,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ReplaceItems"; - path = - path.replace( - "{" + "BundleSid" + "}", - this.pathBundleSid.toString() - ); + path = path.replace( + "{" + "BundleSid" + "}", + this.pathBundleSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 898ffd900e..078386bce1 100644 --- a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrder.java @@ -147,9 +147,9 @@ private CreateHostedNumberOrderResponse( @JsonProperty( "verificationAttempts" ) final Integer verificationAttempts, - @JsonProperty("verificationCallSids") final List< - String - > verificationCallSids, + @JsonProperty( + "verificationCallSids" + ) final List verificationCallSids, @JsonProperty("verificationCode") final String verificationCode, @JsonProperty( "verificationDocumentSid" @@ -314,7 +314,7 @@ public boolean equals(final Object o) { } UpdateHostedNumberOrderResponse other = (UpdateHostedNumberOrderResponse) o; - return (true); + return true; } @Override @@ -400,7 +400,7 @@ public boolean equals(final Object o) { } ListHostedNumberOrderResponse other = (ListHostedNumberOrderResponse) o; - return (true); + return true; } @Override diff --git a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrderCreator.java index 10b63d3b23..cc798ca638 100644 --- a/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v3/HostedNumberOrderCreator.java @@ -34,7 +34,8 @@ import java.util.List; public class HostedNumberOrderCreator - extends Creator { + extends Creator +{ private com.twilio.type.PhoneNumber phoneNumber; private Boolean smsCapability; @@ -235,9 +236,9 @@ public HostedNumberOrder.CreateHostedNumberOrderResponse create( } @Override - public TwilioResponse< - HostedNumberOrder.CreateHostedNumberOrderResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); HostedNumberOrder.CreateHostedNumberOrderResponse content = HostedNumberOrder.CreateHostedNumberOrderResponse.fromJson( 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..2cedac37ac 100644 --- a/src/main/java/com/twilio/rest/oauth/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v1/Authorize.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } Authorize other = (Authorize) o; - return (Objects.equals(redirectTo, other.redirectTo)); + return Objects.equals(redirectTo, other.redirectTo); } @Override 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..8051a6069d 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/Authorize.java +++ b/src/main/java/com/twilio/rest/oauth/v2/Authorize.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; @@ -24,6 +25,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.base.Resource; +import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.type.*; @@ -43,6 +45,26 @@ public static AuthorizeFetcher fetcher() { return new AuthorizeFetcher(); } + public enum CodeChallengeMethod { + S256("S256"); + + private final String value; + + private CodeChallengeMethod(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static CodeChallengeMethod forValue(final String value) { + return Promoter.enumFromString(value, CodeChallengeMethod.values()); + } + } + /** * Converts a JSON String into a Authorize object using the provided ObjectMapper. * @@ -117,7 +139,7 @@ public boolean equals(final Object o) { } Authorize other = (Authorize) o; - return (Objects.equals(redirectTo, other.redirectTo)); + return Objects.equals(redirectTo, other.redirectTo); } @Override diff --git a/src/main/java/com/twilio/rest/oauth/v2/AuthorizeFetcher.java b/src/main/java/com/twilio/rest/oauth/v2/AuthorizeFetcher.java index 81b4bb81e5..c2a3703664 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/AuthorizeFetcher.java +++ b/src/main/java/com/twilio/rest/oauth/v2/AuthorizeFetcher.java @@ -37,6 +37,8 @@ public class AuthorizeFetcher extends Fetcher { private String redirectUri; private String scope; private String state; + private String codeChallenge; + private Authorize.CodeChallengeMethod codeChallengeMethod; public AuthorizeFetcher() {} @@ -65,6 +67,18 @@ public AuthorizeFetcher setState(final String state) { return this; } + public AuthorizeFetcher setCodeChallenge(final String codeChallenge) { + this.codeChallenge = codeChallenge; + return this; + } + + public AuthorizeFetcher setCodeChallengeMethod( + final Authorize.CodeChallengeMethod codeChallengeMethod + ) { + this.codeChallengeMethod = codeChallengeMethod; + return this; + } + private Response makeRequest(final TwilioRestClient client) { String path = "/v2/authorize"; @@ -159,5 +173,23 @@ private void addQueryParams(final Request request) { if (state != null) { Serializer.toString(request, "state", state, ParameterType.QUERY); } + + if (codeChallenge != null) { + Serializer.toString( + request, + "code_challenge", + codeChallenge, + ParameterType.QUERY + ); + } + + if (codeChallengeMethod != null) { + Serializer.toString( + request, + "code_challenge_method", + codeChallengeMethod, + ParameterType.QUERY + ); + } } } diff --git a/src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServer.java b/src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServer.java new file mode 100644 index 0000000000..dcaa320cb0 --- /dev/null +++ b/src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServer.java @@ -0,0 +1,295 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * User OAuth API + * User OAuth API + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.oauth.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.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 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; +import java.util.Objects; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class OauthAuthorizationServer extends Resource { + + public static OauthAuthorizationServerFetcher fetcher() { + return new OauthAuthorizationServerFetcher(); + } + + public enum CodeChallengeMethodsSupported { + S256("S256"); + + private final String value; + + private CodeChallengeMethodsSupported(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static CodeChallengeMethodsSupported forValue( + final String value + ) { + return Promoter.enumFromString( + value, + CodeChallengeMethodsSupported.values() + ); + } + } + + public enum GrantTypesSupported { + AUTHORIZATION_CODE("authorization_code"), + CLIENT_CREDENTIALS("client_credentials"), + REFRESH_TOKEN("refresh_token"); + + private final String value; + + private GrantTypesSupported(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static GrantTypesSupported forValue(final String value) { + return Promoter.enumFromString(value, GrantTypesSupported.values()); + } + } + + public enum ResponseTypesSupported { + CODE("code"); + + private final String value; + + private ResponseTypesSupported(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ResponseTypesSupported forValue(final String value) { + return Promoter.enumFromString( + value, + ResponseTypesSupported.values() + ); + } + } + + public enum TokenEndpointAuthMethodsSupported { + CLIENT_SECRET_POST("client_secret_post"), + NONE("none"); + + private final String value; + + private TokenEndpointAuthMethodsSupported(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static TokenEndpointAuthMethodsSupported forValue( + final String value + ) { + return Promoter.enumFromString( + value, + TokenEndpointAuthMethodsSupported.values() + ); + } + } + + /** + * Converts a JSON String into a OauthAuthorizationServer object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return OauthAuthorizationServer object represented by the provided JSON + */ + public static OauthAuthorizationServer fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, OauthAuthorizationServer.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a OauthAuthorizationServer object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return OauthAuthorizationServer object represented by the provided JSON + */ + public static OauthAuthorizationServer fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, OauthAuthorizationServer.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final URI authorizationEndpoint; + + @Getter + private final List codeChallengeMethodsSupported; + + @Getter + private final List grantTypesSupported; + + @Getter + private final URI issuer; + + @Getter + private final List responseTypesSupported; + + @Getter + private final URI tokenEndpoint; + + @Getter + private final List tokenEndpointAuthMethodsSupported; + + @JsonCreator + private OauthAuthorizationServer( + @JsonProperty("authorization_endpoint") final URI authorizationEndpoint, + @JsonProperty( + "code_challenge_methods_supported" + ) final List codeChallengeMethodsSupported, + @JsonProperty( + "grant_types_supported" + ) final List grantTypesSupported, + @JsonProperty("issuer") final URI issuer, + @JsonProperty( + "response_types_supported" + ) final List responseTypesSupported, + @JsonProperty("token_endpoint") final URI tokenEndpoint, + @JsonProperty( + "token_endpoint_auth_methods_supported" + ) final List tokenEndpointAuthMethodsSupported + ) { + this.authorizationEndpoint = authorizationEndpoint; + this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.grantTypesSupported = grantTypesSupported; + this.issuer = issuer; + this.responseTypesSupported = responseTypesSupported; + this.tokenEndpoint = tokenEndpoint; + this.tokenEndpointAuthMethodsSupported = + tokenEndpointAuthMethodsSupported; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + OauthAuthorizationServer other = (OauthAuthorizationServer) o; + return ( + Objects.equals( + authorizationEndpoint, + other.authorizationEndpoint + ) && + Objects.equals( + codeChallengeMethodsSupported, + other.codeChallengeMethodsSupported + ) && + Objects.equals(grantTypesSupported, other.grantTypesSupported) && + Objects.equals(issuer, other.issuer) && + Objects.equals( + responseTypesSupported, + other.responseTypesSupported + ) && + Objects.equals(tokenEndpoint, other.tokenEndpoint) && + Objects.equals( + tokenEndpointAuthMethodsSupported, + other.tokenEndpointAuthMethodsSupported + ) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + authorizationEndpoint, + codeChallengeMethodsSupported, + grantTypesSupported, + issuer, + responseTypesSupported, + tokenEndpoint, + tokenEndpointAuthMethodsSupported + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatusFetcher.java b/src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServerFetcher.java similarity index 74% rename from src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatusFetcher.java rename to src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServerFetcher.java index 6d9e12eec0..e4ef824e39 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/knowledge/KnowledgeStatusFetcher.java +++ b/src/main/java/com/twilio/rest/oauth/v2/OauthAuthorizationServerFetcher.java @@ -4,16 +4,17 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * User OAuth API + * User OAuth API * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.knowledge; +package com.twilio.rest.oauth.v2; +import com.twilio.auth_strategy.NoAuthStrategy; import com.twilio.base.Fetcher; import com.twilio.base.TwilioResponse; import com.twilio.exception.ApiConnectionException; @@ -27,30 +28,27 @@ import com.twilio.type.*; import java.io.InputStream; -public class KnowledgeStatusFetcher extends Fetcher { +public class OauthAuthorizationServerFetcher + extends Fetcher +{ - private String pathId; - - public KnowledgeStatusFetcher(final String pathId) { - this.pathId = pathId; - } + public OauthAuthorizationServerFetcher() {} private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}/Status"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); + String path = "/.well-known/oauth-authorization-server"; Request request = new Request( HttpMethod.GET, - Domains.ASSISTANTS.toString(), + Domains.OAUTH.toString(), path ); + request.setAuth(NoAuthStrategy.getInstance()); Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "KnowledgeStatus fetch failed: Unable to connect to server" + "OauthAuthorizationServer fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -70,20 +68,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public KnowledgeStatus fetch(final TwilioRestClient client) { + public OauthAuthorizationServer fetch(final TwilioRestClient client) { Response response = makeRequest(client); - return KnowledgeStatus.fromJson( + return OauthAuthorizationServer.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse fetchWithResponse( + public TwilioResponse fetchWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - KnowledgeStatus content = KnowledgeStatus.fromJson( + OauthAuthorizationServer content = OauthAuthorizationServer.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java b/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java index 371816e356..3fdcabba80 100644 --- a/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java +++ b/src/main/java/com/twilio/rest/oauth/v2/TokenCreator.java @@ -42,6 +42,7 @@ public class TokenCreator extends Creator { private String audience; private String refreshToken; private String scope; + private String codeVerifier; public TokenCreator() {} @@ -85,6 +86,11 @@ public TokenCreator setScope(final String scope) { return this; } + public TokenCreator setCodeVerifier(final String codeVerifier) { + this.codeVerifier = codeVerifier; + return this; + } + public TokenCreator setAccountSid(final String accountSid) { this.accountSid = accountSid; return this; @@ -231,5 +237,14 @@ private void addPostParams(final Request request) { ParameterType.URLENCODED ); } + + if (codeVerifier != null) { + Serializer.toString( + request, + "code_verifier", + codeVerifier, + ParameterType.URLENCODED + ); + } } } diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentCreator.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentCreator.java index f2a01fe089..888938beff 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentCreator.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentCreator.java @@ -33,7 +33,8 @@ import java.util.List; public class AuthorizationDocumentCreator - extends Creator { + extends Creator +{ private List hostedNumberOrderSids; private String addressSid; diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentFetcher.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentFetcher.java index 4008666361..14c7b3a009 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentFetcher.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AuthorizationDocumentFetcher - extends Fetcher { + extends Fetcher +{ private String pathSid; diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentUpdater.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentUpdater.java index ba75ac005f..3120dab67e 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentUpdater.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/AuthorizationDocumentUpdater.java @@ -33,7 +33,8 @@ import java.util.List; public class AuthorizationDocumentUpdater - extends Updater { + extends Updater +{ private String pathSid; private List hostedNumberOrderSids; 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 9294391559..70bc8a6313 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrder.java @@ -282,9 +282,9 @@ private HostedNumberOrder( @JsonProperty( "verification_attempts" ) final Integer verificationAttempts, - @JsonProperty("verification_call_sids") final List< - String - > verificationCallSids, + @JsonProperty( + "verification_call_sids" + ) final List verificationCallSids, @JsonProperty("verification_code") final String verificationCode, @JsonProperty( "verification_document_sid" 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 a1dd854319..43b451dc71 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 @@ -266,9 +266,9 @@ private DependentHostedNumberOrder( @JsonProperty( "verification_attempts" ) final Integer verificationAttempts, - @JsonProperty("verification_call_sids") final List< - String - > verificationCallSids, + @JsonProperty( + "verification_call_sids" + ) final List verificationCallSids, @JsonProperty("verification_code") final String verificationCode, @JsonProperty( "verification_document_sid" diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrderReader.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrderReader.java index b532c622cb..11929926f8 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrderReader.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/authorizationdocument/DependentHostedNumberOrderReader.java @@ -35,7 +35,8 @@ import java.io.InputStream; public class DependentHostedNumberOrderReader - extends Reader { + extends Reader +{ private String pathSigningDocumentSid; private DependentHostedNumberOrder.Status status; @@ -124,11 +125,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/HostedNumbers/AuthorizationDocuments/{SigningDocumentSid}/DependentHostedNumberOrders"; - path = - path.replace( - "{" + "SigningDocumentSid" + "}", - this.pathSigningDocumentSid.toString() - ); + path = path.replace( + "{" + "SigningDocumentSid" + "}", + this.pathSigningDocumentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionFetcher.java b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionFetcher.java index 84c4748a55..931e1cdfe1 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionFetcher.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class AvailableAddOnExtensionFetcher - extends Fetcher { + extends Fetcher +{ private String pathAvailableAddOnSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "AvailableAddOnSid" + "}", - this.pathAvailableAddOnSid.toString() - ); + path = path.replace( + "{" + "AvailableAddOnSid" + "}", + this.pathAvailableAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionReader.java b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionReader.java index 389298da1b..2e0dc3d88f 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionReader.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/availableaddon/AvailableAddOnExtensionReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class AvailableAddOnExtensionReader - extends Reader { + extends Reader +{ private String pathAvailableAddOnSid; private Long pageSize; @@ -75,11 +76,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions"; - path = - path.replace( - "{" + "AvailableAddOnSid" + "}", - this.pathAvailableAddOnSid.toString() - ); + path = path.replace( + "{" + "AvailableAddOnSid" + "}", + this.pathAvailableAddOnSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionFetcher.java b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionFetcher.java index a5094277ae..7f7fdb6970 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionFetcher.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionFetcher - extends Fetcher { + extends Fetcher +{ private String pathInstalledAddOnSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionReader.java b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionReader.java index 8f19d0a734..1c5ef4bedd 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionReader.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionReader - extends Reader { + extends Reader +{ private String pathInstalledAddOnSid; private Long pageSize; @@ -75,11 +76,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionUpdater.java b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionUpdater.java index 15517b3d95..bb1248e909 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionUpdater.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/installedaddon/InstalledAddOnExtensionUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class InstalledAddOnExtensionUpdater - extends Updater { + extends Updater +{ private String pathInstalledAddOnSid; private String pathSid; @@ -56,11 +57,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}"; - path = - path.replace( - "{" + "InstalledAddOnSid" + "}", - this.pathInstalledAddOnSid.toString() - ); + path = path.replace( + "{" + "InstalledAddOnSid" + "}", + this.pathInstalledAddOnSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 cd2483797f..ab9aef0ef4 100644 --- a/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java +++ b/src/main/java/com/twilio/rest/preview/wireless/RatePlan.java @@ -179,9 +179,9 @@ private RatePlan( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, @JsonProperty("friendly_name") final String friendlyName, - @JsonProperty("international_roaming") final List< - String - > internationalRoaming, + @JsonProperty( + "international_roaming" + ) final List internationalRoaming, @JsonProperty("messaging_enabled") final Boolean messagingEnabled, @JsonProperty( "national_roaming_enabled" diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java b/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java index 72ad33430d..3f6f272929 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java @@ -43,16 +43,14 @@ public AccountFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/Accounts/{AccountSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); - path = - path.replace( - "{" + "AccountSid" + "}", - this.pathAccountSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); + path = path.replace( + "{" + "AccountSid" + "}", + this.pathAccountSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java index d801925e27..23fe640b64 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/Accounts"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 c39064e215..648522a789 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java @@ -71,6 +71,7 @@ public static RoleAssignmentReader reader( @JsonDeserialize( builder = PublicApiCreateRoleAssignmentRequest.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class PublicApiCreateRoleAssignmentRequest { @@ -126,6 +127,7 @@ public static PublicApiCreateRoleAssignmentRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..6f985f6f35 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java @@ -54,11 +54,10 @@ public RoleAssignmentCreator setPublicApiCreateRoleAssignmentRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/RoleAssignments"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java index b8f4f665a1..7f9314ac9e 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java @@ -45,16 +45,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/RoleAssignments/{RoleAssignmentSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); - path = - path.replace( - "{" + "RoleAssignmentSid" + "}", - this.pathRoleAssignmentSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); + path = path.replace( + "{" + "RoleAssignmentSid" + "}", + this.pathRoleAssignmentSid.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java index 7f0a9ca660..fe4588157a 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java @@ -97,11 +97,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/RoleAssignments"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 835f32374c..2a2076f331 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/User.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/User.java @@ -91,6 +91,7 @@ public static UserUpdater updater( } @JsonDeserialize(builder = ScimUser.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimUser { @@ -173,6 +174,7 @@ public static ScimUser fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, ScimUser.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -334,6 +336,7 @@ public int hashCode() { } @JsonDeserialize(builder = ScimEmailAddress.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimEmailAddress { @@ -370,6 +373,7 @@ public static ScimEmailAddress fromJson( return mapper.readValue(jsonString, ScimEmailAddress.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -433,6 +437,7 @@ public int hashCode() { } @JsonDeserialize(builder = ScimMeta.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimMeta { @@ -477,6 +482,7 @@ public static ScimMeta fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, ScimMeta.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -567,6 +573,7 @@ public int hashCode() { } @JsonDeserialize(builder = ScimName.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimName { @@ -595,6 +602,7 @@ public static ScimName fromJson(String jsonString, ObjectMapper mapper) return mapper.readValue(jsonString, ScimName.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -647,6 +655,7 @@ public int hashCode() { } @JsonDeserialize(builder = ScimPatchOperation.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimPatchOperation { @@ -683,6 +692,7 @@ public static ScimPatchOperation fromJson( return mapper.readValue(jsonString, ScimPatchOperation.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -746,6 +756,7 @@ public int hashCode() { } @JsonDeserialize(builder = ScimPatchRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ScimPatchRequest { @@ -776,6 +787,7 @@ public static ScimPatchRequest fromJson( return mapper.readValue(jsonString, ScimPatchRequest.class); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..ac935cc315 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java @@ -50,11 +50,10 @@ public UserCreator setScimUser(final User.ScimUser scimUser) { private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java index 8be362f625..797269d007 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java @@ -44,11 +44,10 @@ public UserDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java index f8c87ecdd4..b49a9b4d54 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java @@ -43,11 +43,10 @@ public UserFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserPatcher.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserPatcher.java index 416f332aa0..9df8e94e07 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserPatcher.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserPatcher.java @@ -63,11 +63,10 @@ public UserPatcher setIfMatch(final String ifMatch) { public User patch(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java index e78283041a..832b366a65 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); Request request = new Request( HttpMethod.GET, 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..ff09eb8272 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java @@ -61,11 +61,10 @@ public UserUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; - path = - path.replace( - "{" + "OrganizationSid" + "}", - this.pathOrganizationSid.toString() - ); + path = path.replace( + "{" + "OrganizationSid" + "}", + this.pathOrganizationSid.toString() + ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); Request request = new Request( 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..a14434b20e 100644 --- a/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java +++ b/src/main/java/com/twilio/rest/previewiam/v1/Authorize.java @@ -117,7 +117,7 @@ public boolean equals(final Object o) { } Authorize other = (Authorize) o; - return (Objects.equals(redirectTo, other.redirectTo)); + return Objects.equals(redirectTo, other.redirectTo); } @Override 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..0861501b6e 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 @@ -128,13 +128,13 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private Country( @JsonProperty("country") final String country, - @JsonProperty("inbound_sms_prices") final List< - InboundSmsPrice - > inboundSmsPrices, + @JsonProperty( + "inbound_sms_prices" + ) final List inboundSmsPrices, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("outbound_sms_prices") final List< - OutboundSmsPrice - > outboundSmsPrices, + @JsonProperty( + "outbound_sms_prices" + ) final List outboundSmsPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, diff --git a/src/main/java/com/twilio/rest/pricing/v1/messaging/CountryFetcher.java b/src/main/java/com/twilio/rest/pricing/v1/messaging/CountryFetcher.java index 21d91e71fa..20096caaac 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/messaging/CountryFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v1/messaging/CountryFetcher.java @@ -38,11 +38,10 @@ public CountryFetcher(final String pathIsoCountry) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Messaging/Countries/{IsoCountry}"; - path = - path.replace( - "{" + "IsoCountry" + "}", - this.pathIsoCountry.toString() - ); + path = path.replace( + "{" + "IsoCountry" + "}", + this.pathIsoCountry.toString() + ); Request request = new Request( HttpMethod.GET, 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..80a7d647fc 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 @@ -125,9 +125,9 @@ public static String toJson(Object object, ObjectMapper mapper) { private Country( @JsonProperty("country") final String country, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("phone_number_prices") final List< - PhoneNumberPrice - > phoneNumberPrices, + @JsonProperty( + "phone_number_prices" + ) final List phoneNumberPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, diff --git a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/CountryFetcher.java b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/CountryFetcher.java index 765dd58385..7bc0af9953 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/phonenumber/CountryFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v1/phonenumber/CountryFetcher.java @@ -38,11 +38,10 @@ public CountryFetcher(final String pathIsoCountry) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/PhoneNumbers/Countries/{IsoCountry}"; - path = - path.replace( - "{" + "IsoCountry" + "}", - this.pathIsoCountry.toString() - ); + path = path.replace( + "{" + "IsoCountry" + "}", + this.pathIsoCountry.toString() + ); Request request = new Request( HttpMethod.GET, 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..588132b031 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 @@ -128,13 +128,13 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private Country( @JsonProperty("country") final String country, - @JsonProperty("inbound_call_prices") final List< - InboundCallPrice - > inboundCallPrices, + @JsonProperty( + "inbound_call_prices" + ) final List inboundCallPrices, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("outbound_prefix_prices") final List< - OutboundPrefixPrice - > outboundPrefixPrices, + @JsonProperty( + "outbound_prefix_prices" + ) final List outboundPrefixPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/CountryFetcher.java b/src/main/java/com/twilio/rest/pricing/v1/voice/CountryFetcher.java index 61f08efbe5..05714d0c9a 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/CountryFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/CountryFetcher.java @@ -38,11 +38,10 @@ public CountryFetcher(final String pathIsoCountry) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Voice/Countries/{IsoCountry}"; - path = - path.replace( - "{" + "IsoCountry" + "}", - this.pathIsoCountry.toString() - ); + path = path.replace( + "{" + "IsoCountry" + "}", + this.pathIsoCountry.toString() + ); Request request = new Request( HttpMethod.GET, 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..ffb1f7082e 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Country.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Country.java @@ -129,15 +129,15 @@ public static String toJson(Object object, ObjectMapper mapper) { private Country( @JsonProperty("country") final String country, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("originating_call_prices") final List< - InboundCallPrice - > originatingCallPrices, + @JsonProperty( + "originating_call_prices" + ) final List originatingCallPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, - @JsonProperty("terminating_prefix_prices") final List< - OutboundPrefixPriceWithOrigin - > terminatingPrefixPrices, + @JsonProperty( + "terminating_prefix_prices" + ) final List terminatingPrefixPrices, @JsonProperty("url") final URI url ) { this.country = country; diff --git a/src/main/java/com/twilio/rest/pricing/v2/CountryFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/CountryFetcher.java index ac91df0b6a..8f15a2ccb8 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/CountryFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/CountryFetcher.java @@ -38,11 +38,10 @@ public CountryFetcher(final String pathIsoCountry) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Trunking/Countries/{IsoCountry}"; - path = - path.replace( - "{" + "IsoCountry" + "}", - this.pathIsoCountry.toString() - ); + path = path.replace( + "{" + "IsoCountry" + "}", + this.pathIsoCountry.toString() + ); Request request = new Request( HttpMethod.GET, 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..a9f70bf64c 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/Number.java +++ b/src/main/java/com/twilio/rest/pricing/v2/Number.java @@ -145,9 +145,9 @@ private Number( @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, - @JsonProperty("terminating_prefix_prices") final List< - OutboundPrefixPriceWithOrigin - > terminatingPrefixPrices, + @JsonProperty( + "terminating_prefix_prices" + ) final List terminatingPrefixPrices, @JsonProperty("url") final URI url ) { this.country = country; diff --git a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java index 2757534771..0ff166e784 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java @@ -57,11 +57,10 @@ public NumberFetcher setOriginationNumber(final String originationNumber) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Trunking/Numbers/{DestinationNumber}"; - path = - path.replace( - "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.toString() - ); + path = path.replace( + "{" + "DestinationNumber" + "}", + this.pathDestinationNumber.toString() + ); Request request = new Request( HttpMethod.GET, 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..65de50264e 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 @@ -128,13 +128,13 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private Country( @JsonProperty("country") final String country, - @JsonProperty("inbound_call_prices") final List< - InboundCallPrice - > inboundCallPrices, + @JsonProperty( + "inbound_call_prices" + ) final List inboundCallPrices, @JsonProperty("iso_country") final String isoCountry, - @JsonProperty("outbound_prefix_prices") final List< - OutboundPrefixPriceWithOrigin - > outboundPrefixPrices, + @JsonProperty( + "outbound_prefix_prices" + ) final List outboundPrefixPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/CountryFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/voice/CountryFetcher.java index 95cf9bd108..4349f4d171 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/CountryFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/CountryFetcher.java @@ -38,11 +38,10 @@ public CountryFetcher(final String pathIsoCountry) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Voice/Countries/{IsoCountry}"; - path = - path.replace( - "{" + "IsoCountry" + "}", - this.pathIsoCountry.toString() - ); + path = path.replace( + "{" + "IsoCountry" + "}", + this.pathIsoCountry.toString() + ); Request request = new Request( HttpMethod.GET, 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..705c2713cd 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 @@ -142,9 +142,9 @@ private Number( @JsonProperty( "origination_number" ) final com.twilio.type.PhoneNumber originationNumber, - @JsonProperty("outbound_call_prices") final List< - OutboundCallPriceWithOrigin - > outboundCallPrices, + @JsonProperty( + "outbound_call_prices" + ) final List outboundCallPrices, @JsonProperty("price_unit") @JsonDeserialize( using = com.twilio.converter.CurrencyDeserializer.class ) final Currency priceUnit, diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java index 036ab37a93..cf82ba51e8 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java @@ -57,11 +57,10 @@ public NumberFetcher setOriginationNumber(final String originationNumber) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Voice/Numbers/{DestinationNumber}"; - path = - path.replace( - "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.toString() - ); + path = path.replace( + "{" + "DestinationNumber" + "}", + this.pathDestinationNumber.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberCreator.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberCreator.java index 70da551576..8637706f1d 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberCreator.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberCreator.java @@ -66,11 +66,10 @@ public PhoneNumberCreator setIsReserved(final Boolean isReserved) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberDeleter.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberDeleter.java index 3033f28bdb..b600b818d9 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberDeleter.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberDeleter.java @@ -44,11 +44,10 @@ public PhoneNumberDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberFetcher.java index 0edb691898..90a3ed9add 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberFetcher.java @@ -43,11 +43,10 @@ public PhoneNumberFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberReader.java index 415819c659..e9b2bc0db1 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberReader.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberUpdater.java b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberUpdater.java index e81baf0924..c0b3fc4967 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberUpdater.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/PhoneNumberUpdater.java @@ -52,11 +52,10 @@ public PhoneNumberUpdater setIsReserved(final Boolean isReserved) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java index c79adfad85..c233127074 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java @@ -84,11 +84,10 @@ public SessionCreator setParticipants(final Object participants) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionDeleter.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionDeleter.java index f3009e5edc..a408f5e74a 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionDeleter.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionDeleter.java @@ -41,11 +41,10 @@ public SessionDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionFetcher.java index 851d37773d..8e5603cc01 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionFetcher.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionFetcher.java @@ -40,11 +40,10 @@ public SessionFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionReader.java index 12ce3ce9ec..c16e582adf 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionReader.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java index 3593cc16fd..99d8f6c06a 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionUpdater.java @@ -62,11 +62,10 @@ public SessionUpdater setStatus(final Session.Status status) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionDeleter.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionDeleter.java index c948b91a63..5dc1156291 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionDeleter.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionFetcher.java index cb7411e4f5..ea8f85e1ef 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionFetcher.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionReader.java index 2faf794e78..2991677f92 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionReader.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/InteractionReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantCreator.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantCreator.java index 077af4c908..8689186eb1 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantCreator.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantCreator.java @@ -75,16 +75,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantDeleter.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantDeleter.java index be2c9066ab..e5fe3ecd8d 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantDeleter.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantFetcher.java index ee842c5b2b..9e9cc75fb5 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantFetcher.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantReader.java index 0a1c7a427b..3de973f5e4 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantReader.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/ParticipantReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionCreator.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionCreator.java index 277cb76605..5d9dafe50b 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionCreator.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionCreator.java @@ -87,21 +87,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionFetcher.java index c1d382036f..c48d6e6797 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionFetcher.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionFetcher.java @@ -50,21 +50,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java index f1eca18422..7501c3dc4a 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java @@ -82,21 +82,18 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "SessionSid" + "}", - this.pathSessionSid.toString() - ); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "SessionSid" + "}", + this.pathSessionSid.toString() + ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/routes/v2/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/routes/v2/PhoneNumberFetcher.java index f18e9b8c0f..2d2d169ab8 100644 --- a/src/main/java/com/twilio/rest/routes/v2/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/routes/v2/PhoneNumberFetcher.java @@ -38,11 +38,10 @@ public PhoneNumberFetcher(final String pathPhoneNumber) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/routes/v2/PhoneNumberUpdater.java b/src/main/java/com/twilio/rest/routes/v2/PhoneNumberUpdater.java index f973820069..cf2b114ace 100644 --- a/src/main/java/com/twilio/rest/routes/v2/PhoneNumberUpdater.java +++ b/src/main/java/com/twilio/rest/routes/v2/PhoneNumberUpdater.java @@ -53,11 +53,10 @@ public PhoneNumberUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/PhoneNumbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/routes/v2/SipDomainFetcher.java b/src/main/java/com/twilio/rest/routes/v2/SipDomainFetcher.java index 0f49b89533..653fbdb593 100644 --- a/src/main/java/com/twilio/rest/routes/v2/SipDomainFetcher.java +++ b/src/main/java/com/twilio/rest/routes/v2/SipDomainFetcher.java @@ -38,11 +38,10 @@ public SipDomainFetcher(final String pathSipDomain) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/SipDomains/{SipDomain}"; - path = - path.replace( - "{" + "SipDomain" + "}", - this.pathSipDomain.toString() - ); + path = path.replace( + "{" + "SipDomain" + "}", + this.pathSipDomain.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/routes/v2/SipDomainUpdater.java b/src/main/java/com/twilio/rest/routes/v2/SipDomainUpdater.java index 74e90658b9..7a4153006e 100644 --- a/src/main/java/com/twilio/rest/routes/v2/SipDomainUpdater.java +++ b/src/main/java/com/twilio/rest/routes/v2/SipDomainUpdater.java @@ -53,11 +53,10 @@ public SipDomainUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/SipDomains/{SipDomain}"; - path = - path.replace( - "{" + "SipDomain" + "}", - this.pathSipDomain.toString() - ); + path = path.replace( + "{" + "SipDomain" + "}", + this.pathSipDomain.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/routes/v2/TrunkFetcher.java b/src/main/java/com/twilio/rest/routes/v2/TrunkFetcher.java index ce73d2c4fb..b73067a766 100644 --- a/src/main/java/com/twilio/rest/routes/v2/TrunkFetcher.java +++ b/src/main/java/com/twilio/rest/routes/v2/TrunkFetcher.java @@ -38,11 +38,10 @@ public TrunkFetcher(final String pathSipTrunkDomain) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Trunks/{SipTrunkDomain}"; - path = - path.replace( - "{" + "SipTrunkDomain" + "}", - this.pathSipTrunkDomain.toString() - ); + path = path.replace( + "{" + "SipTrunkDomain" + "}", + this.pathSipTrunkDomain.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/routes/v2/TrunkUpdater.java b/src/main/java/com/twilio/rest/routes/v2/TrunkUpdater.java index d41e9ef012..dcfb15574c 100644 --- a/src/main/java/com/twilio/rest/routes/v2/TrunkUpdater.java +++ b/src/main/java/com/twilio/rest/routes/v2/TrunkUpdater.java @@ -53,11 +53,10 @@ public TrunkUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Trunks/{SipTrunkDomain}"; - path = - path.replace( - "{" + "SipTrunkDomain" + "}", - this.pathSipTrunkDomain.toString() - ); + path = path.replace( + "{" + "SipTrunkDomain" + "}", + this.pathSipTrunkDomain.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/routes/v3/PhoneNumber.java b/src/main/java/com/twilio/rest/routes/v3/PhoneNumber.java new file mode 100644 index 0000000000..4fc58b538a --- /dev/null +++ b/src/main/java/com/twilio/rest/routes/v3/PhoneNumber.java @@ -0,0 +1,490 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Routes + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.routes.v3; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.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 com.twilio.base.Resource; +import com.twilio.exception.ApiConnectionException; +import com.twilio.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; +import java.util.Objects; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class PhoneNumber extends Resource { + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class CreatePhoneNumberResponse extends Resource { + + @JsonCreator + private CreatePhoneNumberResponse() {} + + public static CreatePhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + CreatePhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePhoneNumberResponse other = (CreatePhoneNumberResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class UpdatePhoneNumberResponse extends Resource { + + @Getter + private final String accountSid; + + @Getter + private final ZonedDateTime dateCreated; + + @Getter + private final ZonedDateTime dateUpdated; + + @Getter + private final String friendlyName; + + @Getter + private final String messagingRegion; + + @Getter + private final String phoneNumber; + + @Getter + private final URI url; + + @Getter + private final String voiceRegion; + + @JsonCreator + private UpdatePhoneNumberResponse( + @JsonProperty("accountSid") final String accountSid, + @JsonProperty("dateCreated") final ZonedDateTime dateCreated, + @JsonProperty("dateUpdated") final ZonedDateTime dateUpdated, + @JsonProperty("friendlyName") final String friendlyName, + @JsonProperty("messagingRegion") final String messagingRegion, + @JsonProperty("phoneNumber") final String phoneNumber, + @JsonProperty("url") final URI url, + @JsonProperty("voiceRegion") final String voiceRegion + ) { + this.accountSid = accountSid; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + this.friendlyName = friendlyName; + this.messagingRegion = messagingRegion; + this.phoneNumber = phoneNumber; + this.url = url; + this.voiceRegion = voiceRegion; + } + + public static UpdatePhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + UpdatePhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePhoneNumberResponse other = (UpdatePhoneNumberResponse) o; + return ( + Objects.equals(accountSid, other.accountSid) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(messagingRegion, other.messagingRegion) && + Objects.equals(phoneNumber, other.phoneNumber) && + Objects.equals(url, other.url) && + Objects.equals(voiceRegion, other.voiceRegion) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + accountSid, + dateCreated, + dateUpdated, + friendlyName, + messagingRegion, + phoneNumber, + url, + voiceRegion + ); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class DeletePhoneNumberResponse extends Resource { + + @JsonCreator + private DeletePhoneNumberResponse() {} + + public static DeletePhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + DeletePhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePhoneNumberResponse other = (DeletePhoneNumberResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class ListPhoneNumberResponse extends Resource { + + @JsonCreator + private ListPhoneNumberResponse() {} + + public static ListPhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + ListPhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPhoneNumberResponse other = (ListPhoneNumberResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class PatchPhoneNumberResponse extends Resource { + + @JsonCreator + private PatchPhoneNumberResponse() {} + + public static PatchPhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + PatchPhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchPhoneNumberResponse other = (PatchPhoneNumberResponse) o; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class FetchPhoneNumberResponse extends Resource { + + @Getter + private final String accountSid; + + @Getter + private final ZonedDateTime dateCreated; + + @Getter + private final ZonedDateTime dateUpdated; + + @Getter + private final String friendlyName; + + @Getter + private final String messagingRegion; + + @Getter + private final String phoneNumber; + + @Getter + private final URI url; + + @Getter + private final String voiceRegion; + + @JsonCreator + private FetchPhoneNumberResponse( + @JsonProperty("accountSid") final String accountSid, + @JsonProperty("dateCreated") final ZonedDateTime dateCreated, + @JsonProperty("dateUpdated") final ZonedDateTime dateUpdated, + @JsonProperty("friendlyName") final String friendlyName, + @JsonProperty("messagingRegion") final String messagingRegion, + @JsonProperty("phoneNumber") final String phoneNumber, + @JsonProperty("url") final URI url, + @JsonProperty("voiceRegion") final String voiceRegion + ) { + this.accountSid = accountSid; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + this.friendlyName = friendlyName; + this.messagingRegion = messagingRegion; + this.phoneNumber = phoneNumber; + this.url = url; + this.voiceRegion = voiceRegion; + } + + public static FetchPhoneNumberResponse fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + FetchPhoneNumberResponse.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchPhoneNumberResponse other = (FetchPhoneNumberResponse) o; + return ( + Objects.equals(accountSid, other.accountSid) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(messagingRegion, other.messagingRegion) && + Objects.equals(phoneNumber, other.phoneNumber) && + Objects.equals(url, other.url) && + Objects.equals(voiceRegion, other.voiceRegion) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + accountSid, + dateCreated, + dateUpdated, + friendlyName, + messagingRegion, + phoneNumber, + url, + voiceRegion + ); + } + } + + public static PhoneNumberFetcher fetcher(final String pathPhoneNumber) { + return new PhoneNumberFetcher(pathPhoneNumber); + } + + public static PhoneNumberUpdater updater(final String pathPhoneNumber) { + return new PhoneNumberUpdater(pathPhoneNumber); + } + + /** + * Converts a JSON String into a PhoneNumber object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return PhoneNumber object represented by the provided JSON + */ + public static PhoneNumber fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, PhoneNumber.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a PhoneNumber object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return PhoneNumber object represented by the provided JSON + */ + public static PhoneNumber fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, PhoneNumber.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @JsonCreator + private PhoneNumber() {} + + @Override + public boolean equals(Object obj) { + return obj != null && obj.getClass() == this.getClass(); + } + + @Override + public int hashCode() { + return 1; + } +} diff --git a/src/main/java/com/twilio/rest/routes/v3/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/routes/v3/PhoneNumberFetcher.java new file mode 100644 index 0000000000..8955113775 --- /dev/null +++ b/src/main/java/com/twilio/rest/routes/v3/PhoneNumberFetcher.java @@ -0,0 +1,104 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Routes + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.routes.v3; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class PhoneNumberFetcher + extends Fetcher +{ + + private String pathPhoneNumber; + + public PhoneNumberFetcher(final String pathPhoneNumber) { + this.pathPhoneNumber = pathPhoneNumber; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v3/PhoneNumbers/{phoneNumber}"; + + path = path.replace( + "{" + "phoneNumber" + "}", + this.pathPhoneNumber.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.ROUTES.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "PhoneNumber fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public PhoneNumber.FetchPhoneNumberResponse fetch( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + return PhoneNumber.FetchPhoneNumberResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + PhoneNumber.FetchPhoneNumberResponse content = + PhoneNumber.FetchPhoneNumberResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/routes/v3/PhoneNumberUpdater.java b/src/main/java/com/twilio/rest/routes/v3/PhoneNumberUpdater.java new file mode 100644 index 0000000000..c4a30dc192 --- /dev/null +++ b/src/main/java/com/twilio/rest/routes/v3/PhoneNumberUpdater.java @@ -0,0 +1,156 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Routes + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.routes.v3; + +import com.twilio.base.TwilioResponse; +import com.twilio.base.Updater; +import com.twilio.constant.EnumConstants; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.converter.Serializer; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class PhoneNumberUpdater + extends Updater +{ + + private String pathPhoneNumber; + private String voiceRegion; + private String messagingRegion; + private String friendlyName; + + public PhoneNumberUpdater(final String pathPhoneNumber) { + this.pathPhoneNumber = pathPhoneNumber; + } + + public PhoneNumberUpdater setVoiceRegion(final String voiceRegion) { + this.voiceRegion = voiceRegion; + return this; + } + + public PhoneNumberUpdater setMessagingRegion(final String messagingRegion) { + this.messagingRegion = messagingRegion; + return this; + } + + public PhoneNumberUpdater setFriendlyName(final String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v3/PhoneNumbers/{phoneNumber}"; + + path = path.replace( + "{" + "phoneNumber" + "}", + this.pathPhoneNumber.toString() + ); + + Request request = new Request( + HttpMethod.POST, + Domains.ROUTES.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + addPostParams(request); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "PhoneNumber update failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public PhoneNumber.UpdatePhoneNumberResponse update( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + return PhoneNumber.UpdatePhoneNumberResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + PhoneNumber.UpdatePhoneNumberResponse content = + PhoneNumber.UpdatePhoneNumberResponse.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } + + private void addPostParams(final Request request) { + if (voiceRegion != null) { + Serializer.toString( + request, + "voiceRegion", + voiceRegion, + ParameterType.URLENCODED + ); + } + + if (messagingRegion != null) { + Serializer.toString( + request, + "messagingRegion", + messagingRegion, + ParameterType.URLENCODED + ); + } + + if (friendlyName != null) { + Serializer.toString( + request, + "friendlyName", + friendlyName, + ParameterType.URLENCODED + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/AssetCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/AssetCreator.java index 3c82625692..563d0bfe4d 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/AssetCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/AssetCreator.java @@ -51,11 +51,10 @@ public AssetCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/AssetDeleter.java b/src/main/java/com/twilio/rest/serverless/v1/service/AssetDeleter.java index 15b9593317..862c9bfdc5 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/AssetDeleter.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/AssetDeleter.java @@ -41,11 +41,10 @@ public AssetDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/AssetFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/AssetFetcher.java index 7a0a1c0898..b2a09651f2 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/AssetFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/AssetFetcher.java @@ -40,11 +40,10 @@ public AssetFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/AssetReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/AssetReader.java index f5e82b9d7c..6d4e4e30be 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/AssetReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/AssetReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/AssetUpdater.java b/src/main/java/com/twilio/rest/serverless/v1/service/AssetUpdater.java index 44d6e224fa..48fac5d88a 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/AssetUpdater.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/AssetUpdater.java @@ -54,11 +54,10 @@ public AssetUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 c0a0f1c88e..70d7eff59d 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 @@ -98,7 +98,8 @@ public enum Runtime { NODE16("node16"), NODE18("node18"), NODE20("node20"), - NODE22("node22"); + NODE22("node22"), + NODE24("node24"); private final String value; diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/BuildCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/BuildCreator.java index 94a4722553..053ab71cb9 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/BuildCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/BuildCreator.java @@ -77,11 +77,10 @@ public BuildCreator setRuntime(final String runtime) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Builds"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/BuildDeleter.java b/src/main/java/com/twilio/rest/serverless/v1/service/BuildDeleter.java index c988c5e08c..c53c950f4b 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/BuildDeleter.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/BuildDeleter.java @@ -41,11 +41,10 @@ public BuildDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Builds/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/BuildFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/BuildFetcher.java index 215e5fcd3c..6521334de7 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/BuildFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/BuildFetcher.java @@ -40,11 +40,10 @@ public BuildFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Builds/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/BuildReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/BuildReader.java index 4ddc1930e0..3541820bbd 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/BuildReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/BuildReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Builds"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentCreator.java index 3eec744742..7032b9d068 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentCreator.java @@ -57,11 +57,10 @@ public EnvironmentCreator setDomainSuffix(final String domainSuffix) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentDeleter.java b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentDeleter.java index e6f952ed69..571fed8105 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentDeleter.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentDeleter.java @@ -44,11 +44,10 @@ public EnvironmentDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentFetcher.java index abd9332b98..198643e822 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentFetcher.java @@ -43,11 +43,10 @@ public EnvironmentFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentReader.java index ab7249ca94..58824a922f 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/EnvironmentReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionCreator.java index 750f851415..d78ddd5000 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionCreator.java @@ -51,11 +51,10 @@ public FunctionCreator setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionDeleter.java b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionDeleter.java index 56b59f8407..271f1b9aa3 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionDeleter.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionDeleter.java @@ -41,11 +41,10 @@ public FunctionDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionFetcher.java index 6cb09d99df..8ac790d1d5 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionFetcher.java @@ -40,11 +40,10 @@ public FunctionFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionReader.java index 5bcb6246f2..fbdc6c0637 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionUpdater.java b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionUpdater.java index e2ed8bc42e..c5db72c43a 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/FunctionUpdater.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/FunctionUpdater.java @@ -54,11 +54,10 @@ public FunctionUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionFetcher.java index 2ef8dcf8c4..94ba02649c 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionFetcher.java @@ -47,13 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "AssetSid" + "}", this.pathAssetSid.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "AssetSid" + "}", + this.pathAssetSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionReader.java index fc013e4696..911d22b9ee 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/asset/AssetVersionReader.java @@ -78,13 +78,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "AssetSid" + "}", this.pathAssetSid.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "AssetSid" + "}", + this.pathAssetSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatusFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatusFetcher.java index 273524bf31..00f5006051 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatusFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/build/BuildStatusFetcher.java @@ -43,11 +43,10 @@ public BuildStatusFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Builds/{Sid}/Status"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentCreator.java index 8343108748..5989c2502c 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentCreator.java @@ -59,16 +59,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentFetcher.java index 7e18d38eba..838bae9234 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentReader.java index 66b84853ba..5f2b6bf3d1 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/DeploymentReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogFetcher.java index 10916a2b9a..003d423289 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogReader.java index f7c42c6f00..924a3e3704 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/LogReader.java @@ -94,16 +94,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableCreator.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableCreator.java index 0d0ac12448..bb2966b896 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableCreator.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableCreator.java @@ -63,16 +63,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableDeleter.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableDeleter.java index 456b9a15d7..d6d1dc4b87 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableDeleter.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableFetcher.java index a81ca8fb23..9adad56994 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java index 86fa6b5744..d2f4af2686 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableUpdater.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableUpdater.java index 0534f43d90..4c0d1fae9b 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableUpdater.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/VariableUpdater.java @@ -62,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "EnvironmentSid" + "}", - this.pathEnvironmentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "EnvironmentSid" + "}", + this.pathEnvironmentSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionFetcher.java index 2de999c2ae..c7c15760ed 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "FunctionSid" + "}", - this.pathFunctionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "FunctionSid" + "}", + this.pathFunctionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionReader.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionReader.java index 6bc0d4eb96..d87bb3f655 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionReader.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/FunctionVersionReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "FunctionSid" + "}", - this.pathFunctionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "FunctionSid" + "}", + this.pathFunctionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContentFetcher.java b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContentFetcher.java index e2f5cb641c..f8be49e681 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContentFetcher.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/function/functionversion/FunctionVersionContentFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class FunctionVersionContentFetcher - extends Fetcher { + extends Fetcher +{ private String pathServiceSid; private String pathFunctionSid; @@ -48,16 +49,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "FunctionSid" + "}", - this.pathFunctionSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "FunctionSid" + "}", + this.pathFunctionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContextFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContextFetcher.java index 67d931f8cf..591fc7d565 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/EngagementContextFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "EngagementSid" + "}", - this.pathEngagementSid.toString() - ); + path = path.replace( + "{" + "EngagementSid" + "}", + this.pathEngagementSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepFetcher.java index b77a1a1ecc..2c7c379b5e 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "EngagementSid" + "}", - this.pathEngagementSid.toString() - ); + path = path.replace( + "{" + "EngagementSid" + "}", + this.pathEngagementSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepReader.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepReader.java index fbe338f698..8d4df8cdc0 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepReader.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/StepReader.java @@ -75,11 +75,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "EngagementSid" + "}", - this.pathEngagementSid.toString() - ); + path = path.replace( + "{" + "EngagementSid" + "}", + this.pathEngagementSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContextFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContextFetcher.java index 61ebf4bae5..92b8e71f18 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/step/StepContextFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "EngagementSid" + "}", - this.pathEngagementSid.toString() - ); + path = path.replace( + "{" + "EngagementSid" + "}", + this.pathEngagementSid.toString() + ); path = path.replace("{" + "StepSid" + "}", this.pathStepSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContextFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContextFetcher.java index bfc60f7589..8e505e5d01 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionContextFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepFetcher.java index 17662d575b..bd3fcb29a7 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepReader.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepReader.java index 827b22e889..1f1ecccd60 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepReader.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStepReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContextFetcher.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContextFetcher.java index 5b89ba89a2..bf48c6c9c9 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/executionstep/ExecutionStepContextFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); path = path.replace("{" + "StepSid" + "}", this.pathStepSid.toString()); Request request = new Request( 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 1a3a15e94f..c1f2d04178 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java @@ -143,7 +143,7 @@ public boolean equals(final Object o) { } FlowValidate other = (FlowValidate) o; - return (Objects.equals(valid, other.valid)); + return Objects.equals(valid, other.valid); } @Override diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevisionFetcher.java b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevisionFetcher.java index f4d8fba02f..4e26f42659 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevisionFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/FlowRevisionFetcher.java @@ -44,8 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Flows/{Sid}/Revisions/{Revision}"; path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - path = - path.replace("{" + "Revision" + "}", this.pathRevision.toString()); + path = path.replace( + "{" + "Revision" + "}", + this.pathRevision.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContextFetcher.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContextFetcher.java index bf2c00a50a..7ff455a9d4 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionContextFetcher.java @@ -44,11 +44,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepFetcher.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepFetcher.java index 00c9d1d62c..f581994c32 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepReader.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepReader.java index bdf847a008..930288d3fc 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepReader.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStepReader.java @@ -79,11 +79,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContextFetcher.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContextFetcher.java index 733b6a516b..c2ad83c6c5 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContextFetcher.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/executionstep/ExecutionStepContextFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = - path.replace( - "{" + "ExecutionSid" + "}", - this.pathExecutionSid.toString() - ); + path = path.replace( + "{" + "ExecutionSid" + "}", + this.pathExecutionSid.toString() + ); path = path.replace("{" + "StepSid" + "}", this.pathStepSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkCreator.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkCreator.java index 4c6076e830..f68d4a5f5d 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkCreator.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class NetworkAccessProfileNetworkCreator - extends Creator { + extends Creator +{ private String pathNetworkAccessProfileSid; private String network; @@ -53,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks"; - path = - path.replace( - "{" + "NetworkAccessProfileSid" + "}", - this.pathNetworkAccessProfileSid.toString() - ); + path = path.replace( + "{" + "NetworkAccessProfileSid" + "}", + this.pathNetworkAccessProfileSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkDeleter.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkDeleter.java index 89a20b2d64..c8f785180b 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkDeleter.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class NetworkAccessProfileNetworkDeleter - extends Deleter { + extends Deleter +{ private String pathNetworkAccessProfileSid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}"; - path = - path.replace( - "{" + "NetworkAccessProfileSid" + "}", - this.pathNetworkAccessProfileSid.toString() - ); + path = path.replace( + "{" + "NetworkAccessProfileSid" + "}", + this.pathNetworkAccessProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkFetcher.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkFetcher.java index 307a3a418a..22c4925820 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkFetcher.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class NetworkAccessProfileNetworkFetcher - extends Fetcher { + extends Fetcher +{ private String pathNetworkAccessProfileSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}"; - path = - path.replace( - "{" + "NetworkAccessProfileSid" + "}", - this.pathNetworkAccessProfileSid.toString() - ); + path = path.replace( + "{" + "NetworkAccessProfileSid" + "}", + this.pathNetworkAccessProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkReader.java b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkReader.java index 39a1bceb7a..8ffba1be8d 100644 --- a/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkReader.java +++ b/src/main/java/com/twilio/rest/supersim/v1/networkaccessprofile/NetworkAccessProfileNetworkReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class NetworkAccessProfileNetworkReader - extends Reader { + extends Reader +{ private String pathNetworkAccessProfileSid; private Long pageSize; @@ -74,11 +75,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks"; - path = - path.replace( - "{" + "NetworkAccessProfileSid" + "}", - this.pathNetworkAccessProfileSid.toString() - ); + path = path.replace( + "{" + "NetworkAccessProfileSid" + "}", + this.pathNetworkAccessProfileSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java index 0b206f42e6..40dd54b4ae 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java @@ -59,11 +59,10 @@ public DocumentCreator setTtl(final Integer ttl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentDeleter.java index ad467b1cf4..71e2a3d37c 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentDeleter.java @@ -41,11 +41,10 @@ public DocumentDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentFetcher.java index c8f4a55370..45c582368e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentFetcher.java @@ -40,11 +40,10 @@ public DocumentFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentReader.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentReader.java index d2988064b1..cd8d8d85d7 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java index 28361e36d1..4156e14457 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java @@ -61,11 +61,10 @@ public DocumentUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncListCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncListCreator.java index 5385b4be5d..24ddd95816 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncListCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncListCreator.java @@ -59,11 +59,10 @@ public SyncListCreator setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncListDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncListDeleter.java index 23e4d5d013..5a2c419577 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncListDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncListDeleter.java @@ -41,11 +41,10 @@ public SyncListDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncListFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncListFetcher.java index 016840860e..0e0da153ac 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncListFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncListFetcher.java @@ -40,11 +40,10 @@ public SyncListFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncListReader.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncListReader.java index 0f45569686..84a0ffd8e4 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncListReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncListReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncListUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncListUpdater.java index c4f5cb8e69..31ba52d795 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncListUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncListUpdater.java @@ -55,11 +55,10 @@ public SyncListUpdater setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapCreator.java index 2ec12911e6..71739791ea 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapCreator.java @@ -59,11 +59,10 @@ public SyncMapCreator setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapDeleter.java index 03f221efc6..56b9be14b9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapDeleter.java @@ -41,11 +41,10 @@ public SyncMapDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapFetcher.java index 94d500bcca..acc538eccd 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapFetcher.java @@ -40,11 +40,10 @@ public SyncMapFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapReader.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapReader.java index b8dd69457f..6599e4cd76 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapUpdater.java index bac68120a5..46b52a5d97 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncMapUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncMapUpdater.java @@ -55,11 +55,10 @@ public SyncMapUpdater setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamCreator.java index c4e4c9c100..d0ca70cb8b 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamCreator.java @@ -53,11 +53,10 @@ public SyncStreamCreator setTtl(final Integer ttl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamDeleter.java index d550447a0c..2b1df14cc5 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamDeleter.java @@ -44,11 +44,10 @@ public SyncStreamDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamFetcher.java index a3683791a4..2d168e9ae2 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamFetcher.java @@ -43,11 +43,10 @@ public SyncStreamFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamReader.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamReader.java index 633819565e..24fffb98cf 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamUpdater.java index f81fd17f4b..2d96b40c11 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/SyncStreamUpdater.java @@ -52,11 +52,10 @@ public SyncStreamUpdater setTtl(final Integer ttl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionDeleter.java index d6034abc5c..3fe842c748 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionDeleter.java @@ -48,18 +48,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "DocumentSid" + "}", - this.pathDocumentSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "DocumentSid" + "}", + this.pathDocumentSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionFetcher.java index 4c52e8b4e4..f86c1a8f8b 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionFetcher.java @@ -47,18 +47,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "DocumentSid" + "}", - this.pathDocumentSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "DocumentSid" + "}", + this.pathDocumentSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionReader.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionReader.java index 899019ea9b..f090ed7257 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "DocumentSid" + "}", - this.pathDocumentSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "DocumentSid" + "}", + this.pathDocumentSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionUpdater.java index 689c895ef1..4cde186906 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/document/DocumentPermissionUpdater.java @@ -74,18 +74,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "DocumentSid" + "}", - this.pathDocumentSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "DocumentSid" + "}", + this.pathDocumentSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java index a8328efaf4..817e7fcf5e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java @@ -72,11 +72,10 @@ public SyncListItemCreator setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemDeleter.java index 0975a950ea..95fdd7e2d3 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemDeleter.java @@ -55,11 +55,10 @@ public SyncListItemDeleter setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); path = path.replace("{" + "Index" + "}", this.pathIndex.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemFetcher.java index eb24536f88..0e623256c5 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemFetcher.java @@ -46,11 +46,10 @@ public SyncListItemFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); path = path.replace("{" + "Index" + "}", this.pathIndex.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemReader.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemReader.java index 2f0497c016..d8e7834c63 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemReader.java @@ -100,11 +100,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java index ef8c16f76b..7f6130f918 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java @@ -79,11 +79,10 @@ public SyncListItemUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); path = path.replace("{" + "Index" + "}", this.pathIndex.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionDeleter.java index b77915aafa..7c676202b8 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionDeleter.java @@ -48,14 +48,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionFetcher.java index 34763ce956..77ed4ffd0e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionFetcher.java @@ -47,14 +47,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionReader.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionReader.java index 1916868443..45a15c733c 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionUpdater.java index 3dcc555cad..bdd6a7c352 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListPermissionUpdater.java @@ -74,14 +74,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "ListSid" + "}", this.pathListSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java index 325dd2f4cc..3da0d657e9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java @@ -80,11 +80,10 @@ public SyncMapItemCreator setCollectionTtl(final Integer collectionTtl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemDeleter.java index c08560f48b..cb3313af2e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemDeleter.java @@ -55,11 +55,10 @@ public SyncMapItemDeleter setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); path = path.replace("{" + "Key" + "}", this.pathKey.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemFetcher.java index 43343677e0..5c62d8fd2e 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemFetcher.java @@ -46,11 +46,10 @@ public SyncMapItemFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); path = path.replace("{" + "Key" + "}", this.pathKey.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemReader.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemReader.java index fe176d6e63..ea582b59f4 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemReader.java @@ -100,11 +100,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java index 14e186bd1b..056142ccab 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java @@ -79,11 +79,10 @@ public SyncMapItemUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); path = path.replace("{" + "Key" + "}", this.pathKey.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionDeleter.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionDeleter.java index 31d7ed5ad2..7677de2a66 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionDeleter.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionDeleter.java @@ -48,14 +48,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionFetcher.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionFetcher.java index ad700a6103..457c19e535 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionFetcher.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionFetcher.java @@ -47,14 +47,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionReader.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionReader.java index 053e472752..cfeda72be9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionReader.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionReader.java @@ -78,11 +78,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionUpdater.java index 681cdad53e..d907d81f33 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapPermissionUpdater.java @@ -74,14 +74,15 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "MapSid" + "}", this.pathMapSid.toString()); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java index afe0836003..41f0b9327d 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java @@ -54,16 +54,14 @@ public StreamMessageCreator setData(final Object data) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "StreamSid" + "}", - this.pathStreamSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "StreamSid" + "}", + this.pathStreamSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityCreator.java index eb8f0196a8..42a2b0998c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityCreator.java @@ -57,11 +57,10 @@ public ActivityCreator setAvailable(final Boolean available) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Activities"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityDeleter.java index 0cbf856fd4..dbd51341a1 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityDeleter.java @@ -44,11 +44,10 @@ public ActivityDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityFetcher.java index 437ffe880e..08e29ce033 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityFetcher.java @@ -43,11 +43,10 @@ public ActivityFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityReader.java index 23e95ad8a9..cbd5dc2e61 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityReader.java @@ -85,11 +85,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Activities"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityUpdater.java index 0fa95fccc6..1b8332e6a9 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/ActivityUpdater.java @@ -52,11 +52,10 @@ public ActivityUpdater setFriendlyName(final String friendlyName) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventFetcher.java index 8cbb04a768..b309bcf924 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventFetcher.java @@ -40,11 +40,10 @@ public EventFetcher(final String pathWorkspaceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventReader.java index ca0cd6ca9c..0675878f0a 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/EventReader.java @@ -136,11 +136,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Events"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelCreator.java index dbf04bb302..078174dbdb 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelCreator.java @@ -67,11 +67,10 @@ public TaskChannelCreator setChannelOptimizedRouting( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskChannels"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelDeleter.java index 1c31b625f1..b677c1f84c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelDeleter.java @@ -44,11 +44,10 @@ public TaskChannelDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelFetcher.java index 60a0222c47..6533e2c39a 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelFetcher.java @@ -43,11 +43,10 @@ public TaskChannelFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelReader.java index 0026b7b0ae..f2ed9833ac 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskChannels"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelUpdater.java index 00c45f6f23..afaae20a6a 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskChannelUpdater.java @@ -60,11 +60,10 @@ public TaskChannelUpdater setChannelOptimizedRouting( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskCreator.java index 08169f65b2..7965ae7678 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskCreator.java @@ -98,11 +98,10 @@ public TaskCreator setTaskQueueSid(final String taskQueueSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskDeleter.java index 61c640fa6c..9ad23f7849 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskDeleter.java @@ -49,11 +49,10 @@ public TaskDeleter setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskFetcher.java index 2af8249bbb..6db7201137 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskFetcher.java @@ -40,11 +40,10 @@ public TaskFetcher(final String pathWorkspaceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueCreator.java index b21aa52661..f7689a06dc 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueCreator.java @@ -87,11 +87,10 @@ public TaskQueueCreator setAssignmentActivitySid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueDeleter.java index df692ef060..6d515fe5f8 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueDeleter.java @@ -44,11 +44,10 @@ public TaskQueueDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueFetcher.java index c95635ac06..b15bd8d1fb 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueFetcher.java @@ -43,11 +43,10 @@ public TaskQueueFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueReader.java index 2b7464675b..b554d1ce23 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueReader.java @@ -99,11 +99,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueUpdater.java index f5370ec08b..58a4d83000 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskQueueUpdater.java @@ -88,11 +88,10 @@ public TaskQueueUpdater setTaskOrder(final TaskQueue.TaskOrder taskOrder) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskReader.java index e81292b042..6d6b7a1716 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskReader.java @@ -137,11 +137,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskUpdater.java index d5772b00b4..fb74fd443c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/TaskUpdater.java @@ -88,11 +88,10 @@ public TaskUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerCreator.java index 7465d26dcf..124399315a 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerCreator.java @@ -63,11 +63,10 @@ public WorkerCreator setAttributes(final String attributes) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerDeleter.java index d5c444f16e..c49ac3b77c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerDeleter.java @@ -49,11 +49,10 @@ public WorkerDeleter setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerFetcher.java index 90b69b870b..ab9905fb54 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerFetcher.java @@ -40,11 +40,10 @@ public WorkerFetcher(final String pathWorkspaceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerReader.java index 84e825ef5a..1d8e0b16fc 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerReader.java @@ -119,11 +119,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerUpdater.java index 666d5e2067..a8a16bd279 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkerUpdater.java @@ -75,11 +75,10 @@ public WorkerUpdater setIfMatch(final String ifMatch) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowCreator.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowCreator.java index 11c512998c..bc661c0c4f 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowCreator.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowCreator.java @@ -101,11 +101,10 @@ public WorkflowCreator setTaskReservationTimeout( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowDeleter.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowDeleter.java index f3151748d2..3cb6a0bd92 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowDeleter.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowDeleter.java @@ -44,11 +44,10 @@ public WorkflowDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowFetcher.java index 9fd90bdeb0..c67e47940d 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowFetcher.java @@ -43,11 +43,10 @@ public WorkflowFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowReader.java index f836b4985b..3a9c68f7bb 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowReader.java @@ -79,11 +79,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowUpdater.java index 3f127099eb..247e890008 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkflowUpdater.java @@ -106,11 +106,10 @@ public WorkflowUpdater setReEvaluateTasks(final String reEvaluateTasks) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatisticsFetcher.java index 55c3cb2ed0..e75b74f593 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceCumulativeStatisticsFetcher.java @@ -31,7 +31,8 @@ import java.time.ZonedDateTime; public class WorkspaceCumulativeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private ZonedDateTime endDate; @@ -82,11 +83,10 @@ public WorkspaceCumulativeStatisticsFetcher setSplitByWaitTime( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, 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..c3dfbb19e3 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 @@ -140,9 +140,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private WorkspaceRealTimeStatistics( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("activity_statistics") final List< - Object - > activityStatistics, + @JsonProperty( + "activity_statistics" + ) final List activityStatistics, @JsonProperty( "longest_task_waiting_age" ) final Integer longestTaskWaitingAge, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatisticsFetcher.java index de65a71645..bd61585c14 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceRealTimeStatisticsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class WorkspaceRealTimeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String taskChannel; @@ -49,11 +50,10 @@ public WorkspaceRealTimeStatisticsFetcher setTaskChannel( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatisticsFetcher.java index e75c180282..24bc5cc753 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/WorkspaceStatisticsFetcher.java @@ -75,11 +75,10 @@ public WorkspaceStatisticsFetcher setSplitByWaitTime( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationFetcher.java index 7fe8c9c573..dff081b31b 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationFetcher.java @@ -47,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "TaskSid" + "}", this.pathTaskSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationReader.java index b5abf72356..bcece8f2e7 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationReader.java @@ -93,11 +93,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "TaskSid" + "}", this.pathTaskSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationUpdater.java index 91f097b8d7..fe11019fb9 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/task/ReservationUpdater.java @@ -513,11 +513,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); path = path.replace("{" + "TaskSid" + "}", this.pathTaskSid.toString()); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); 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..ca8e7128de 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 @@ -30,7 +30,8 @@ import java.io.InputStream; public class TaskQueueBulkRealTimeStatisticsCreator - extends Creator { + extends Creator +{ private String pathWorkspaceSid; private Object body; @@ -50,11 +51,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatisticsFetcher.java index c08af3eae1..c8b72e6ad9 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueCumulativeStatisticsFetcher.java @@ -31,7 +31,8 @@ import java.time.ZonedDateTime; public class TaskQueueCumulativeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String pathTaskQueueSid; @@ -88,16 +89,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "TaskQueueSid" + "}", - this.pathTaskQueueSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "TaskQueueSid" + "}", + this.pathTaskQueueSid.toString() + ); Request request = new Request( HttpMethod.GET, 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..5c974573f3 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 @@ -156,9 +156,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private TaskQueueRealTimeStatistics( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("activity_statistics") final List< - Object - > activityStatistics, + @JsonProperty( + "activity_statistics" + ) final List activityStatistics, @JsonProperty( "longest_relative_task_age_in_queue" ) final Integer longestRelativeTaskAgeInQueue, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatisticsFetcher.java index 2078f08f4e..270e846596 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueRealTimeStatisticsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class TaskQueueRealTimeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String pathTaskQueueSid; @@ -55,16 +56,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "TaskQueueSid" + "}", - this.pathTaskQueueSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "TaskQueueSid" + "}", + this.pathTaskQueueSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatisticsFetcher.java index c89d2e01ea..76563cad72 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatisticsFetcher.java @@ -81,16 +81,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "TaskQueueSid" + "}", - this.pathTaskQueueSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "TaskQueueSid" + "}", + this.pathTaskQueueSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatisticsReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatisticsReader.java index 2f66b5a2a4..17656aa39b 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatisticsReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueuesStatisticsReader.java @@ -116,11 +116,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationFetcher.java index 4369909d09..9e347b47f1 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationReader.java index 7d6141c651..436ba65281 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationReader.java @@ -87,16 +87,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationUpdater.java index 4fa5f1510b..3e4c2803b5 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/ReservationUpdater.java @@ -499,16 +499,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelFetcher.java index 22624736c8..01da0c91f5 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelReader.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelReader.java index 3b2515dbe8..25880d91c2 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelReader.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelReader.java @@ -79,16 +79,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelUpdater.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelUpdater.java index 0889a1bf11..a0ffe903af 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelUpdater.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerChannelUpdater.java @@ -62,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatisticsFetcher.java index f07eb08710..f8f57030f0 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkerStatisticsFetcher.java @@ -71,16 +71,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkerSid" + "}", - this.pathWorkerSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkerSid" + "}", + this.pathWorkerSid.toString() + ); Request request = new Request( HttpMethod.GET, 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 2f0d89e2fe..c3845ad316 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 @@ -151,9 +151,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private WorkersCumulativeStatistics( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("activity_durations") final List< - Object - > activityDurations, + @JsonProperty( + "activity_durations" + ) final List activityDurations, @JsonProperty("end_time") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatisticsFetcher.java index 2c976768aa..eb5b8d6911 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersCumulativeStatisticsFetcher.java @@ -31,7 +31,8 @@ import java.time.ZonedDateTime; public class WorkersCumulativeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private ZonedDateTime endDate; @@ -75,11 +76,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, 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..17411c6836 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 @@ -125,9 +125,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @JsonCreator private WorkersRealTimeStatistics( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("activity_statistics") final List< - Object - > activityStatistics, + @JsonProperty( + "activity_statistics" + ) final List activityStatistics, @JsonProperty("total_workers") final Integer totalWorkers, @JsonProperty("url") final URI url, @JsonProperty("workspace_sid") final String workspaceSid diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatisticsFetcher.java index b44a872a73..2c7c5fda03 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersRealTimeStatisticsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class WorkersRealTimeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String taskChannel; @@ -50,11 +51,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatisticsFetcher.java index 97446fc77e..189d2f8535 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/worker/WorkersStatisticsFetcher.java @@ -87,11 +87,10 @@ public WorkersStatisticsFetcher setTaskChannel(final String taskChannel) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatisticsFetcher.java index 22c0612c8c..eaae46e46c 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowCumulativeStatisticsFetcher.java @@ -31,7 +31,8 @@ import java.time.ZonedDateTime; public class WorkflowCumulativeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String pathWorkflowSid; @@ -88,16 +89,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkflowSid" + "}", - this.pathWorkflowSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkflowSid" + "}", + this.pathWorkflowSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatisticsFetcher.java index 85a0ed6409..43451802ae 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowRealTimeStatisticsFetcher.java @@ -30,7 +30,8 @@ import java.io.InputStream; public class WorkflowRealTimeStatisticsFetcher - extends Fetcher { + extends Fetcher +{ private String pathWorkspaceSid; private String pathWorkflowSid; @@ -55,16 +56,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkflowSid" + "}", - this.pathWorkflowSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkflowSid" + "}", + this.pathWorkflowSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatisticsFetcher.java b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatisticsFetcher.java index ae69ec45b4..ef1e90b1cb 100644 --- a/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatisticsFetcher.java +++ b/src/main/java/com/twilio/rest/taskrouter/v1/workspace/workflow/WorkflowStatisticsFetcher.java @@ -81,16 +81,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics"; - path = - path.replace( - "{" + "WorkspaceSid" + "}", - this.pathWorkspaceSid.toString() - ); - path = - path.replace( - "{" + "WorkflowSid" + "}", - this.pathWorkflowSid.toString() - ); + path = path.replace( + "{" + "WorkspaceSid" + "}", + this.pathWorkspaceSid.toString() + ); + path = path.replace( + "{" + "WorkflowSid" + "}", + this.pathWorkflowSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListCreator.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListCreator.java index d948e4eae1..52472e3eec 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListCreator.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListCreator.java @@ -53,8 +53,10 @@ public CredentialListCreator setCredentialListSid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/CredentialLists"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListDeleter.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListDeleter.java index a8248c285e..f9c5a66e3b 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListDeleter.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListDeleter.java @@ -44,8 +44,10 @@ public CredentialListDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListFetcher.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListFetcher.java index 366a8f77ca..7c4bf7da9b 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListFetcher.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListFetcher.java @@ -43,8 +43,10 @@ public CredentialListFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListReader.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListReader.java index 5ee4a4c7dd..7824a64519 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListReader.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/CredentialListReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/CredentialLists"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListCreator.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListCreator.java index 68226c06a3..97173b1b28 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListCreator.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListCreator.java @@ -53,8 +53,10 @@ public IpAccessControlListCreator setIpAccessControlListSid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/IpAccessControlLists"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListDeleter.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListDeleter.java index 6e80c5c3e4..36b4919386 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListDeleter.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListDeleter.java @@ -44,8 +44,10 @@ public IpAccessControlListDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListFetcher.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListFetcher.java index da86055d60..d02455f289 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListFetcher.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListFetcher.java @@ -43,8 +43,10 @@ public IpAccessControlListFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListReader.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListReader.java index c2b5f827d6..a1c2e7ddcf 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListReader.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/IpAccessControlListReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/IpAccessControlLists"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlCreator.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlCreator.java index 52a76794c9..e8b9edf4a4 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlCreator.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlCreator.java @@ -89,8 +89,10 @@ public OriginationUrlCreator setSipUrl(final String sipUrl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/OriginationUrls"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlDeleter.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlDeleter.java index f6b2d43700..c1cbc1562c 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlDeleter.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlDeleter.java @@ -44,8 +44,10 @@ public OriginationUrlDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlFetcher.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlFetcher.java index 86bf185a8e..685b13d96c 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlFetcher.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlFetcher.java @@ -43,8 +43,10 @@ public OriginationUrlFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlReader.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlReader.java index 5e47c914a0..54c8160b08 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlReader.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/OriginationUrls"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlUpdater.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlUpdater.java index 6e73de849c..3e8ca699f0 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlUpdater.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/OriginationUrlUpdater.java @@ -82,8 +82,10 @@ public OriginationUrlUpdater setSipUrl(final String sipUrl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberCreator.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberCreator.java index c7ece0d9b1..ca099c3e30 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberCreator.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberCreator.java @@ -51,8 +51,10 @@ public PhoneNumberCreator setPhoneNumberSid(final String phoneNumberSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/PhoneNumbers"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberDeleter.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberDeleter.java index 82ed5c4da4..006bccfd52 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberDeleter.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberDeleter.java @@ -41,8 +41,10 @@ public PhoneNumberDeleter(final String pathTrunkSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberFetcher.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberFetcher.java index 6b98e3e3e7..1069890cf9 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberFetcher.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberFetcher.java @@ -40,8 +40,10 @@ public PhoneNumberFetcher(final String pathTrunkSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java index af3f1ebf2c..892861a365 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/PhoneNumberReader.java @@ -73,8 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/PhoneNumbers"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingFetcher.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingFetcher.java index 6799a898a9..20ec3f0eca 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingFetcher.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingFetcher.java @@ -38,8 +38,10 @@ public RecordingFetcher(final String pathTrunkSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/Recording"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingUpdater.java b/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingUpdater.java index 2a694ff6a8..dfac9d6636 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingUpdater.java +++ b/src/main/java/com/twilio/rest/trunking/v1/trunk/RecordingUpdater.java @@ -53,8 +53,10 @@ public RecordingUpdater setTrim(final Recording.RecordingTrim trim) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/Trunks/{TrunkSid}/Recording"; - path = - path.replace("{" + "TrunkSid" + "}", this.pathTrunkSid.toString()); + path = path.replace( + "{" + "TrunkSid" + "}", + this.pathTrunkSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistration.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistration.java new file mode 100644 index 0000000000..847e7942fe --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistration.java @@ -0,0 +1,812 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.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 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; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class A2PBrandRegistration extends Resource { + + public static A2PBrandRegistrationCreator creator( + final A2PBrandRegistration.TrusthubV1A2pBrandRegistrationRequest trusthubV1A2pBrandRegistrationRequest + ) { + return new A2PBrandRegistrationCreator( + trusthubV1A2pBrandRegistrationRequest + ); + } + + public enum BrandType { + STANDARD("STANDARD"), + SOLE_PROPRIETOR("SOLE_PROPRIETOR"); + + private final String value; + + private BrandType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static BrandType forValue(final String value) { + return Promoter.enumFromString(value, BrandType.values()); + } + } + + @JsonDeserialize( + builder = TrusthubV1A2pBrandRegistrationRequest.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class TrusthubV1A2pBrandRegistrationRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("brandType") + @Getter + private final A2PBrandRegistration.BrandType brandType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("themeSetId") + @Getter + private final String themeSetId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendlyName") + @Getter + private final String friendlyName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("notificationEmail") + @Getter + private final String notificationEmail; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessName") + @Getter + private final String businessName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessRegistrationAuthority") + @Getter + private final String businessRegistrationAuthority; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessRegistrationNumber") + @Getter + private final String businessRegistrationNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessIndustry") + @Getter + private final String businessIndustry; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessWebsite") + @Getter + private final URI businessWebsite; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessType") + @Getter + private final String businessType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStockSymbol") + @Getter + private final String businessStockSymbol; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStockExchange") + @Getter + private final String businessStockExchange; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessTaxExemptStatus") + @Getter + private final String businessTaxExemptStatus; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("brandExternalVettingToken") + @Getter + private final String brandExternalVettingToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStreetAddress") + @Getter + private final String businessStreetAddress; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStreetAddress2") + @Getter + private final String businessStreetAddress2; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessCity") + @Getter + private final String businessCity; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStateProvinceRegion") + @Getter + private final String businessStateProvinceRegion; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessPostalCode") + @Getter + private final String businessPostalCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessCountry") + @Getter + private final String businessCountry; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactFirstName") + @Getter + private final String businessContactFirstName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactLastName") + @Getter + private final String businessContactLastName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactEmail") + @Getter + private final String businessContactEmail; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactPhone") + @Getter + private final com.twilio.type.PhoneNumber businessContactPhone; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("authorizedContactVerificationEmail") + @Getter + private final String authorizedContactVerificationEmail; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("authorizedContactMobilePhoneNumberE164") + @Getter + private final com.twilio.type.PhoneNumber authorizedContactMobilePhoneNumberE164; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("isTest") + @Getter + private final Boolean isTest; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("skipAutomaticSecVet") + @Getter + private final Boolean skipAutomaticSecVet; + + private TrusthubV1A2pBrandRegistrationRequest(Builder builder) { + this.brandType = builder.brandType; + this.themeSetId = builder.themeSetId; + this.friendlyName = builder.friendlyName; + this.notificationEmail = builder.notificationEmail; + this.businessName = builder.businessName; + this.businessRegistrationAuthority = + builder.businessRegistrationAuthority; + this.businessRegistrationNumber = + builder.businessRegistrationNumber; + this.businessIndustry = builder.businessIndustry; + this.businessWebsite = builder.businessWebsite; + this.businessType = builder.businessType; + this.businessStockSymbol = builder.businessStockSymbol; + this.businessStockExchange = builder.businessStockExchange; + this.businessTaxExemptStatus = builder.businessTaxExemptStatus; + this.brandExternalVettingToken = builder.brandExternalVettingToken; + this.businessStreetAddress = builder.businessStreetAddress; + this.businessStreetAddress2 = builder.businessStreetAddress2; + this.businessCity = builder.businessCity; + this.businessStateProvinceRegion = + builder.businessStateProvinceRegion; + this.businessPostalCode = builder.businessPostalCode; + this.businessCountry = builder.businessCountry; + this.businessContactFirstName = builder.businessContactFirstName; + this.businessContactLastName = builder.businessContactLastName; + this.businessContactEmail = builder.businessContactEmail; + this.businessContactPhone = builder.businessContactPhone; + this.authorizedContactVerificationEmail = + builder.authorizedContactVerificationEmail; + this.authorizedContactMobilePhoneNumberE164 = + builder.authorizedContactMobilePhoneNumberE164; + this.isTest = builder.isTest; + this.skipAutomaticSecVet = builder.skipAutomaticSecVet; + } + + public static Builder builder( + final A2PBrandRegistration.BrandType brandType, + final String notificationEmail + ) { + return new Builder(brandType, notificationEmail); + } + + public static TrusthubV1A2pBrandRegistrationRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + TrusthubV1A2pBrandRegistrationRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("brandType") + private A2PBrandRegistration.BrandType brandType; + + @JsonProperty("themeSetId") + private String themeSetId; + + @JsonProperty("friendlyName") + private String friendlyName; + + @JsonProperty("notificationEmail") + private String notificationEmail; + + @JsonProperty("businessName") + private String businessName; + + @JsonProperty("businessRegistrationAuthority") + private String businessRegistrationAuthority; + + @JsonProperty("businessRegistrationNumber") + private String businessRegistrationNumber; + + @JsonProperty("businessIndustry") + private String businessIndustry; + + @JsonProperty("businessWebsite") + private URI businessWebsite; + + @JsonProperty("businessType") + private String businessType; + + @JsonProperty("businessStockSymbol") + private String businessStockSymbol; + + @JsonProperty("businessStockExchange") + private String businessStockExchange; + + @JsonProperty("businessTaxExemptStatus") + private String businessTaxExemptStatus; + + @JsonProperty("brandExternalVettingToken") + private String brandExternalVettingToken; + + @JsonProperty("businessStreetAddress") + private String businessStreetAddress; + + @JsonProperty("businessStreetAddress2") + private String businessStreetAddress2; + + @JsonProperty("businessCity") + private String businessCity; + + @JsonProperty("businessStateProvinceRegion") + private String businessStateProvinceRegion; + + @JsonProperty("businessPostalCode") + private String businessPostalCode; + + @JsonProperty("businessCountry") + private String businessCountry; + + @JsonProperty("businessContactFirstName") + private String businessContactFirstName; + + @JsonProperty("businessContactLastName") + private String businessContactLastName; + + @JsonProperty("businessContactEmail") + private String businessContactEmail; + + @JsonProperty("businessContactPhone") + private com.twilio.type.PhoneNumber businessContactPhone; + + @JsonProperty("authorizedContactVerificationEmail") + private String authorizedContactVerificationEmail; + + @JsonProperty("authorizedContactMobilePhoneNumberE164") + private com.twilio.type.PhoneNumber authorizedContactMobilePhoneNumberE164; + + @JsonProperty("isTest") + private Boolean isTest; + + @JsonProperty("skipAutomaticSecVet") + private Boolean skipAutomaticSecVet; + + @JsonCreator + public Builder( + @JsonProperty( + "brandType" + ) final A2PBrandRegistration.BrandType brandType, + @JsonProperty( + "notificationEmail" + ) final String notificationEmail + ) { + this.brandType = brandType; + this.notificationEmail = notificationEmail; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("themeSetId") + public Builder themeSetId(String themeSetId) { + this.themeSetId = themeSetId; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("friendlyName") + public Builder friendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessName") + public Builder businessName(String businessName) { + this.businessName = businessName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessRegistrationAuthority") + public Builder businessRegistrationAuthority( + String businessRegistrationAuthority + ) { + this.businessRegistrationAuthority = + businessRegistrationAuthority; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessRegistrationNumber") + public Builder businessRegistrationNumber( + String businessRegistrationNumber + ) { + this.businessRegistrationNumber = businessRegistrationNumber; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessIndustry") + public Builder businessIndustry(String businessIndustry) { + this.businessIndustry = businessIndustry; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessWebsite") + public Builder businessWebsite(URI businessWebsite) { + this.businessWebsite = businessWebsite; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessType") + public Builder businessType(String businessType) { + this.businessType = businessType; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStockSymbol") + public Builder businessStockSymbol(String businessStockSymbol) { + this.businessStockSymbol = businessStockSymbol; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStockExchange") + public Builder businessStockExchange(String businessStockExchange) { + this.businessStockExchange = businessStockExchange; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessTaxExemptStatus") + public Builder businessTaxExemptStatus( + String businessTaxExemptStatus + ) { + this.businessTaxExemptStatus = businessTaxExemptStatus; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("brandExternalVettingToken") + public Builder brandExternalVettingToken( + String brandExternalVettingToken + ) { + this.brandExternalVettingToken = brandExternalVettingToken; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStreetAddress") + public Builder businessStreetAddress(String businessStreetAddress) { + this.businessStreetAddress = businessStreetAddress; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStreetAddress2") + public Builder businessStreetAddress2( + String businessStreetAddress2 + ) { + this.businessStreetAddress2 = businessStreetAddress2; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessCity") + public Builder businessCity(String businessCity) { + this.businessCity = businessCity; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessStateProvinceRegion") + public Builder businessStateProvinceRegion( + String businessStateProvinceRegion + ) { + this.businessStateProvinceRegion = businessStateProvinceRegion; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessPostalCode") + public Builder businessPostalCode(String businessPostalCode) { + this.businessPostalCode = businessPostalCode; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessCountry") + public Builder businessCountry(String businessCountry) { + this.businessCountry = businessCountry; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactFirstName") + public Builder businessContactFirstName( + String businessContactFirstName + ) { + this.businessContactFirstName = businessContactFirstName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactLastName") + public Builder businessContactLastName( + String businessContactLastName + ) { + this.businessContactLastName = businessContactLastName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactEmail") + public Builder businessContactEmail(String businessContactEmail) { + this.businessContactEmail = businessContactEmail; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("businessContactPhone") + public Builder businessContactPhone( + com.twilio.type.PhoneNumber businessContactPhone + ) { + this.businessContactPhone = businessContactPhone; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("authorizedContactVerificationEmail") + public Builder authorizedContactVerificationEmail( + String authorizedContactVerificationEmail + ) { + this.authorizedContactVerificationEmail = + authorizedContactVerificationEmail; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("authorizedContactMobilePhoneNumberE164") + public Builder authorizedContactMobilePhoneNumberE164( + com.twilio.type.PhoneNumber authorizedContactMobilePhoneNumberE164 + ) { + this.authorizedContactMobilePhoneNumberE164 = + authorizedContactMobilePhoneNumberE164; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("isTest") + public Builder isTest(Boolean isTest) { + this.isTest = isTest; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("skipAutomaticSecVet") + public Builder skipAutomaticSecVet(Boolean skipAutomaticSecVet) { + this.skipAutomaticSecVet = skipAutomaticSecVet; + return this; + } + + public TrusthubV1A2pBrandRegistrationRequest build() { + return new TrusthubV1A2pBrandRegistrationRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + TrusthubV1A2pBrandRegistrationRequest other = + (TrusthubV1A2pBrandRegistrationRequest) o; + return ( + Objects.equals(brandType, other.brandType) && + Objects.equals(themeSetId, other.themeSetId) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(notificationEmail, other.notificationEmail) && + Objects.equals(businessName, other.businessName) && + Objects.equals( + businessRegistrationAuthority, + other.businessRegistrationAuthority + ) && + Objects.equals( + businessRegistrationNumber, + other.businessRegistrationNumber + ) && + Objects.equals(businessIndustry, other.businessIndustry) && + Objects.equals(businessWebsite, other.businessWebsite) && + Objects.equals(businessType, other.businessType) && + Objects.equals( + businessStockSymbol, + other.businessStockSymbol + ) && + Objects.equals( + businessStockExchange, + other.businessStockExchange + ) && + Objects.equals( + businessTaxExemptStatus, + other.businessTaxExemptStatus + ) && + Objects.equals( + brandExternalVettingToken, + other.brandExternalVettingToken + ) && + Objects.equals( + businessStreetAddress, + other.businessStreetAddress + ) && + Objects.equals( + businessStreetAddress2, + other.businessStreetAddress2 + ) && + Objects.equals(businessCity, other.businessCity) && + Objects.equals( + businessStateProvinceRegion, + other.businessStateProvinceRegion + ) && + Objects.equals(businessPostalCode, other.businessPostalCode) && + Objects.equals(businessCountry, other.businessCountry) && + Objects.equals( + businessContactFirstName, + other.businessContactFirstName + ) && + Objects.equals( + businessContactLastName, + other.businessContactLastName + ) && + Objects.equals( + businessContactEmail, + other.businessContactEmail + ) && + Objects.equals( + businessContactPhone, + other.businessContactPhone + ) && + Objects.equals( + authorizedContactVerificationEmail, + other.authorizedContactVerificationEmail + ) && + Objects.equals( + authorizedContactMobilePhoneNumberE164, + other.authorizedContactMobilePhoneNumberE164 + ) && + Objects.equals(isTest, other.isTest) && + Objects.equals(skipAutomaticSecVet, other.skipAutomaticSecVet) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + brandType, + themeSetId, + friendlyName, + notificationEmail, + businessName, + businessRegistrationAuthority, + businessRegistrationNumber, + businessIndustry, + businessWebsite, + businessType, + businessStockSymbol, + businessStockExchange, + businessTaxExemptStatus, + brandExternalVettingToken, + businessStreetAddress, + businessStreetAddress2, + businessCity, + businessStateProvinceRegion, + businessPostalCode, + businessCountry, + businessContactFirstName, + businessContactLastName, + businessContactEmail, + businessContactPhone, + authorizedContactVerificationEmail, + authorizedContactMobilePhoneNumberE164, + isTest, + skipAutomaticSecVet + ); + } + } + + /** + * Converts a JSON String into a A2PBrandRegistration object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return A2PBrandRegistration object represented by the provided JSON + */ + public static A2PBrandRegistration fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, A2PBrandRegistration.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a A2PBrandRegistration object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return A2PBrandRegistration object represented by the provided JSON + */ + public static A2PBrandRegistration fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, A2PBrandRegistration.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String id; + + @Getter + private final String sessionId; + + @Getter + private final String sessionToken; + + @JsonCreator + private A2PBrandRegistration( + @JsonProperty("id") final String id, + @JsonProperty("sessionId") final String sessionId, + @JsonProperty("sessionToken") final String sessionToken + ) { + this.id = id; + this.sessionId = sessionId; + this.sessionToken = sessionToken; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + A2PBrandRegistration other = (A2PBrandRegistration) o; + return ( + Objects.equals(id, other.id) && + Objects.equals(sessionId, other.sessionId) && + Objects.equals(sessionToken, other.sessionToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(id, sessionId, sessionToken); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationCreator.java similarity index 66% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java rename to src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationCreator.java index 078d3ecc84..dcc54c6c84 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/FeedbackCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.trusthub.v1; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -29,36 +29,31 @@ import com.twilio.type.*; import java.io.InputStream; -public class FeedbackCreator extends Creator { +public class A2PBrandRegistrationCreator extends Creator { - private String pathId; - private Feedback.AssistantsV1ServiceCreateFeedbackRequest assistantsV1ServiceCreateFeedbackRequest; + private A2PBrandRegistration.TrusthubV1A2pBrandRegistrationRequest trusthubV1A2pBrandRegistrationRequest; - public FeedbackCreator( - final String pathId, - final Feedback.AssistantsV1ServiceCreateFeedbackRequest assistantsV1ServiceCreateFeedbackRequest + public A2PBrandRegistrationCreator( + final A2PBrandRegistration.TrusthubV1A2pBrandRegistrationRequest trusthubV1A2pBrandRegistrationRequest ) { - this.pathId = pathId; - this.assistantsV1ServiceCreateFeedbackRequest = - assistantsV1ServiceCreateFeedbackRequest; + this.trusthubV1A2pBrandRegistrationRequest = + trusthubV1A2pBrandRegistrationRequest; } - public FeedbackCreator setAssistantsV1ServiceCreateFeedbackRequest( - final Feedback.AssistantsV1ServiceCreateFeedbackRequest assistantsV1ServiceCreateFeedbackRequest + public A2PBrandRegistrationCreator setTrusthubV1A2pBrandRegistrationRequest( + final A2PBrandRegistration.TrusthubV1A2pBrandRegistrationRequest trusthubV1A2pBrandRegistrationRequest ) { - this.assistantsV1ServiceCreateFeedbackRequest = - assistantsV1ServiceCreateFeedbackRequest; + this.trusthubV1A2pBrandRegistrationRequest = + trusthubV1A2pBrandRegistrationRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}/Feedbacks"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); + String path = "/v1/A2PBrandRegistrations"; Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.TRUSTHUB.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -68,7 +63,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Feedback creation failed: Unable to connect to server" + "A2PBrandRegistration creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -88,20 +83,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Feedback create(final TwilioRestClient client) { + public A2PBrandRegistration create(final TwilioRestClient client) { Response response = makeRequest(client); - return Feedback.fromJson( + return A2PBrandRegistration.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Feedback content = Feedback.fromJson( + A2PBrandRegistration content = A2PBrandRegistration.fromJson( response.getStream(), client.getObjectMapper() ); @@ -114,10 +109,10 @@ public TwilioResponse createWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceCreateFeedbackRequest != null) { + if (trusthubV1A2pBrandRegistrationRequest != null) { request.setBody( - Feedback.toJson( - assistantsV1ServiceCreateFeedbackRequest, + A2PBrandRegistration.toJson( + trusthubV1A2pBrandRegistrationRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/Session.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSession.java similarity index 52% rename from src/main/java/com/twilio/rest/assistants/v1/Session.java rename to src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSession.java index 02715c8a89..ac23a2d1ab 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Session.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSession.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.trusthub.v1; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,8 +22,6 @@ import com.fasterxml.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.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; @@ -32,37 +30,37 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; -import java.time.ZonedDateTime; import java.util.Objects; import lombok.Getter; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class Session extends Resource { +public class A2PBrandRegistrationEmbeddedSession extends Resource { - public static SessionFetcher fetcher(final String pathId) { - return new SessionFetcher(pathId); - } - - public static SessionReader reader() { - return new SessionReader(); + public static A2PBrandRegistrationEmbeddedSessionCreator creator( + final String pathId + ) { + return new A2PBrandRegistrationEmbeddedSessionCreator(pathId); } /** - * Converts a JSON String into a Session object using the provided ObjectMapper. + * Converts a JSON String into a A2PBrandRegistrationEmbeddedSession object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return Session object represented by the provided JSON + * @return A2PBrandRegistrationEmbeddedSession object represented by the provided JSON */ - public static Session fromJson( + public static A2PBrandRegistrationEmbeddedSession fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Session.class); + return objectMapper.readValue( + json, + A2PBrandRegistrationEmbeddedSession.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -71,20 +69,23 @@ public static Session fromJson( } /** - * Converts a JSON InputStream into a Session object using the provided + * Converts a JSON InputStream into a A2PBrandRegistrationEmbeddedSession object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return Session object represented by the provided JSON + * @return A2PBrandRegistrationEmbeddedSession object represented by the provided JSON */ - public static Session fromJson( + public static A2PBrandRegistrationEmbeddedSession fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Session.class); + return objectMapper.readValue( + json, + A2PBrandRegistrationEmbeddedSession.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -104,54 +105,24 @@ public static String toJson(Object object, ObjectMapper mapper) { } } - @Getter - private final String accountSid; - - @Getter - private final String assistantId; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateCreated; - - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @Getter - private final ZonedDateTime dateUpdated; - @Getter private final String id; @Getter - private final String identity; + private final String sessionId; @Getter - private final Boolean verified; + private final String sessionToken; @JsonCreator - private Session( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("assistant_id") final String assistantId, - @JsonProperty("date_created") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateCreated, - @JsonProperty("date_updated") @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) @JsonSerialize( - using = com.twilio.converter.ISO8601Serializer.class - ) final ZonedDateTime dateUpdated, + private A2PBrandRegistrationEmbeddedSession( @JsonProperty("id") final String id, - @JsonProperty("identity") final String identity, - @JsonProperty("verified") final Boolean verified + @JsonProperty("sessionId") final String sessionId, + @JsonProperty("sessionToken") final String sessionToken ) { - this.accountSid = accountSid; - this.assistantId = assistantId; - this.dateCreated = dateCreated; - this.dateUpdated = dateUpdated; this.id = id; - this.identity = identity; - this.verified = verified; + this.sessionId = sessionId; + this.sessionToken = sessionToken; } @Override @@ -164,28 +135,17 @@ public boolean equals(final Object o) { return false; } - Session other = (Session) o; + A2PBrandRegistrationEmbeddedSession other = + (A2PBrandRegistrationEmbeddedSession) o; return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(assistantId, other.assistantId) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(id, other.id) && - Objects.equals(identity, other.identity) && - Objects.equals(verified, other.verified) + Objects.equals(sessionId, other.sessionId) && + Objects.equals(sessionToken, other.sessionToken) ); } @Override public int hashCode() { - return Objects.hash( - accountSid, - assistantId, - dateCreated, - dateUpdated, - id, - identity, - verified - ); + return Objects.hash(id, sessionId, sessionToken); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSessionCreator.java similarity index 69% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolCreator.java rename to src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSessionCreator.java index 3c5f38f203..17995dc95e 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PBrandRegistrationEmbeddedSessionCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.trusthub.v1; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; @@ -27,32 +27,24 @@ import com.twilio.type.*; import java.io.InputStream; -public class AssistantsToolCreator extends Creator { +public class A2PBrandRegistrationEmbeddedSessionCreator + extends Creator +{ - private String pathAssistantId; private String pathId; - public AssistantsToolCreator( - final String pathAssistantId, - final String pathId - ) { - this.pathAssistantId = pathAssistantId; + public A2PBrandRegistrationEmbeddedSessionCreator(final String pathId) { this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Tools/{id}"; + String path = "/v1/A2PBrandRegistrations/{Id}/EmbeddedSessions"; - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.TRUSTHUB.toString(), path ); @@ -60,7 +52,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "AssistantsTool creation failed: Unable to connect to server" + "A2PBrandRegistrationEmbeddedSession creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -80,23 +72,26 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public AssistantsTool create(final TwilioRestClient client) { + public A2PBrandRegistrationEmbeddedSession create( + final TwilioRestClient client + ) { Response response = makeRequest(client); - return AssistantsTool.fromJson( + return A2PBrandRegistrationEmbeddedSession.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - AssistantsTool content = AssistantsTool.fromJson( - response.getStream(), - client.getObjectMapper() - ); + A2PBrandRegistrationEmbeddedSession content = + A2PBrandRegistrationEmbeddedSession.fromJson( + response.getStream(), + client.getObjectMapper() + ); return new TwilioResponse<>( content, response.getStatusCode(), diff --git a/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistration.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistration.java new file mode 100644 index 0000000000..0ceccf8a32 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistration.java @@ -0,0 +1,693 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +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 com.twilio.base.Resource; +import com.twilio.exception.ApiConnectionException; +import com.twilio.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; +import java.util.Objects; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class A2PCampaignRegistration extends Resource { + + public static A2PCampaignRegistrationCreator creator( + final A2PCampaignRegistration.TrusthubV1A2pCampaignRegistrationRequest trusthubV1A2pCampaignRegistrationRequest + ) { + return new A2PCampaignRegistrationCreator( + trusthubV1A2pCampaignRegistrationRequest + ); + } + + @JsonDeserialize( + builder = TrusthubV1A2pCampaignRegistrationRequest.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class TrusthubV1A2pCampaignRegistrationRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("a2pBrandRegistrationSid") + @Getter + private final String a2pBrandRegistrationSid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("messagingServiceSid") + @Getter + private final String messagingServiceSid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("themeSetId") + @Getter + private final String themeSetId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseCategories") + @Getter + private final List useCaseCategories; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseDescription") + @Getter + private final String useCaseDescription; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage1") + @Getter + private final String useCaseSampleMessage1; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage2") + @Getter + private final String useCaseSampleMessage2; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage3") + @Getter + private final String useCaseSampleMessage3; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage4") + @Getter + private final String useCaseSampleMessage4; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage5") + @Getter + private final String useCaseSampleMessage5; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseOptInTypes") + @Getter + private final List useCaseOptInTypes; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseOptInDescription") + @Getter + private final String useCaseOptInDescription; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("hasEmbeddedLinks") + @Getter + private final Boolean hasEmbeddedLinks; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("hasEmbeddedPhone") + @Getter + private final Boolean hasEmbeddedPhone; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("embeddedUrlSample") + @Getter + private final URI embeddedUrlSample; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("directLending") + @Getter + private final Boolean directLending; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("ageGated") + @Getter + private final Boolean ageGated; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("privacyPolicyUrl") + @Getter + private final URI privacyPolicyUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("termsAndConditionsUrl") + @Getter + private final URI termsAndConditionsUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optInKeywords") + @Getter + private final List optInKeywords; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optInMessageSample") + @Getter + private final String optInMessageSample; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optOutKeywords") + @Getter + private final List optOutKeywords; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optOutMessageSample") + @Getter + private final String optOutMessageSample; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("helpKeywords") + @Getter + private final List helpKeywords; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("helpMessageSample") + @Getter + private final String helpMessageSample; + + private TrusthubV1A2pCampaignRegistrationRequest(Builder builder) { + this.a2pBrandRegistrationSid = builder.a2pBrandRegistrationSid; + this.messagingServiceSid = builder.messagingServiceSid; + this.themeSetId = builder.themeSetId; + this.useCaseCategories = builder.useCaseCategories; + this.useCaseDescription = builder.useCaseDescription; + this.useCaseSampleMessage1 = builder.useCaseSampleMessage1; + this.useCaseSampleMessage2 = builder.useCaseSampleMessage2; + this.useCaseSampleMessage3 = builder.useCaseSampleMessage3; + this.useCaseSampleMessage4 = builder.useCaseSampleMessage4; + this.useCaseSampleMessage5 = builder.useCaseSampleMessage5; + this.useCaseOptInTypes = builder.useCaseOptInTypes; + this.useCaseOptInDescription = builder.useCaseOptInDescription; + this.hasEmbeddedLinks = builder.hasEmbeddedLinks; + this.hasEmbeddedPhone = builder.hasEmbeddedPhone; + this.embeddedUrlSample = builder.embeddedUrlSample; + this.directLending = builder.directLending; + this.ageGated = builder.ageGated; + this.privacyPolicyUrl = builder.privacyPolicyUrl; + this.termsAndConditionsUrl = builder.termsAndConditionsUrl; + this.optInKeywords = builder.optInKeywords; + this.optInMessageSample = builder.optInMessageSample; + this.optOutKeywords = builder.optOutKeywords; + this.optOutMessageSample = builder.optOutMessageSample; + this.helpKeywords = builder.helpKeywords; + this.helpMessageSample = builder.helpMessageSample; + } + + public static Builder builder(final String a2pBrandRegistrationSid) { + return new Builder(a2pBrandRegistrationSid); + } + + public static TrusthubV1A2pCampaignRegistrationRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + TrusthubV1A2pCampaignRegistrationRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("a2pBrandRegistrationSid") + private String a2pBrandRegistrationSid; + + @JsonProperty("messagingServiceSid") + private String messagingServiceSid; + + @JsonProperty("themeSetId") + private String themeSetId; + + @JsonProperty("useCaseCategories") + private List useCaseCategories; + + @JsonProperty("useCaseDescription") + private String useCaseDescription; + + @JsonProperty("useCaseSampleMessage1") + private String useCaseSampleMessage1; + + @JsonProperty("useCaseSampleMessage2") + private String useCaseSampleMessage2; + + @JsonProperty("useCaseSampleMessage3") + private String useCaseSampleMessage3; + + @JsonProperty("useCaseSampleMessage4") + private String useCaseSampleMessage4; + + @JsonProperty("useCaseSampleMessage5") + private String useCaseSampleMessage5; + + @JsonProperty("useCaseOptInTypes") + private List useCaseOptInTypes; + + @JsonProperty("useCaseOptInDescription") + private String useCaseOptInDescription; + + @JsonProperty("hasEmbeddedLinks") + private Boolean hasEmbeddedLinks; + + @JsonProperty("hasEmbeddedPhone") + private Boolean hasEmbeddedPhone; + + @JsonProperty("embeddedUrlSample") + private URI embeddedUrlSample; + + @JsonProperty("directLending") + private Boolean directLending; + + @JsonProperty("ageGated") + private Boolean ageGated; + + @JsonProperty("privacyPolicyUrl") + private URI privacyPolicyUrl; + + @JsonProperty("termsAndConditionsUrl") + private URI termsAndConditionsUrl; + + @JsonProperty("optInKeywords") + private List optInKeywords; + + @JsonProperty("optInMessageSample") + private String optInMessageSample; + + @JsonProperty("optOutKeywords") + private List optOutKeywords; + + @JsonProperty("optOutMessageSample") + private String optOutMessageSample; + + @JsonProperty("helpKeywords") + private List helpKeywords; + + @JsonProperty("helpMessageSample") + private String helpMessageSample; + + @JsonCreator + public Builder( + @JsonProperty( + "a2pBrandRegistrationSid" + ) final String a2pBrandRegistrationSid + ) { + this.a2pBrandRegistrationSid = a2pBrandRegistrationSid; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("messagingServiceSid") + public Builder messagingServiceSid(String messagingServiceSid) { + this.messagingServiceSid = messagingServiceSid; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("themeSetId") + public Builder themeSetId(String themeSetId) { + this.themeSetId = themeSetId; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseCategories") + public Builder useCaseCategories(List useCaseCategories) { + this.useCaseCategories = useCaseCategories; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseDescription") + public Builder useCaseDescription(String useCaseDescription) { + this.useCaseDescription = useCaseDescription; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage1") + public Builder useCaseSampleMessage1(String useCaseSampleMessage1) { + this.useCaseSampleMessage1 = useCaseSampleMessage1; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage2") + public Builder useCaseSampleMessage2(String useCaseSampleMessage2) { + this.useCaseSampleMessage2 = useCaseSampleMessage2; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage3") + public Builder useCaseSampleMessage3(String useCaseSampleMessage3) { + this.useCaseSampleMessage3 = useCaseSampleMessage3; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage4") + public Builder useCaseSampleMessage4(String useCaseSampleMessage4) { + this.useCaseSampleMessage4 = useCaseSampleMessage4; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseSampleMessage5") + public Builder useCaseSampleMessage5(String useCaseSampleMessage5) { + this.useCaseSampleMessage5 = useCaseSampleMessage5; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseOptInTypes") + public Builder useCaseOptInTypes(List useCaseOptInTypes) { + this.useCaseOptInTypes = useCaseOptInTypes; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("useCaseOptInDescription") + public Builder useCaseOptInDescription( + String useCaseOptInDescription + ) { + this.useCaseOptInDescription = useCaseOptInDescription; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("hasEmbeddedLinks") + public Builder hasEmbeddedLinks(Boolean hasEmbeddedLinks) { + this.hasEmbeddedLinks = hasEmbeddedLinks; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("hasEmbeddedPhone") + public Builder hasEmbeddedPhone(Boolean hasEmbeddedPhone) { + this.hasEmbeddedPhone = hasEmbeddedPhone; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("embeddedUrlSample") + public Builder embeddedUrlSample(URI embeddedUrlSample) { + this.embeddedUrlSample = embeddedUrlSample; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("directLending") + public Builder directLending(Boolean directLending) { + this.directLending = directLending; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("ageGated") + public Builder ageGated(Boolean ageGated) { + this.ageGated = ageGated; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("privacyPolicyUrl") + public Builder privacyPolicyUrl(URI privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("termsAndConditionsUrl") + public Builder termsAndConditionsUrl(URI termsAndConditionsUrl) { + this.termsAndConditionsUrl = termsAndConditionsUrl; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optInKeywords") + public Builder optInKeywords(List optInKeywords) { + this.optInKeywords = optInKeywords; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optInMessageSample") + public Builder optInMessageSample(String optInMessageSample) { + this.optInMessageSample = optInMessageSample; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optOutKeywords") + public Builder optOutKeywords(List optOutKeywords) { + this.optOutKeywords = optOutKeywords; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("optOutMessageSample") + public Builder optOutMessageSample(String optOutMessageSample) { + this.optOutMessageSample = optOutMessageSample; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("helpKeywords") + public Builder helpKeywords(List helpKeywords) { + this.helpKeywords = helpKeywords; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("helpMessageSample") + public Builder helpMessageSample(String helpMessageSample) { + this.helpMessageSample = helpMessageSample; + return this; + } + + public TrusthubV1A2pCampaignRegistrationRequest build() { + return new TrusthubV1A2pCampaignRegistrationRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + TrusthubV1A2pCampaignRegistrationRequest other = + (TrusthubV1A2pCampaignRegistrationRequest) o; + return ( + Objects.equals( + a2pBrandRegistrationSid, + other.a2pBrandRegistrationSid + ) && + Objects.equals( + messagingServiceSid, + other.messagingServiceSid + ) && + Objects.equals(themeSetId, other.themeSetId) && + Objects.equals(useCaseCategories, other.useCaseCategories) && + Objects.equals(useCaseDescription, other.useCaseDescription) && + Objects.equals( + useCaseSampleMessage1, + other.useCaseSampleMessage1 + ) && + Objects.equals( + useCaseSampleMessage2, + other.useCaseSampleMessage2 + ) && + Objects.equals( + useCaseSampleMessage3, + other.useCaseSampleMessage3 + ) && + Objects.equals( + useCaseSampleMessage4, + other.useCaseSampleMessage4 + ) && + Objects.equals( + useCaseSampleMessage5, + other.useCaseSampleMessage5 + ) && + Objects.equals(useCaseOptInTypes, other.useCaseOptInTypes) && + Objects.equals( + useCaseOptInDescription, + other.useCaseOptInDescription + ) && + Objects.equals(hasEmbeddedLinks, other.hasEmbeddedLinks) && + Objects.equals(hasEmbeddedPhone, other.hasEmbeddedPhone) && + Objects.equals(embeddedUrlSample, other.embeddedUrlSample) && + Objects.equals(directLending, other.directLending) && + Objects.equals(ageGated, other.ageGated) && + Objects.equals(privacyPolicyUrl, other.privacyPolicyUrl) && + Objects.equals( + termsAndConditionsUrl, + other.termsAndConditionsUrl + ) && + Objects.equals(optInKeywords, other.optInKeywords) && + Objects.equals(optInMessageSample, other.optInMessageSample) && + Objects.equals(optOutKeywords, other.optOutKeywords) && + Objects.equals( + optOutMessageSample, + other.optOutMessageSample + ) && + Objects.equals(helpKeywords, other.helpKeywords) && + Objects.equals(helpMessageSample, other.helpMessageSample) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + a2pBrandRegistrationSid, + messagingServiceSid, + themeSetId, + useCaseCategories, + useCaseDescription, + useCaseSampleMessage1, + useCaseSampleMessage2, + useCaseSampleMessage3, + useCaseSampleMessage4, + useCaseSampleMessage5, + useCaseOptInTypes, + useCaseOptInDescription, + hasEmbeddedLinks, + hasEmbeddedPhone, + embeddedUrlSample, + directLending, + ageGated, + privacyPolicyUrl, + termsAndConditionsUrl, + optInKeywords, + optInMessageSample, + optOutKeywords, + optOutMessageSample, + helpKeywords, + helpMessageSample + ); + } + } + + /** + * Converts a JSON String into a A2PCampaignRegistration object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return A2PCampaignRegistration object represented by the provided JSON + */ + public static A2PCampaignRegistration fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, A2PCampaignRegistration.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a A2PCampaignRegistration object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return A2PCampaignRegistration object represented by the provided JSON + */ + public static A2PCampaignRegistration fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, A2PCampaignRegistration.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String id; + + @Getter + private final String sessionId; + + @Getter + private final String sessionToken; + + @JsonCreator + private A2PCampaignRegistration( + @JsonProperty("id") final String id, + @JsonProperty("sessionId") final String sessionId, + @JsonProperty("sessionToken") final String sessionToken + ) { + this.id = id; + this.sessionId = sessionId; + this.sessionToken = sessionToken; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + A2PCampaignRegistration other = (A2PCampaignRegistration) o; + return ( + Objects.equals(id, other.id) && + Objects.equals(sessionId, other.sessionId) && + Objects.equals(sessionToken, other.sessionToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(id, sessionId, sessionToken); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationCreator.java new file mode 100644 index 0000000000..7c025ee9af --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationCreator.java @@ -0,0 +1,123 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Creator; +import com.twilio.base.TwilioResponse; +import com.twilio.constant.EnumConstants; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class A2PCampaignRegistrationCreator + extends Creator +{ + + private A2PCampaignRegistration.TrusthubV1A2pCampaignRegistrationRequest trusthubV1A2pCampaignRegistrationRequest; + + public A2PCampaignRegistrationCreator( + final A2PCampaignRegistration.TrusthubV1A2pCampaignRegistrationRequest trusthubV1A2pCampaignRegistrationRequest + ) { + this.trusthubV1A2pCampaignRegistrationRequest = + trusthubV1A2pCampaignRegistrationRequest; + } + + public A2PCampaignRegistrationCreator setTrusthubV1A2pCampaignRegistrationRequest( + final A2PCampaignRegistration.TrusthubV1A2pCampaignRegistrationRequest trusthubV1A2pCampaignRegistrationRequest + ) { + this.trusthubV1A2pCampaignRegistrationRequest = + trusthubV1A2pCampaignRegistrationRequest; + return this; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v1/A2PCampaignRegistrations"; + + Request request = new Request( + HttpMethod.POST, + Domains.TRUSTHUB.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "A2PCampaignRegistration creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public A2PCampaignRegistration create(final TwilioRestClient client) { + Response response = makeRequest(client); + return A2PCampaignRegistration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + A2PCampaignRegistration content = A2PCampaignRegistration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } + + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (trusthubV1A2pCampaignRegistrationRequest != null) { + request.setBody( + A2PCampaignRegistration.toJson( + trusthubV1A2pCampaignRegistrationRequest, + objectMapper + ) + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSession.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSession.java new file mode 100644 index 0000000000..65227dfcc9 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSession.java @@ -0,0 +1,151 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.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 com.twilio.base.Resource; +import com.twilio.exception.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; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class A2PCampaignRegistrationEmbeddedSession extends Resource { + + public static A2PCampaignRegistrationEmbeddedSessionCreator creator( + final String pathId + ) { + return new A2PCampaignRegistrationEmbeddedSessionCreator(pathId); + } + + /** + * Converts a JSON String into a A2PCampaignRegistrationEmbeddedSession object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return A2PCampaignRegistrationEmbeddedSession object represented by the provided JSON + */ + public static A2PCampaignRegistrationEmbeddedSession fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + A2PCampaignRegistrationEmbeddedSession.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a A2PCampaignRegistrationEmbeddedSession object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return A2PCampaignRegistrationEmbeddedSession object represented by the provided JSON + */ + public static A2PCampaignRegistrationEmbeddedSession fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + A2PCampaignRegistrationEmbeddedSession.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String id; + + @Getter + private final String sessionId; + + @Getter + private final String sessionToken; + + @JsonCreator + private A2PCampaignRegistrationEmbeddedSession( + @JsonProperty("id") final String id, + @JsonProperty("sessionId") final String sessionId, + @JsonProperty("sessionToken") final String sessionToken + ) { + this.id = id; + this.sessionId = sessionId; + this.sessionToken = sessionToken; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + A2PCampaignRegistrationEmbeddedSession other = + (A2PCampaignRegistrationEmbeddedSession) o; + return ( + Objects.equals(id, other.id) && + Objects.equals(sessionId, other.sessionId) && + Objects.equals(sessionToken, other.sessionToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(id, sessionId, sessionToken); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSessionCreator.java similarity index 68% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeCreator.java rename to src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSessionCreator.java index af35918f94..09c35bc885 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/A2PCampaignRegistrationEmbeddedSessionCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.trusthub.v1; import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; @@ -27,32 +27,24 @@ import com.twilio.type.*; import java.io.InputStream; -public class AssistantsKnowledgeCreator extends Creator { +public class A2PCampaignRegistrationEmbeddedSessionCreator + extends Creator +{ - private String pathAssistantId; private String pathId; - public AssistantsKnowledgeCreator( - final String pathAssistantId, - final String pathId - ) { - this.pathAssistantId = pathAssistantId; + public A2PCampaignRegistrationEmbeddedSessionCreator(final String pathId) { this.pathId = pathId; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Knowledge/{id}"; + String path = "/v1/A2PCampaignRegistrations/{Id}/EmbeddedSessions"; - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Id" + "}", this.pathId.toString()); Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.TRUSTHUB.toString(), path ); @@ -60,7 +52,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "AssistantsKnowledge creation failed: Unable to connect to server" + "A2PCampaignRegistrationEmbeddedSession creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -80,23 +72,26 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public AssistantsKnowledge create(final TwilioRestClient client) { + public A2PCampaignRegistrationEmbeddedSession create( + final TwilioRestClient client + ) { Response response = makeRequest(client); - return AssistantsKnowledge.fromJson( + return A2PCampaignRegistrationEmbeddedSession.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - AssistantsKnowledge content = AssistantsKnowledge.fromJson( - response.getStream(), - client.getObjectMapper() - ); + A2PCampaignRegistrationEmbeddedSession content = + A2PCampaignRegistrationEmbeddedSession.fromJson( + response.getStream(), + client.getObjectMapper() + ); return new TwilioResponse<>( content, response.getStatusCode(), diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiriesUpdater.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiriesUpdater.java index a3128327f6..33a200ac0a 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiriesUpdater.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceInquiriesUpdater.java @@ -60,11 +60,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ComplianceInquiries/Customers/{CustomerId}/Initialize"; - path = - path.replace( - "{" + "CustomerId" + "}", - this.pathCustomerId.toString() - ); + path = path.replace( + "{" + "CustomerId" + "}", + this.pathCustomerId.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesCreator.java index 9c87a49c17..4f45e8bf9d 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class ComplianceRegistrationInquiriesCreator - extends Creator { + extends Creator +{ private ComplianceRegistrationInquiries.EndUserType endUserType; private ComplianceRegistrationInquiries.PhoneNumberType phoneNumberType; diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesUpdater.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesUpdater.java index b5efbb16ee..b8450b69b0 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesUpdater.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceRegistrationInquiriesUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class ComplianceRegistrationInquiriesUpdater - extends Updater { + extends Updater +{ private String pathRegistrationId; private Boolean isIsvEmbed; @@ -61,11 +62,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ComplianceInquiries/Registration/{RegistrationId}/RegulatoryCompliance/GB/Initialize"; - path = - path.replace( - "{" + "RegistrationId" + "}", - this.pathRegistrationId.toString() - ); + path = path.replace( + "{" + "RegistrationId" + "}", + this.pathRegistrationId.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java index 3d97678744..ecb0f2cde7 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java @@ -33,7 +33,8 @@ import java.util.List; public class ComplianceTollfreeInquiriesCreator - extends Creator { + extends Creator +{ private com.twilio.type.PhoneNumber tollfreePhoneNumber; private String notificationEmail; diff --git a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopy.java similarity index 57% rename from src/main/java/com/twilio/rest/assistants/v1/session/Message.java rename to src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopy.java index fa0c1c4beb..b677e3429d 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/session/Message.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopy.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.session; +package com.twilio.rest.trusthub.v1; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -32,6 +32,7 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; +import java.net.URI; import java.time.ZonedDateTime; import java.util.Objects; import lombok.Getter; @@ -39,26 +40,41 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class Message extends Resource { +public class CustomerProfilesProvisionalCopy extends Resource { - public static MessageReader reader(final String pathSessionId) { - return new MessageReader(pathSessionId); + public static CustomerProfilesProvisionalCopyCreator creator( + final String pathCustomerProfileSid + ) { + return new CustomerProfilesProvisionalCopyCreator( + pathCustomerProfileSid + ); + } + + public static CustomerProfilesProvisionalCopyFetcher fetcher( + final String pathCustomerProfileSid + ) { + return new CustomerProfilesProvisionalCopyFetcher( + pathCustomerProfileSid + ); } /** - * Converts a JSON String into a Message object using the provided ObjectMapper. + * Converts a JSON String into a CustomerProfilesProvisionalCopy object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return Message object represented by the provided JSON + * @return CustomerProfilesProvisionalCopy object represented by the provided JSON */ - public static Message fromJson( + public static CustomerProfilesProvisionalCopy fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Message.class); + return objectMapper.readValue( + json, + CustomerProfilesProvisionalCopy.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -67,20 +83,23 @@ public static Message fromJson( } /** - * Converts a JSON InputStream into a Message object using the provided + * Converts a JSON InputStream into a CustomerProfilesProvisionalCopy object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return Message object represented by the provided JSON + * @return CustomerProfilesProvisionalCopy object represented by the provided JSON */ - public static Message fromJson( + public static CustomerProfilesProvisionalCopy fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Message.class); + return objectMapper.readValue( + json, + CustomerProfilesProvisionalCopy.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -104,10 +123,7 @@ public static String toJson(Object object, ObjectMapper mapper) { private final String accountSid; @Getter - private final String assistantId; - - @Getter - private final Object content; + private final String customerProfileSid; @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter @@ -118,25 +134,31 @@ public static String toJson(Object object, ObjectMapper mapper) { private final ZonedDateTime dateUpdated; @Getter - private final String id; + private final String email; @Getter - private final String identity; + private final String friendlyName; @Getter - private final Object meta; + private final String policySid; @Getter - private final String role; + private final String status; @Getter - private final String sessionId; + private final URI statusCallback; + + @Getter + private final URI url; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime validUntil; @JsonCreator - private Message( + private CustomerProfilesProvisionalCopy( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("assistant_id") final String assistantId, - @JsonProperty("content") final Object content, + @JsonProperty("customer_profile_sid") final String customerProfileSid, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( @@ -147,22 +169,29 @@ private Message( ) @JsonSerialize( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, - @JsonProperty("id") final String id, - @JsonProperty("identity") final String identity, - @JsonProperty("meta") final Object meta, - @JsonProperty("role") final String role, - @JsonProperty("session_id") final String sessionId + @JsonProperty("email") final String email, + @JsonProperty("friendly_name") final String friendlyName, + @JsonProperty("policy_sid") final String policySid, + @JsonProperty("status") final String status, + @JsonProperty("status_callback") final URI statusCallback, + @JsonProperty("url") final URI url, + @JsonProperty("valid_until") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime validUntil ) { this.accountSid = accountSid; - this.assistantId = assistantId; - this.content = content; + this.customerProfileSid = customerProfileSid; this.dateCreated = dateCreated; this.dateUpdated = dateUpdated; - this.id = id; - this.identity = identity; - this.meta = meta; - this.role = role; - this.sessionId = sessionId; + this.email = email; + this.friendlyName = friendlyName; + this.policySid = policySid; + this.status = status; + this.statusCallback = statusCallback; + this.url = url; + this.validUntil = validUntil; } @Override @@ -175,18 +204,20 @@ public boolean equals(final Object o) { return false; } - Message other = (Message) o; + CustomerProfilesProvisionalCopy other = + (CustomerProfilesProvisionalCopy) o; return ( Objects.equals(accountSid, other.accountSid) && - Objects.equals(assistantId, other.assistantId) && - Objects.equals(content, other.content) && + Objects.equals(customerProfileSid, other.customerProfileSid) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(id, other.id) && - Objects.equals(identity, other.identity) && - Objects.equals(meta, other.meta) && - Objects.equals(role, other.role) && - Objects.equals(sessionId, other.sessionId) + Objects.equals(email, other.email) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(policySid, other.policySid) && + Objects.equals(status, other.status) && + Objects.equals(statusCallback, other.statusCallback) && + Objects.equals(url, other.url) && + Objects.equals(validUntil, other.validUntil) ); } @@ -194,15 +225,16 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, - assistantId, - content, + customerProfileSid, dateCreated, dateUpdated, - id, - identity, - meta, - role, - sessionId + email, + friendlyName, + policySid, + status, + statusCallback, + url, + validUntil ); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyCreator.java new file mode 100644 index 0000000000..f58096902c --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyCreator.java @@ -0,0 +1,107 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Creator; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class CustomerProfilesProvisionalCopyCreator + extends Creator +{ + + private String pathCustomerProfileSid; + + public CustomerProfilesProvisionalCopyCreator( + final String pathCustomerProfileSid + ) { + this.pathCustomerProfileSid = pathCustomerProfileSid; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = + "/v1/CustomerProfiles/{CustomerProfileSid}/ProvisionalCopy"; + + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); + + Request request = new Request( + HttpMethod.POST, + Domains.TRUSTHUB.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "CustomerProfilesProvisionalCopy creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public CustomerProfilesProvisionalCopy create( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + return CustomerProfilesProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + CustomerProfilesProvisionalCopy content = + CustomerProfilesProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyFetcher.java new file mode 100644 index 0000000000..82ef924078 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/CustomerProfilesProvisionalCopyFetcher.java @@ -0,0 +1,107 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class CustomerProfilesProvisionalCopyFetcher + extends Fetcher +{ + + private String pathCustomerProfileSid; + + public CustomerProfilesProvisionalCopyFetcher( + final String pathCustomerProfileSid + ) { + this.pathCustomerProfileSid = pathCustomerProfileSid; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = + "/v1/CustomerProfiles/{CustomerProfileSid}/ProvisionalCopy"; + + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.TRUSTHUB.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "CustomerProfilesProvisionalCopy fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public CustomerProfilesProvisionalCopy fetch( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + return CustomerProfilesProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + CustomerProfilesProvisionalCopy content = + CustomerProfilesProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeFetcher.java index 1a490d9cbe..5ecad02c77 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class SupportingDocumentTypeFetcher - extends Fetcher { + extends Fetcher +{ private String pathSid; diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeReader.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeReader.java index ad3729bbda..e897a06c22 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentTypeReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class SupportingDocumentTypeReader - extends Reader { + extends Reader +{ private Long pageSize; diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopy.java similarity index 61% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java rename to src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopy.java index ba023781d7..c92d6b7796 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsKnowledge.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopy.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants + * Twilio - Trusthub * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.trusthub.v1; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -32,6 +32,7 @@ import java.io.IOException; import java.io.IOException; import java.io.InputStream; +import java.net.URI; import java.time.ZonedDateTime; import java.util.Objects; import lombok.Getter; @@ -39,42 +40,37 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class AssistantsKnowledge extends Resource { +public class TrustProductsProvisionalCopy extends Resource { - public static AssistantsKnowledgeCreator creator( - final String pathAssistantId, - final String pathId + public static TrustProductsProvisionalCopyCreator creator( + final String pathTrustProductSid ) { - return new AssistantsKnowledgeCreator(pathAssistantId, pathId); + return new TrustProductsProvisionalCopyCreator(pathTrustProductSid); } - public static AssistantsKnowledgeDeleter deleter( - final String pathAssistantId, - final String pathId + public static TrustProductsProvisionalCopyFetcher fetcher( + final String pathTrustProductSid ) { - return new AssistantsKnowledgeDeleter(pathAssistantId, pathId); - } - - public static AssistantsKnowledgeReader reader( - final String pathAssistantId - ) { - return new AssistantsKnowledgeReader(pathAssistantId); + return new TrustProductsProvisionalCopyFetcher(pathTrustProductSid); } /** - * Converts a JSON String into a AssistantsKnowledge object using the provided ObjectMapper. + * Converts a JSON String into a TrustProductsProvisionalCopy object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return AssistantsKnowledge object represented by the provided JSON + * @return TrustProductsProvisionalCopy object represented by the provided JSON */ - public static AssistantsKnowledge fromJson( + public static TrustProductsProvisionalCopy fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AssistantsKnowledge.class); + return objectMapper.readValue( + json, + TrustProductsProvisionalCopy.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -83,20 +79,23 @@ public static AssistantsKnowledge fromJson( } /** - * Converts a JSON InputStream into a AssistantsKnowledge object using the provided + * Converts a JSON InputStream into a TrustProductsProvisionalCopy object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return AssistantsKnowledge object represented by the provided JSON + * @return TrustProductsProvisionalCopy object represented by the provided JSON */ - public static AssistantsKnowledge fromJson( + public static TrustProductsProvisionalCopy fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AssistantsKnowledge.class); + return objectMapper.readValue( + json, + TrustProductsProvisionalCopy.class + ); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -128,31 +127,32 @@ public static String toJson(Object object, ObjectMapper mapper) { private final ZonedDateTime dateUpdated; @Getter - private final String description; + private final String email; @Getter - private final String embeddingModel; + private final String friendlyName; @Getter - private final String id; + private final String policySid; @Getter - private final Object knowledgeSourceDetails; + private final String status; @Getter - private final String name; + private final URI statusCallback; @Getter - private final String status; + private final String trustProductSid; @Getter - private final String type; + private final URI url; + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter - private final String url; + private final ZonedDateTime validUntil; @JsonCreator - private AssistantsKnowledge( + private TrustProductsProvisionalCopy( @JsonProperty("account_sid") final String accountSid, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class @@ -164,28 +164,30 @@ private AssistantsKnowledge( ) @JsonSerialize( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, - @JsonProperty("description") final String description, - @JsonProperty("embedding_model") final String embeddingModel, - @JsonProperty("id") final String id, - @JsonProperty( - "knowledge_source_details" - ) final Object knowledgeSourceDetails, - @JsonProperty("name") final String name, + @JsonProperty("email") final String email, + @JsonProperty("friendly_name") final String friendlyName, + @JsonProperty("policy_sid") final String policySid, @JsonProperty("status") final String status, - @JsonProperty("type") final String type, - @JsonProperty("url") final String url + @JsonProperty("status_callback") final URI statusCallback, + @JsonProperty("trust_product_sid") final String trustProductSid, + @JsonProperty("url") final URI url, + @JsonProperty("valid_until") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime validUntil ) { this.accountSid = accountSid; this.dateCreated = dateCreated; this.dateUpdated = dateUpdated; - this.description = description; - this.embeddingModel = embeddingModel; - this.id = id; - this.knowledgeSourceDetails = knowledgeSourceDetails; - this.name = name; + this.email = email; + this.friendlyName = friendlyName; + this.policySid = policySid; this.status = status; - this.type = type; + this.statusCallback = statusCallback; + this.trustProductSid = trustProductSid; this.url = url; + this.validUntil = validUntil; } @Override @@ -198,22 +200,19 @@ public boolean equals(final Object o) { return false; } - AssistantsKnowledge other = (AssistantsKnowledge) o; + TrustProductsProvisionalCopy other = (TrustProductsProvisionalCopy) o; return ( Objects.equals(accountSid, other.accountSid) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(description, other.description) && - Objects.equals(embeddingModel, other.embeddingModel) && - Objects.equals(id, other.id) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && + Objects.equals(email, other.email) && + Objects.equals(friendlyName, other.friendlyName) && + Objects.equals(policySid, other.policySid) && Objects.equals(status, other.status) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) + Objects.equals(statusCallback, other.statusCallback) && + Objects.equals(trustProductSid, other.trustProductSid) && + Objects.equals(url, other.url) && + Objects.equals(validUntil, other.validUntil) ); } @@ -223,14 +222,14 @@ public int hashCode() { accountSid, dateCreated, dateUpdated, - description, - embeddingModel, - id, - knowledgeSourceDetails, - name, + email, + friendlyName, + policySid, status, - type, - url + statusCallback, + trustProductSid, + url, + validUntil ); } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyCreator.java new file mode 100644 index 0000000000..948d791042 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyCreator.java @@ -0,0 +1,104 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Creator; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class TrustProductsProvisionalCopyCreator + extends Creator +{ + + private String pathTrustProductSid; + + public TrustProductsProvisionalCopyCreator( + final String pathTrustProductSid + ) { + this.pathTrustProductSid = pathTrustProductSid; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v1/TrustProducts/{TrustProductSid}/ProvisionalCopy"; + + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); + + Request request = new Request( + HttpMethod.POST, + Domains.TRUSTHUB.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "TrustProductsProvisionalCopy creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public TrustProductsProvisionalCopy create(final TwilioRestClient client) { + Response response = makeRequest(client); + return TrustProductsProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + TrustProductsProvisionalCopy content = + TrustProductsProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyFetcher.java new file mode 100644 index 0000000000..719a1a6ada --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/TrustProductsProvisionalCopyFetcher.java @@ -0,0 +1,104 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class TrustProductsProvisionalCopyFetcher + extends Fetcher +{ + + private String pathTrustProductSid; + + public TrustProductsProvisionalCopyFetcher( + final String pathTrustProductSid + ) { + this.pathTrustProductSid = pathTrustProductSid; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v1/TrustProducts/{TrustProductSid}/ProvisionalCopy"; + + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.TRUSTHUB.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "TrustProductsProvisionalCopy fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public TrustProductsProvisionalCopy fetch(final TwilioRestClient client) { + Response response = makeRequest(client); + return TrustProductsProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + TrustProductsProvisionalCopy content = + TrustProductsProvisionalCopy.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentCreator.java index 0190e2cb20..116e3fbcd2 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class CustomerProfilesChannelEndpointAssignmentCreator - extends Creator { + extends Creator +{ private String pathCustomerProfileSid; private String channelEndpointType; @@ -65,11 +66,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -114,9 +114,9 @@ public CustomerProfilesChannelEndpointAssignment create( } @Override - public TwilioResponse< - CustomerProfilesChannelEndpointAssignment - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); CustomerProfilesChannelEndpointAssignment content = CustomerProfilesChannelEndpointAssignment.fromJson( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentDeleter.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentDeleter.java index 175cc67cf4..9edcafa751 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentDeleter.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class CustomerProfilesChannelEndpointAssignmentDeleter - extends Deleter { + extends Deleter +{ private String pathCustomerProfileSid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentFetcher.java index 85c177327b..b73bfdcace 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class CustomerProfilesChannelEndpointAssignmentFetcher - extends Fetcher { + extends Fetcher +{ private String pathCustomerProfileSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( @@ -93,9 +93,9 @@ public CustomerProfilesChannelEndpointAssignment fetch( } @Override - public TwilioResponse< - CustomerProfilesChannelEndpointAssignment - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); CustomerProfilesChannelEndpointAssignment content = CustomerProfilesChannelEndpointAssignment.fromJson( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentReader.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentReader.java index e6480cd743..dba75def64 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesChannelEndpointAssignmentReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class CustomerProfilesChannelEndpointAssignmentReader - extends Reader { + extends Reader +{ private String pathCustomerProfileSid; private String channelEndpointSid; @@ -68,9 +69,9 @@ public CustomerProfilesChannelEndpointAssignmentReader setPageSize( return this; } - public ResourceSetResponse< - CustomerProfilesChannelEndpointAssignment - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -92,11 +93,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsCreator.java index 71212eee8e..d1d67d912a 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class CustomerProfilesEntityAssignmentsCreator - extends Creator { + extends Creator +{ private String pathCustomerProfileSid; private String objectSid; @@ -55,11 +56,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsDeleter.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsDeleter.java index 8ec3715126..d8e4f734e7 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsDeleter.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class CustomerProfilesEntityAssignmentsDeleter - extends Deleter { + extends Deleter +{ private String pathCustomerProfileSid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsFetcher.java index 995484806e..d6d706ff2c 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class CustomerProfilesEntityAssignmentsFetcher - extends Fetcher { + extends Fetcher +{ private String pathCustomerProfileSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsReader.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsReader.java index 63ad179675..f0ba89b230 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEntityAssignmentsReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class CustomerProfilesEntityAssignmentsReader - extends Reader { + extends Reader +{ private String pathCustomerProfileSid; private String objectType; @@ -60,9 +61,9 @@ public CustomerProfilesEntityAssignmentsReader setPageSize( return this; } - public ResourceSetResponse< - CustomerProfilesEntityAssignments - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -84,11 +85,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsCreator.java index 6bbd72578d..bd6bd14ea3 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class CustomerProfilesEvaluationsCreator - extends Creator { + extends Creator +{ private String pathCustomerProfileSid; private String policySid; @@ -54,11 +55,10 @@ public CustomerProfilesEvaluationsCreator setPolicySid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsFetcher.java index b7addfb845..367a1d4700 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class CustomerProfilesEvaluationsFetcher - extends Fetcher { + extends Fetcher +{ private String pathCustomerProfileSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations/{Sid}"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsReader.java b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsReader.java index 507c6c27e7..1ea5e146ad 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/customerprofiles/CustomerProfilesEvaluationsReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class CustomerProfilesEvaluationsReader - extends Reader { + extends Reader +{ private String pathCustomerProfileSid; private Long pageSize; @@ -73,11 +74,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations"; - path = - path.replace( - "{" + "CustomerProfileSid" + "}", - this.pathCustomerProfileSid.toString() - ); + path = path.replace( + "{" + "CustomerProfileSid" + "}", + this.pathCustomerProfileSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentCreator.java index ba2476aa72..5f16f41c6a 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class TrustProductsChannelEndpointAssignmentCreator - extends Creator { + extends Creator +{ private String pathTrustProductSid; private String channelEndpointType; @@ -65,11 +66,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -114,9 +114,9 @@ public TrustProductsChannelEndpointAssignment create( } @Override - public TwilioResponse< - TrustProductsChannelEndpointAssignment - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); TrustProductsChannelEndpointAssignment content = TrustProductsChannelEndpointAssignment.fromJson( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentDeleter.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentDeleter.java index f2f9b21f53..d99a7cee28 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentDeleter.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class TrustProductsChannelEndpointAssignmentDeleter - extends Deleter { + extends Deleter +{ private String pathTrustProductSid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentFetcher.java index 413e813b95..dd87fb3129 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class TrustProductsChannelEndpointAssignmentFetcher - extends Fetcher { + extends Fetcher +{ private String pathTrustProductSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( @@ -93,9 +93,9 @@ public TrustProductsChannelEndpointAssignment fetch( } @Override - public TwilioResponse< - TrustProductsChannelEndpointAssignment - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); TrustProductsChannelEndpointAssignment content = TrustProductsChannelEndpointAssignment.fromJson( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentReader.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentReader.java index 65e3e0fc9d..723b66710c 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsChannelEndpointAssignmentReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class TrustProductsChannelEndpointAssignmentReader - extends Reader { + extends Reader +{ private String pathTrustProductSid; private String channelEndpointSid; @@ -68,9 +69,9 @@ public TrustProductsChannelEndpointAssignmentReader setPageSize( return this; } - public ResourceSetResponse< - TrustProductsChannelEndpointAssignment - > readWithResponse(final TwilioRestClient client) { + public ResourceSetResponse readWithResponse( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); Page page = Page.fromJson( @@ -92,11 +93,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsCreator.java index 6940e8ac29..4684a379e7 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class TrustProductsEntityAssignmentsCreator - extends Creator { + extends Creator +{ private String pathTrustProductSid; private String objectSid; @@ -54,11 +55,10 @@ public TrustProductsEntityAssignmentsCreator setObjectSid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/EntityAssignments"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsDeleter.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsDeleter.java index 0d884fbd5a..926df38aae 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsDeleter.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class TrustProductsEntityAssignmentsDeleter - extends Deleter { + extends Deleter +{ private String pathTrustProductSid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsFetcher.java index 541e982fca..5c36fba9bb 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class TrustProductsEntityAssignmentsFetcher - extends Fetcher { + extends Fetcher +{ private String pathTrustProductSid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsReader.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsReader.java index 825a679bd3..374d575e35 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEntityAssignmentsReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class TrustProductsEntityAssignmentsReader - extends Reader { + extends Reader +{ private String pathTrustProductSid; private String objectType; @@ -83,11 +84,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/EntityAssignments"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsCreator.java index 41f5024442..c5334a91d2 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class TrustProductsEvaluationsCreator - extends Creator { + extends Creator +{ private String pathTrustProductSid; private String policySid; @@ -54,11 +55,10 @@ public TrustProductsEvaluationsCreator setPolicySid( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/Evaluations"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsFetcher.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsFetcher.java index 4582cbeb25..973d725fab 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsFetcher.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class TrustProductsEvaluationsFetcher - extends Fetcher { + extends Fetcher +{ private String pathTrustProductSid; private String pathSid; @@ -44,11 +45,10 @@ public TrustProductsEvaluationsFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/Evaluations/{Sid}"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsReader.java b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsReader.java index ab3eb4d20b..50bc97636a 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsReader.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/trustproducts/TrustProductsEvaluationsReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class TrustProductsEvaluationsReader - extends Reader { + extends Reader +{ private String pathTrustProductSid; private Long pageSize; @@ -74,11 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/TrustProducts/{TrustProductSid}/Evaluations"; - path = - path.replace( - "{" + "TrustProductSid" + "}", - this.pathTrustProductSid.toString() - ); + path = path.replace( + "{" + "TrustProductSid" + "}", + this.pathTrustProductSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/FormFetcher.java b/src/main/java/com/twilio/rest/verify/v2/FormFetcher.java index ecec6fdec2..4429531558 100644 --- a/src/main/java/com/twilio/rest/verify/v2/FormFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/FormFetcher.java @@ -38,8 +38,10 @@ public FormFetcher(final Form.FormTypes pathFormType) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Forms/{FormType}"; - path = - path.replace("{" + "FormType" + "}", this.pathFormType.toString()); + path = path.replace( + "{" + "FormType" + "}", + this.pathFormType.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/SafelistDeleter.java b/src/main/java/com/twilio/rest/verify/v2/SafelistDeleter.java index eb15cd0751..efcd8f8b07 100644 --- a/src/main/java/com/twilio/rest/verify/v2/SafelistDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/SafelistDeleter.java @@ -39,11 +39,10 @@ public SafelistDeleter(final String pathPhoneNumber) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/SafeList/Numbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/verify/v2/SafelistFetcher.java b/src/main/java/com/twilio/rest/verify/v2/SafelistFetcher.java index c04f4ca822..3776139533 100644 --- a/src/main/java/com/twilio/rest/verify/v2/SafelistFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/SafelistFetcher.java @@ -38,11 +38,10 @@ public SafelistFetcher(final String pathPhoneNumber) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/SafeList/Numbers/{PhoneNumber}"; - path = - path.replace( - "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.toString() - ); + path = path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummaryFetcher.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummaryFetcher.java index 4c0ac388d6..07e1f5ac8b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummaryFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummaryFetcher.java @@ -31,7 +31,8 @@ import java.time.ZonedDateTime; public class VerificationAttemptsSummaryFetcher - extends Fetcher { + extends Fetcher +{ private String verifyServiceSid; private ZonedDateTime dateCreatedAfter; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenCreator.java index 19bb578473..6e9ad86de9 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenCreator.java @@ -75,11 +75,10 @@ public AccessTokenCreator setTtl(final Integer ttl) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/AccessTokens"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenFetcher.java index abf4bea833..559f80fb9a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/AccessTokenFetcher.java @@ -43,11 +43,10 @@ public AccessTokenFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/AccessTokens/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 1b2e97aa40..038a111c67 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 @@ -172,6 +172,7 @@ public static FactorType forValue(final String value) { @JsonDeserialize( builder = ApprovePasskeysChallengeRequestResponse.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ApprovePasskeysChallengeRequestResponse { @@ -221,6 +222,7 @@ public static ApprovePasskeysChallengeRequestResponse fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -293,6 +295,7 @@ public int hashCode() { } @JsonDeserialize(builder = ApprovePasskeysChallengeRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class ApprovePasskeysChallengeRequest { @@ -349,6 +352,7 @@ public static ApprovePasskeysChallengeRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..2f4755f2f9 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 @@ -52,11 +52,10 @@ public ApproveChallengeUpdater setApprovePasskeysChallengeRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Passkeys/ApproveChallenge"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/EntityCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/EntityCreator.java index 9d78b09d7f..7596642258 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/EntityCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/EntityCreator.java @@ -48,11 +48,10 @@ public EntityCreator setIdentity(final String identity) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/EntityDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/EntityDeleter.java index e5d0b5e70c..0f3e4cce03 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/EntityDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/EntityDeleter.java @@ -44,13 +44,14 @@ public EntityDeleter( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/EntityFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/EntityFetcher.java index ddf88eeba6..98e123fb63 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/EntityFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/EntityFetcher.java @@ -43,13 +43,14 @@ public EntityFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/EntityReader.java b/src/main/java/com/twilio/rest/verify/v2/service/EntityReader.java index 86e0e4bbe9..451b01dac1 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/EntityReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/EntityReader.java @@ -69,11 +69,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationCreator.java index 419f3b1e56..692102936c 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationCreator.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class MessagingConfigurationCreator - extends Creator { + extends Creator +{ private String pathServiceSid; private String country; @@ -62,11 +63,10 @@ public MessagingConfigurationCreator setMessagingServiceSid( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/MessagingConfigurations"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationDeleter.java index c48c9c92e6..43700d306c 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class MessagingConfigurationDeleter - extends Deleter { + extends Deleter +{ private String pathServiceSid; private String pathCountry; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Country" + "}", this.pathCountry.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationFetcher.java index 7ad509798c..bd647a5d6d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class MessagingConfigurationFetcher - extends Fetcher { + extends Fetcher +{ private String pathServiceSid; private String pathCountry; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Country" + "}", this.pathCountry.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationReader.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationReader.java index fe6db1ed64..d4a13e2bd6 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class MessagingConfigurationReader - extends Reader { + extends Reader +{ private String pathServiceSid; private Long pageSize; @@ -74,11 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/MessagingConfigurations"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationUpdater.java index 9c4effd241..8ee2013e53 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/MessagingConfigurationUpdater.java @@ -31,7 +31,8 @@ import java.io.InputStream; public class MessagingConfigurationUpdater - extends Updater { + extends Updater +{ private String pathServiceSid; private String pathCountry; @@ -58,11 +59,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Country" + "}", this.pathCountry.toString()); Request request = new Request( 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 08d232ccd4..47125a5565 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 @@ -126,6 +126,7 @@ public static FactorType forValue(final String value) { } @JsonDeserialize(builder = CreatePasskeysChallengeRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreatePasskeysChallengeRequest { @@ -159,6 +160,7 @@ public static CreatePasskeysChallengeRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..a62f9917aa 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 @@ -52,11 +52,10 @@ public NewChallengeCreator setCreatePasskeysChallengeRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Passkeys/Challenges"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 3b28bf35a9..163568ebd7 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 @@ -176,6 +176,7 @@ public static DiscoverableCredentials forValue(final String value) { @JsonDeserialize( builder = CreateNewPasskeysFactorRequestConfigRelyingParty.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateNewPasskeysFactorRequestConfigRelyingParty { @@ -217,6 +218,7 @@ public static CreateNewPasskeysFactorRequestConfigRelyingParty fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -285,6 +287,7 @@ public int hashCode() { @JsonDeserialize( builder = CreateNewPasskeysFactorRequestConfig.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateNewPasskeysFactorRequestConfig { @@ -330,6 +333,7 @@ public static CreateNewPasskeysFactorRequestConfig fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -424,6 +428,7 @@ public int hashCode() { } @JsonDeserialize(builder = CreateNewPasskeysFactorRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateNewPasskeysFactorRequest { @@ -466,6 +471,7 @@ public static CreateNewPasskeysFactorRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..893d5c3061 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 @@ -52,11 +52,10 @@ public NewFactorCreator setCreateNewPasskeysFactorRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Passkeys/Factors"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, 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 578f84242e..c79231d416 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 @@ -171,6 +171,7 @@ public static FactorType forValue(final String value) { } @JsonDeserialize(builder = VerifyPasskeysFactorRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VerifyPasskeysFactorRequest { @@ -224,6 +225,7 @@ public static VerifyPasskeysFactorRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -324,6 +326,7 @@ public int hashCode() { @JsonDeserialize( builder = VerifyPasskeysFactorRequestResponse.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VerifyPasskeysFactorRequestResponse { @@ -363,6 +366,7 @@ public static VerifyPasskeysFactorRequestResponse fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { 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..62f6c3d828 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 @@ -52,11 +52,10 @@ public NewVerifyFactorUpdater setVerifyPasskeysFactorRequest( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Passkeys/VerifyFactor"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitCreator.java index e29252835d..8f92fc27e6 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitCreator.java @@ -57,11 +57,10 @@ public RateLimitCreator setDescription(final String description) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitDeleter.java index 7a8cfce0a3..2656416a99 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitDeleter.java @@ -41,11 +41,10 @@ public RateLimitDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitFetcher.java index f7a5bfa2ab..004bbcf1b1 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitFetcher.java @@ -40,11 +40,10 @@ public RateLimitFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitReader.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitReader.java index 37439b789a..c30502682d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitUpdater.java index 65ed9073cb..796b2a007b 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/RateLimitUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/RateLimitUpdater.java @@ -49,11 +49,10 @@ public RateLimitUpdater setDescription(final String description) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 48b13b7f75..921009f893 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 @@ -185,9 +185,9 @@ private VerificationCheck( @JsonProperty("payee") final String payee, @JsonProperty("service_sid") final String serviceSid, @JsonProperty("sid") final String sid, - @JsonProperty("sna_attempts_error_codes") final List< - Object - > snaAttemptsErrorCodes, + @JsonProperty( + "sna_attempts_error_codes" + ) final List snaAttemptsErrorCodes, @JsonProperty("status") final String status, @JsonProperty("to") final String to, @JsonProperty("valid") final Boolean valid diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheckCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheckCreator.java index b28779fab6..66808eb544 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheckCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCheckCreator.java @@ -81,11 +81,10 @@ public VerificationCheckCreator setSnaClientToken( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/VerificationCheck"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java index 293a732aa9..c3b708e714 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java @@ -47,6 +47,7 @@ public class VerificationCreator extends Creator { private String appHash; private String templateSid; private String templateCustomSubstitutions; + private String templates; private String deviceIp; private Boolean enableSnaClientToken; private Verification.RiskCheck riskCheck; @@ -138,6 +139,11 @@ public VerificationCreator setTemplateCustomSubstitutions( return this; } + public VerificationCreator setTemplates(final String templates) { + this.templates = templates; + return this; + } + public VerificationCreator setDeviceIp(final String deviceIp) { this.deviceIp = deviceIp; return this; @@ -165,11 +171,10 @@ public VerificationCreator setTags(final String tags) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Verifications"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, @@ -349,6 +354,15 @@ private void addPostParams(final Request request) { ); } + if (templates != null) { + Serializer.toString( + request, + "Templates", + templates, + ParameterType.URLENCODED + ); + } + if (deviceIp != null) { Serializer.toString( request, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationFetcher.java index 63246abf52..a1e1c9c20a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationFetcher.java @@ -43,11 +43,10 @@ public VerificationFetcher( private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Verifications/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationUpdater.java index b40a1f667e..e32a2c2a60 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationUpdater.java @@ -54,11 +54,10 @@ public VerificationUpdater setStatus(final Verification.Status status) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Verifications/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/WebhookCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/WebhookCreator.java index 937a5c79fd..14c2e9925d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/WebhookCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/WebhookCreator.java @@ -85,11 +85,10 @@ public WebhookCreator setVersion(final Webhook.Version version) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/WebhookDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/WebhookDeleter.java index c57284ced6..3d3c817c1d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/WebhookDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/WebhookDeleter.java @@ -41,11 +41,10 @@ public WebhookDeleter(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/verify/v2/service/WebhookFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/WebhookFetcher.java index a8b415931f..a640193020 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/WebhookFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/WebhookFetcher.java @@ -40,11 +40,10 @@ public WebhookFetcher(final String pathServiceSid, final String pathSid) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/WebhookReader.java b/src/main/java/com/twilio/rest/verify/v2/service/WebhookReader.java index 531ba5d949..7f4abe978f 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/WebhookReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/WebhookReader.java @@ -73,11 +73,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Webhooks"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/WebhookUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/WebhookUpdater.java index 57503fa839..2ba6d8955d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/WebhookUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/WebhookUpdater.java @@ -79,11 +79,10 @@ public WebhookUpdater setVersion(final Webhook.Version version) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Webhooks/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java index 2126d391e0..391b2bb33c 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java @@ -94,13 +94,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeFetcher.java index 5fa7914e02..a639409d19 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeFetcher.java @@ -47,13 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeReader.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeReader.java index 4e33503955..2716f1cf15 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeReader.java @@ -97,13 +97,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java index ee4edb62ea..778f251919 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java @@ -62,13 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorDeleter.java index e171e063e7..628e5da17c 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorDeleter.java @@ -48,13 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorFetcher.java index f921c493de..4dffd510d6 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorFetcher.java @@ -47,13 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorReader.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorReader.java index d31d1f50c2..5ff4d102d6 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorReader.java @@ -74,13 +74,14 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorUpdater.java index 62b1be45d9..b80e9d5e4a 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/FactorUpdater.java @@ -108,13 +108,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java index 0f82011bf8..26df623f2e 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java @@ -144,13 +144,14 @@ public NewFactorCreator setMetadata(final Object metadata) { private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/NotificationCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/NotificationCreator.java index 8db157ee11..86dae64305 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/NotificationCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/challenge/NotificationCreator.java @@ -56,18 +56,18 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{ChallengeSid}/Notifications"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace("{" + "Identity" + "}", this.pathIdentity.toString()); - path = - path.replace( - "{" + "ChallengeSid" + "}", - this.pathChallengeSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "Identity" + "}", + this.pathIdentity.toString() + ); + path = path.replace( + "{" + "ChallengeSid" + "}", + this.pathChallengeSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketCreator.java index f31c4e918f..67460c1a3d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketCreator.java @@ -63,16 +63,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "RateLimitSid" + "}", - this.pathRateLimitSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "RateLimitSid" + "}", + this.pathRateLimitSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketDeleter.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketDeleter.java index 97a247b42e..fdd4dc1c71 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketDeleter.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketDeleter.java @@ -48,16 +48,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "RateLimitSid" + "}", - this.pathRateLimitSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "RateLimitSid" + "}", + this.pathRateLimitSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketFetcher.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketFetcher.java index e7143a4be5..e7c60d8be2 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketFetcher.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketFetcher.java @@ -47,16 +47,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "RateLimitSid" + "}", - this.pathRateLimitSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "RateLimitSid" + "}", + this.pathRateLimitSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketReader.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketReader.java index b510ba3197..92bcacc4e3 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketReader.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketReader.java @@ -75,16 +75,14 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "RateLimitSid" + "}", - this.pathRateLimitSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "RateLimitSid" + "}", + this.pathRateLimitSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketUpdater.java index 3293487000..1f278320ab 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/ratelimit/BucketUpdater.java @@ -62,16 +62,14 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = - path.replace( - "{" + "RateLimitSid" + "}", - this.pathRateLimitSid.toString() - ); + path = path.replace( + "{" + "ServiceSid" + "}", + this.pathServiceSid.toString() + ); + path = path.replace( + "{" + "RateLimitSid" + "}", + this.pathRateLimitSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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 57a3d47360..cf0fe477cf 100644 --- a/src/main/java/com/twilio/rest/video/v1/Composition.java +++ b/src/main/java/com/twilio/rest/video/v1/Composition.java @@ -233,9 +233,9 @@ public static String toJson(Object object, ObjectMapper mapper) { private Composition( @JsonProperty("account_sid") final String accountSid, @JsonProperty("audio_sources") final List audioSources, - @JsonProperty("audio_sources_excluded") final List< - String - > audioSourcesExcluded, + @JsonProperty( + "audio_sources_excluded" + ) final List audioSourcesExcluded, @JsonProperty("bitrate") final Integer bitrate, @JsonProperty("date_completed") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class 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 ea3a281aff..7a5040a06b 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionHook.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionHook.java @@ -196,9 +196,9 @@ public static String toJson(Object object, ObjectMapper mapper) { private CompositionHook( @JsonProperty("account_sid") final String accountSid, @JsonProperty("audio_sources") final List audioSources, - @JsonProperty("audio_sources_excluded") final List< - String - > audioSourcesExcluded, + @JsonProperty( + "audio_sources_excluded" + ) final List audioSourcesExcluded, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackFetcher.java b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackFetcher.java index d30835c5b2..7ff68b5120 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackFetcher.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackReader.java b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackReader.java index cadc496883..5656b77f6f 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackReader.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/PublishedTrackReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesFetcher.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesFetcher.java index 5b2c742555..5c6bad47d9 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesFetcher.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesFetcher.java @@ -45,11 +45,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java index a4034584f8..46f37728ed 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java @@ -54,11 +54,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackFetcher.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackFetcher.java index ce31dd99c6..0ba61ec84f 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackFetcher.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackFetcher.java @@ -48,11 +48,10 @@ private Response makeRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java index a08e487190..e449630e78 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribedTrackReader.java @@ -80,11 +80,10 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks"; path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); - path = - path.replace( - "{" + "ParticipantSid" + "}", - this.pathParticipantSid.toString() - ); + path = path.replace( + "{" + "ParticipantSid" + "}", + this.pathParticipantSid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetCreator.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetCreator.java index dfc7c0818e..b69befed53 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetCreator.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetCreator.java @@ -33,7 +33,8 @@ import java.net.URI; public class ConnectionPolicyTargetCreator - extends Creator { + extends Creator +{ private String pathConnectionPolicySid; private URI target; @@ -84,11 +85,10 @@ public ConnectionPolicyTargetCreator setEnabled(final Boolean enabled) { private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets"; - path = - path.replace( - "{" + "ConnectionPolicySid" + "}", - this.pathConnectionPolicySid.toString() - ); + path = path.replace( + "{" + "ConnectionPolicySid" + "}", + this.pathConnectionPolicySid.toString() + ); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetDeleter.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetDeleter.java index c1f44a8194..a30150f72d 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetDeleter.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetDeleter.java @@ -29,7 +29,8 @@ import java.util.function.Predicate; public class ConnectionPolicyTargetDeleter - extends Deleter { + extends Deleter +{ private String pathConnectionPolicySid; private String pathSid; @@ -46,11 +47,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}"; - path = - path.replace( - "{" + "ConnectionPolicySid" + "}", - this.pathConnectionPolicySid.toString() - ); + path = path.replace( + "{" + "ConnectionPolicySid" + "}", + this.pathConnectionPolicySid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Predicate deleteStatuses = i -> diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetFetcher.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetFetcher.java index 45988a13b9..7e270d1bd3 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetFetcher.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetFetcher.java @@ -28,7 +28,8 @@ import java.io.InputStream; public class ConnectionPolicyTargetFetcher - extends Fetcher { + extends Fetcher +{ private String pathConnectionPolicySid; private String pathSid; @@ -45,11 +46,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}"; - path = - path.replace( - "{" + "ConnectionPolicySid" + "}", - this.pathConnectionPolicySid.toString() - ); + path = path.replace( + "{" + "ConnectionPolicySid" + "}", + this.pathConnectionPolicySid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetReader.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetReader.java index 99f067509f..7ee687ef4c 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetReader.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetReader.java @@ -34,7 +34,8 @@ import java.io.InputStream; public class ConnectionPolicyTargetReader - extends Reader { + extends Reader +{ private String pathConnectionPolicySid; private Long pageSize; @@ -74,11 +75,10 @@ public ResourceSetResponse readWithResponse( private Request buildFirstPageRequest(final TwilioRestClient client) { String path = "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets"; - path = - path.replace( - "{" + "ConnectionPolicySid" + "}", - this.pathConnectionPolicySid.toString() - ); + path = path.replace( + "{" + "ConnectionPolicySid" + "}", + this.pathConnectionPolicySid.toString() + ); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetUpdater.java b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetUpdater.java index 213e7ca4c9..3188c76b47 100644 --- a/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetUpdater.java +++ b/src/main/java/com/twilio/rest/voice/v1/connectionpolicy/ConnectionPolicyTargetUpdater.java @@ -33,7 +33,8 @@ import java.net.URI; public class ConnectionPolicyTargetUpdater - extends Updater { + extends Updater +{ private String pathConnectionPolicySid; private String pathSid; @@ -86,11 +87,10 @@ private Response makeRequest(final TwilioRestClient client) { String path = "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}"; - path = - path.replace( - "{" + "ConnectionPolicySid" + "}", - this.pathConnectionPolicySid.toString() - ); + path = path.replace( + "{" + "ConnectionPolicySid" + "}", + this.pathConnectionPolicySid.toString() + ); path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); Request request = new Request( 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..7f2e98396b 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 @@ -134,8 +134,7 @@ public boolean equals(final Object o) { Objects.equals( dialingPermissionsInheritance, other.dialingPermissionsInheritance - ) && - Objects.equals(url, other.url) + ) && Objects.equals(url, other.url) ); } 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..177bcb91fd 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 @@ -116,7 +116,7 @@ public boolean equals(final Object o) { } HighriskSpecialPrefix other = (HighriskSpecialPrefix) o; - return (Objects.equals(prefix, other.prefix)); + return Objects.equals(prefix, other.prefix); } @Override diff --git a/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfiguration.java b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfiguration.java new file mode 100644 index 0000000000..afa70a22ef --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfiguration.java @@ -0,0 +1,292 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +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.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.twilio.base.Resource; +import com.twilio.base.Resource; +import com.twilio.exception.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; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class AccountDefaultConfiguration extends Resource { + + public static AccountDefaultConfigurationCreator creator( + final String pathType + ) { + return new AccountDefaultConfigurationCreator(pathType); + } + + public static AccountDefaultConfigurationDeleter deleter( + final String pathType + ) { + return new AccountDefaultConfigurationDeleter(pathType); + } + + public static AccountDefaultConfigurationFetcher fetcher( + final String pathType + ) { + return new AccountDefaultConfigurationFetcher(pathType); + } + + public static AccountDefaultConfigurationUpdater updater( + final String pathType + ) { + return new AccountDefaultConfigurationUpdater(pathType); + } + + @JsonDeserialize( + builder = VoiceV2AccountDefaultConfigurationRequest.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2AccountDefaultConfigurationRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + @Getter + private final Object configuration; + + private VoiceV2AccountDefaultConfigurationRequest(Builder builder) { + this.description = builder.description; + this.configuration = builder.configuration; + } + + public static Builder builder() { + return new Builder(); + } + + public static VoiceV2AccountDefaultConfigurationRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2AccountDefaultConfigurationRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("description") + private String description; + + @JsonProperty("configuration") + private Object configuration; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + public Builder configuration(Object configuration) { + this.configuration = configuration; + return this; + } + + public VoiceV2AccountDefaultConfigurationRequest build() { + return new VoiceV2AccountDefaultConfigurationRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2AccountDefaultConfigurationRequest other = + (VoiceV2AccountDefaultConfigurationRequest) o; + return ( + Objects.equals(description, other.description) && + Objects.equals(configuration, other.configuration) + ); + } + + @Override + public int hashCode() { + return Objects.hash(description, configuration); + } + } + + /** + * Converts a JSON String into a AccountDefaultConfiguration object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return AccountDefaultConfiguration object represented by the provided JSON + */ + public static AccountDefaultConfiguration fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + AccountDefaultConfiguration.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a AccountDefaultConfiguration object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return AccountDefaultConfiguration object represented by the provided JSON + */ + public static AccountDefaultConfiguration fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + AccountDefaultConfiguration.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String accountSid; + + @Getter + private final Object configuration; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateCreated; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateUpdated; + + @Getter + private final String description; + + @JsonCreator + private AccountDefaultConfiguration( + @JsonProperty("account_sid") final String accountSid, + @JsonProperty("configuration") final Object configuration, + @JsonProperty("date_created") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateCreated, + @JsonProperty("date_updated") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateUpdated, + @JsonProperty("description") final String description + ) { + this.accountSid = accountSid; + this.configuration = configuration; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + this.description = description; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + AccountDefaultConfiguration other = (AccountDefaultConfiguration) o; + return ( + Objects.equals(accountSid, other.accountSid) && + Objects.equals(configuration, other.configuration) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(description, other.description) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + accountSid, + configuration, + dateCreated, + dateUpdated, + description + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationCreator.java similarity index 61% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java rename to src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationCreator.java index 6324cc19fa..b9651255b3 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/MessageCreator.java +++ b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationCreator.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -29,36 +29,33 @@ import com.twilio.type.*; import java.io.InputStream; -public class MessageCreator extends Creator { +public class AccountDefaultConfigurationCreator + extends Creator +{ - private String pathId; - private Message.AssistantsV1ServiceAssistantSendMessageRequest assistantsV1ServiceAssistantSendMessageRequest; + private String pathType; + private AccountDefaultConfiguration.VoiceV2AccountDefaultConfigurationRequest voiceV2AccountDefaultConfigurationRequest; - public MessageCreator( - final String pathId, - final Message.AssistantsV1ServiceAssistantSendMessageRequest assistantsV1ServiceAssistantSendMessageRequest - ) { - this.pathId = pathId; - this.assistantsV1ServiceAssistantSendMessageRequest = - assistantsV1ServiceAssistantSendMessageRequest; + public AccountDefaultConfigurationCreator(final String pathType) { + this.pathType = pathType; } - public MessageCreator setAssistantsV1ServiceAssistantSendMessageRequest( - final Message.AssistantsV1ServiceAssistantSendMessageRequest assistantsV1ServiceAssistantSendMessageRequest + public AccountDefaultConfigurationCreator setVoiceV2AccountDefaultConfigurationRequest( + final AccountDefaultConfiguration.VoiceV2AccountDefaultConfigurationRequest voiceV2AccountDefaultConfigurationRequest ) { - this.assistantsV1ServiceAssistantSendMessageRequest = - assistantsV1ServiceAssistantSendMessageRequest; + this.voiceV2AccountDefaultConfigurationRequest = + voiceV2AccountDefaultConfigurationRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}/Messages"; + String path = "/v2/AccountDefaultConfiguration/{Type}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -68,7 +65,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Message creation failed: Unable to connect to server" + "AccountDefaultConfiguration creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -88,20 +85,24 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Message create(final TwilioRestClient client) { + public AccountDefaultConfiguration create(final TwilioRestClient client) { Response response = makeRequest(client); - return Message.fromJson(response.getStream(), client.getObjectMapper()); + return AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Message content = Message.fromJson( - response.getStream(), - client.getObjectMapper() - ); + AccountDefaultConfiguration content = + AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); return new TwilioResponse<>( content, response.getStatusCode(), @@ -111,10 +112,10 @@ public TwilioResponse createWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceAssistantSendMessageRequest != null) { + if (voiceV2AccountDefaultConfigurationRequest != null) { request.setBody( - Message.toJson( - assistantsV1ServiceAssistantSendMessageRequest, + AccountDefaultConfiguration.toJson( + voiceV2AccountDefaultConfigurationRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolDeleter.java b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationDeleter.java similarity index 81% rename from src/main/java/com/twilio/rest/assistants/v1/ToolDeleter.java rename to src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationDeleter.java index 0a8fae804b..c2edbae83b 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolDeleter.java +++ b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationDeleter.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.twilio.base.Deleter; import com.twilio.base.TwilioResponse; @@ -28,24 +28,26 @@ import java.io.InputStream; import java.util.function.Predicate; -public class ToolDeleter extends Deleter { +public class AccountDefaultConfigurationDeleter + extends Deleter +{ - private String pathId; + private String pathType; - public ToolDeleter(final String pathId) { - this.pathId = pathId; + public AccountDefaultConfigurationDeleter(final String pathType) { + this.pathType = pathType; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Tools/{id}"; + String path = "/v2/AccountDefaultConfiguration/{Type}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Type" + "}", this.pathType.toString()); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; Request request = new Request( HttpMethod.DELETE, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); @@ -53,7 +55,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Tool delete failed: Unable to connect to server" + "AccountDefaultConfiguration delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); diff --git a/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationFetcher.java b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationFetcher.java new file mode 100644 index 0000000000..e214a2b595 --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationFetcher.java @@ -0,0 +1,99 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class AccountDefaultConfigurationFetcher + extends Fetcher +{ + + private String pathType; + + public AccountDefaultConfigurationFetcher(final String pathType) { + this.pathType = pathType; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/AccountDefaultConfiguration/{Type}"; + + path = path.replace("{" + "Type" + "}", this.pathType.toString()); + + Request request = new Request( + HttpMethod.GET, + Domains.VOICE.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "AccountDefaultConfiguration fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public AccountDefaultConfiguration fetch(final TwilioRestClient client) { + Response response = makeRequest(client); + return AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + AccountDefaultConfiguration content = + AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationUpdater.java b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationUpdater.java new file mode 100644 index 0000000000..0da4ccfac7 --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/AccountDefaultConfigurationUpdater.java @@ -0,0 +1,124 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.TwilioResponse; +import com.twilio.base.Updater; +import com.twilio.constant.EnumConstants; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class AccountDefaultConfigurationUpdater + extends Updater +{ + + private String pathType; + private AccountDefaultConfiguration.VoiceV2AccountDefaultConfigurationRequest voiceV2AccountDefaultConfigurationRequest; + + public AccountDefaultConfigurationUpdater(final String pathType) { + this.pathType = pathType; + } + + public AccountDefaultConfigurationUpdater setVoiceV2AccountDefaultConfigurationRequest( + final AccountDefaultConfiguration.VoiceV2AccountDefaultConfigurationRequest voiceV2AccountDefaultConfigurationRequest + ) { + this.voiceV2AccountDefaultConfigurationRequest = + voiceV2AccountDefaultConfigurationRequest; + return this; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/AccountDefaultConfiguration/{Type}"; + + path = path.replace("{" + "Type" + "}", this.pathType.toString()); + + Request request = new Request( + HttpMethod.PUT, + Domains.VOICE.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "AccountDefaultConfiguration update failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public AccountDefaultConfiguration update(final TwilioRestClient client) { + Response response = makeRequest(client); + return AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + AccountDefaultConfiguration content = + AccountDefaultConfiguration.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } + + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (voiceV2AccountDefaultConfigurationRequest != null) { + request.setBody( + AccountDefaultConfiguration.toJson( + voiceV2AccountDefaultConfigurationRequest, + objectMapper + ) + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/Policy.java b/src/main/java/com/twilio/rest/voice/v2/Configuration.java similarity index 51% rename from src/main/java/com/twilio/rest/assistants/v1/Policy.java rename to src/main/java/com/twilio/rest/voice/v2/Configuration.java index 40e48344f7..c571cba712 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Policy.java +++ b/src/main/java/com/twilio/rest/voice/v2/Configuration.java @@ -4,18 +4,19 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.annotation.JsonCreator; 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; @@ -23,6 +24,7 @@ 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.fasterxml.jackson.databind.annotation.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; @@ -34,31 +36,136 @@ import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; +import lombok.Builder; import lombok.Getter; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class Policy extends Resource { +public class Configuration extends Resource { - public static PolicyReader reader() { - return new PolicyReader(); + public static ConfigurationCreator creator(final String pathType) { + return new ConfigurationCreator(pathType); + } + + @JsonDeserialize(builder = VoiceV2ConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + @Getter + private final String uniqueName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + @Getter + private final Object configuration; + + private VoiceV2ConfigurationRequest(Builder builder) { + this.uniqueName = builder.uniqueName; + this.description = builder.description; + this.configuration = builder.configuration; + } + + public static Builder builder() { + return new Builder(); + } + + public static VoiceV2ConfigurationRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("unique_name") + private String uniqueName; + + @JsonProperty("description") + private String description; + + @JsonProperty("configuration") + private Object configuration; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + public Builder uniqueName(String uniqueName) { + this.uniqueName = uniqueName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + public Builder configuration(Object configuration) { + this.configuration = configuration; + return this; + } + + public VoiceV2ConfigurationRequest build() { + return new VoiceV2ConfigurationRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRequest other = (VoiceV2ConfigurationRequest) o; + return ( + Objects.equals(uniqueName, other.uniqueName) && + Objects.equals(description, other.description) && + Objects.equals(configuration, other.configuration) + ); + } + + @Override + public int hashCode() { + return Objects.hash(uniqueName, description, configuration); + } } /** - * Converts a JSON String into a Policy object using the provided ObjectMapper. + * Converts a JSON String into a Configuration object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return Policy object represented by the provided JSON + * @return Configuration object represented by the provided JSON */ - public static Policy fromJson( + public static Configuration fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Policy.class); + return objectMapper.readValue(json, Configuration.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -67,20 +174,20 @@ public static Policy fromJson( } /** - * Converts a JSON InputStream into a Policy object using the provided + * Converts a JSON InputStream into a Configuration object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return Policy object represented by the provided JSON + * @return Configuration object represented by the provided JSON */ - public static Policy fromJson( + public static Configuration fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Policy.class); + return objectMapper.readValue(json, Configuration.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -103,6 +210,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String accountSid; + @Getter + private final Object configuration; + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter private final ZonedDateTime dateCreated; @@ -118,20 +228,12 @@ public static String toJson(Object object, ObjectMapper mapper) { private final String id; @Getter - private final String name; - - @Getter - private final Object policyDetails; - - @Getter - private final String type; - - @Getter - private final String userSid; + private final String uniqueName; @JsonCreator - private Policy( + private Configuration( @JsonProperty("account_sid") final String accountSid, + @JsonProperty("configuration") final Object configuration, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( @@ -144,20 +246,15 @@ private Policy( ) final ZonedDateTime dateUpdated, @JsonProperty("description") final String description, @JsonProperty("id") final String id, - @JsonProperty("name") final String name, - @JsonProperty("policy_details") final Object policyDetails, - @JsonProperty("type") final String type, - @JsonProperty("user_sid") final String userSid + @JsonProperty("unique_name") final String uniqueName ) { this.accountSid = accountSid; + this.configuration = configuration; this.dateCreated = dateCreated; this.dateUpdated = dateUpdated; this.description = description; this.id = id; - this.name = name; - this.policyDetails = policyDetails; - this.type = type; - this.userSid = userSid; + this.uniqueName = uniqueName; } @Override @@ -170,17 +267,15 @@ public boolean equals(final Object o) { return false; } - Policy other = (Policy) o; + Configuration other = (Configuration) o; return ( Objects.equals(accountSid, other.accountSid) && + Objects.equals(configuration, other.configuration) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(description, other.description) && Objects.equals(id, other.id) && - Objects.equals(name, other.name) && - Objects.equals(policyDetails, other.policyDetails) && - Objects.equals(type, other.type) && - Objects.equals(userSid, other.userSid) + Objects.equals(uniqueName, other.uniqueName) ); } @@ -188,14 +283,12 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, + configuration, dateCreated, dateUpdated, description, id, - name, - policyDetails, - type, - userSid + uniqueName ); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java b/src/main/java/com/twilio/rest/voice/v2/ConfigurationCreator.java similarity index 66% rename from src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java rename to src/main/java/com/twilio/rest/voice/v2/ConfigurationCreator.java index 4f799944b6..1612811f7e 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolUpdater.java +++ b/src/main/java/com/twilio/rest/voice/v2/ConfigurationCreator.java @@ -4,19 +4,19 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Creator; import com.twilio.base.TwilioResponse; -import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -29,31 +29,30 @@ import com.twilio.type.*; import java.io.InputStream; -public class ToolUpdater extends Updater { +public class ConfigurationCreator extends Creator { - private String pathId; - private Tool.AssistantsV1ServiceUpdateToolRequest assistantsV1ServiceUpdateToolRequest; + private String pathType; + private Configuration.VoiceV2ConfigurationRequest voiceV2ConfigurationRequest; - public ToolUpdater(final String pathId) { - this.pathId = pathId; + public ConfigurationCreator(final String pathType) { + this.pathType = pathType; } - public ToolUpdater setAssistantsV1ServiceUpdateToolRequest( - final Tool.AssistantsV1ServiceUpdateToolRequest assistantsV1ServiceUpdateToolRequest + public ConfigurationCreator setVoiceV2ConfigurationRequest( + final Configuration.VoiceV2ConfigurationRequest voiceV2ConfigurationRequest ) { - this.assistantsV1ServiceUpdateToolRequest = - assistantsV1ServiceUpdateToolRequest; + this.voiceV2ConfigurationRequest = voiceV2ConfigurationRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Tools/{id}"; + String path = "/v2/Configurations/{Type}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( - HttpMethod.PUT, - Domains.ASSISTANTS.toString(), + HttpMethod.POST, + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +62,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Tool update failed: Unable to connect to server" + "Configuration creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,17 +82,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Tool update(final TwilioRestClient client) { + public Configuration create(final TwilioRestClient client) { Response response = makeRequest(client); - return Tool.fromJson(response.getStream(), client.getObjectMapper()); + return Configuration.fromJson( + response.getStream(), + client.getObjectMapper() + ); } @Override - public TwilioResponse updateWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Tool content = Tool.fromJson( + Configuration content = Configuration.fromJson( response.getStream(), client.getObjectMapper() ); @@ -106,9 +108,9 @@ public TwilioResponse updateWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceUpdateToolRequest != null) { + if (voiceV2ConfigurationRequest != null) { request.setBody( - Tool.toJson(assistantsV1ServiceUpdateToolRequest, objectMapper) + Configuration.toJson(voiceV2ConfigurationRequest, objectMapper) ); } } diff --git a/src/main/java/com/twilio/rest/voice/v2/Recording.java b/src/main/java/com/twilio/rest/voice/v2/Recording.java new file mode 100644 index 0000000000..d6f98e166b --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/Recording.java @@ -0,0 +1,955 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.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.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.twilio.base.Resource; +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; +import java.util.Objects; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class Recording extends Resource { + + public static RecordingCreator creator() { + return new RecordingCreator(); + } + + public static RecordingDeleter deleter(final String pathIdOrUniqueName) { + return new RecordingDeleter(pathIdOrUniqueName); + } + + public static RecordingFetcher fetcher(final String pathIdOrUniqueName) { + return new RecordingFetcher(pathIdOrUniqueName); + } + + public static RecordingUpdater updater(final String pathIdOrUniqueName) { + return new RecordingUpdater(pathIdOrUniqueName); + } + + public enum ConfigurationType { + RECORDING("Recording"); + + private final String value; + + private ConfigurationType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConfigurationType forValue(final String value) { + return Promoter.enumFromString(value, ConfigurationType.values()); + } + } + + public enum Type { + TRANSCRIPTION_CONFIGURATION("transcriptionConfiguration"); + + private final String value; + + private Type(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Type forValue(final String value) { + return Promoter.enumFromString(value, Type.values()); + } + } + + public enum Trim { + TRIM_SILENCE("trim-silence"), + DO_NOT_TRIM("do-not-trim"); + + private final String value; + + private Trim(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Trim forValue(final String value) { + return Promoter.enumFromString(value, Trim.values()); + } + } + + public enum Events { + IN_PROGRESS("in-progress"), + COMPLETED("completed"), + ABSENT("absent"), + FAILED("failed"); + + private final String value; + + private Events(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Events forValue(final String value) { + return Promoter.enumFromString(value, Events.values()); + } + } + + public enum Method { + GET("GET"), + POST("POST"); + + private final String value; + + private Method(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Method forValue(final String value) { + return Promoter.enumFromString(value, Method.values()); + } + } + + public enum Channels { + DUAL("dual"), + MONO("mono"); + + private final String value; + + private Channels(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Channels forValue(final String value) { + return Promoter.enumFromString(value, Channels.values()); + } + } + + public enum Track { + INBOUND("inbound"), + OUTBOUND("outbound"), + BOTH("both"); + + private final String value; + + private Track(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Track forValue(final String value) { + return Promoter.enumFromString(value, Track.values()); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationRecordingStatusCallback.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRecordingStatusCallback { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + @Getter + private final String url; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("method") + @Getter + private final Recording.Method method; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("events") + @Getter + private final List events; + + private VoiceV2ConfigurationRecordingStatusCallback(Builder builder) { + this.url = builder.url; + this.method = builder.method; + this.events = builder.events; + } + + public static Builder builder() { + return new Builder(); + } + + public static VoiceV2ConfigurationRecordingStatusCallback fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRecordingStatusCallback.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("url") + private String url; + + @JsonProperty("method") + private Recording.Method method; + + @JsonProperty("events") + private List events; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + public Builder url(String url) { + this.url = url; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("method") + public Builder method(Recording.Method method) { + this.method = method; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("events") + public Builder events(List events) { + this.events = events; + return this; + } + + public VoiceV2ConfigurationRecordingStatusCallback build() { + return new VoiceV2ConfigurationRecordingStatusCallback(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRecordingStatusCallback other = + (VoiceV2ConfigurationRecordingStatusCallback) o; + return ( + Objects.equals(url, other.url) && + Objects.equals(method, other.method) && + Objects.equals(events, other.events) + ); + } + + @Override + public int hashCode() { + return Objects.hash(url, method, events); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationRecordingRequest.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRecordingRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + @Getter + private final String uniqueName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + @Getter + private final VoiceV2ConfigurationRecordingConfiguration configuration; + + private VoiceV2ConfigurationRecordingRequest(Builder builder) { + this.uniqueName = builder.uniqueName; + this.description = builder.description; + this.configuration = builder.configuration; + } + + public static Builder builder( + final VoiceV2ConfigurationRecordingConfiguration configuration + ) { + return new Builder(configuration); + } + + public static VoiceV2ConfigurationRecordingRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRecordingRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("unique_name") + private String uniqueName; + + @JsonProperty("description") + private String description; + + @JsonProperty("configuration") + private VoiceV2ConfigurationRecordingConfiguration configuration; + + @JsonCreator + public Builder( + @JsonProperty( + "configuration" + ) final VoiceV2ConfigurationRecordingConfiguration configuration + ) { + this.configuration = configuration; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + public Builder uniqueName(String uniqueName) { + this.uniqueName = uniqueName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + public VoiceV2ConfigurationRecordingRequest build() { + return new VoiceV2ConfigurationRecordingRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRecordingRequest other = + (VoiceV2ConfigurationRecordingRequest) o; + return ( + Objects.equals(uniqueName, other.uniqueName) && + Objects.equals(description, other.description) && + Objects.equals(configuration, other.configuration) + ); + } + + @Override + public int hashCode() { + return Objects.hash(uniqueName, description, configuration); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationRecordingFeature.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRecordingFeature { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final Recording.Type type; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("featureId") + @Getter + private final String featureId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + private VoiceV2ConfigurationRecordingFeature(Builder builder) { + this.type = builder.type; + this.featureId = builder.featureId; + this.description = builder.description; + } + + public static Builder builder( + final Recording.Type type, + final String featureId + ) { + return new Builder(type, featureId); + } + + public static VoiceV2ConfigurationRecordingFeature fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRecordingFeature.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("type") + private Recording.Type type; + + @JsonProperty("featureId") + private String featureId; + + @JsonProperty("description") + private String description; + + @JsonCreator + public Builder( + @JsonProperty("type") final Recording.Type type, + @JsonProperty("featureId") final String featureId + ) { + this.type = type; + this.featureId = featureId; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + public VoiceV2ConfigurationRecordingFeature build() { + return new VoiceV2ConfigurationRecordingFeature(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRecordingFeature other = + (VoiceV2ConfigurationRecordingFeature) o; + return ( + Objects.equals(type, other.type) && + Objects.equals(featureId, other.featureId) && + Objects.equals(description, other.description) + ); + } + + @Override + public int hashCode() { + return Objects.hash(type, featureId, description); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationRecordingCompositionPolicy.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRecordingCompositionPolicy { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channels") + @Getter + private final Recording.Channels channels; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("trim") + @Getter + private final Recording.Trim trim; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("track") + @Getter + private final Recording.Track track; + + private VoiceV2ConfigurationRecordingCompositionPolicy( + Builder builder + ) { + this.channels = builder.channels; + this.trim = builder.trim; + this.track = builder.track; + } + + public static Builder builder() { + return new Builder(); + } + + public static VoiceV2ConfigurationRecordingCompositionPolicy fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRecordingCompositionPolicy.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("channels") + private Recording.Channels channels; + + @JsonProperty("trim") + private Recording.Trim trim; + + @JsonProperty("track") + private Recording.Track track; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("channels") + public Builder channels(Recording.Channels channels) { + this.channels = channels; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("trim") + public Builder trim(Recording.Trim trim) { + this.trim = trim; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("track") + public Builder track(Recording.Track track) { + this.track = track; + return this; + } + + public VoiceV2ConfigurationRecordingCompositionPolicy build() { + return new VoiceV2ConfigurationRecordingCompositionPolicy(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRecordingCompositionPolicy other = + (VoiceV2ConfigurationRecordingCompositionPolicy) o; + return ( + Objects.equals(channels, other.channels) && + Objects.equals(trim, other.trim) && + Objects.equals(track, other.track) + ); + } + + @Override + public int hashCode() { + return Objects.hash(channels, trim, track); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationRecordingConfiguration.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationRecordingConfiguration { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurationType") + @Getter + private final Recording.ConfigurationType configurationType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("compositionPolicy") + @Getter + private final VoiceV2ConfigurationRecordingCompositionPolicy compositionPolicy; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("callRecordingStatusCallback") + @Getter + private final VoiceV2ConfigurationRecordingStatusCallback callRecordingStatusCallback; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conferenceRecordingStatusCallback") + @Getter + private final VoiceV2ConfigurationRecordingStatusCallback conferenceRecordingStatusCallback; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("features") + @Getter + private final List features; + + private VoiceV2ConfigurationRecordingConfiguration(Builder builder) { + this.configurationType = builder.configurationType; + this.compositionPolicy = builder.compositionPolicy; + this.callRecordingStatusCallback = + builder.callRecordingStatusCallback; + this.conferenceRecordingStatusCallback = + builder.conferenceRecordingStatusCallback; + this.features = builder.features; + } + + public static Builder builder( + final Recording.ConfigurationType configurationType + ) { + return new Builder(configurationType); + } + + public static VoiceV2ConfigurationRecordingConfiguration fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationRecordingConfiguration.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("configurationType") + private Recording.ConfigurationType configurationType; + + @JsonProperty("compositionPolicy") + private VoiceV2ConfigurationRecordingCompositionPolicy compositionPolicy; + + @JsonProperty("callRecordingStatusCallback") + private VoiceV2ConfigurationRecordingStatusCallback callRecordingStatusCallback; + + @JsonProperty("conferenceRecordingStatusCallback") + private VoiceV2ConfigurationRecordingStatusCallback conferenceRecordingStatusCallback; + + @JsonProperty("features") + private List features; + + @JsonCreator + public Builder( + @JsonProperty( + "configurationType" + ) final Recording.ConfigurationType configurationType + ) { + this.configurationType = configurationType; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("compositionPolicy") + public Builder compositionPolicy( + VoiceV2ConfigurationRecordingCompositionPolicy compositionPolicy + ) { + this.compositionPolicy = compositionPolicy; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("callRecordingStatusCallback") + public Builder callRecordingStatusCallback( + VoiceV2ConfigurationRecordingStatusCallback callRecordingStatusCallback + ) { + this.callRecordingStatusCallback = callRecordingStatusCallback; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conferenceRecordingStatusCallback") + public Builder conferenceRecordingStatusCallback( + VoiceV2ConfigurationRecordingStatusCallback conferenceRecordingStatusCallback + ) { + this.conferenceRecordingStatusCallback = + conferenceRecordingStatusCallback; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("features") + public Builder features( + List features + ) { + this.features = features; + return this; + } + + public VoiceV2ConfigurationRecordingConfiguration build() { + return new VoiceV2ConfigurationRecordingConfiguration(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationRecordingConfiguration other = + (VoiceV2ConfigurationRecordingConfiguration) o; + return ( + Objects.equals(configurationType, other.configurationType) && + Objects.equals(compositionPolicy, other.compositionPolicy) && + Objects.equals( + callRecordingStatusCallback, + other.callRecordingStatusCallback + ) && + Objects.equals( + conferenceRecordingStatusCallback, + other.conferenceRecordingStatusCallback + ) && + Objects.equals(features, other.features) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationType, + compositionPolicy, + callRecordingStatusCallback, + conferenceRecordingStatusCallback, + features + ); + } + } + + /** + * Converts a JSON String into a Recording object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return Recording object represented by the provided JSON + */ + public static Recording fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Recording.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a Recording object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return Recording object represented by the provided JSON + */ + public static Recording fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Recording.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String accountSid; + + @Getter + private final VoiceV2ConfigurationRecordingConfiguration configuration; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateCreated; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateUpdated; + + @Getter + private final String description; + + @Getter + private final String id; + + @Getter + private final String uniqueName; + + @JsonCreator + private Recording( + @JsonProperty("account_sid") final String accountSid, + @JsonProperty( + "configuration" + ) final VoiceV2ConfigurationRecordingConfiguration configuration, + @JsonProperty("date_created") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateCreated, + @JsonProperty("date_updated") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateUpdated, + @JsonProperty("description") final String description, + @JsonProperty("id") final String id, + @JsonProperty("unique_name") final String uniqueName + ) { + this.accountSid = accountSid; + this.configuration = configuration; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + this.description = description; + this.id = id; + this.uniqueName = uniqueName; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Recording other = (Recording) o; + return ( + Objects.equals(accountSid, other.accountSid) && + Objects.equals(configuration, other.configuration) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(description, other.description) && + Objects.equals(id, other.id) && + Objects.equals(uniqueName, other.uniqueName) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + accountSid, + configuration, + dateCreated, + dateUpdated, + description, + id, + uniqueName + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java b/src/main/java/com/twilio/rest/voice/v2/RecordingCreator.java similarity index 67% rename from src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java rename to src/main/java/com/twilio/rest/voice/v2/RecordingCreator.java index 533ba6f236..a41f13180e 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/voice/v2/RecordingCreator.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -29,31 +29,26 @@ import com.twilio.type.*; import java.io.InputStream; -public class KnowledgeCreator extends Creator { +public class RecordingCreator extends Creator { - private Knowledge.AssistantsV1ServiceCreateKnowledgeRequest assistantsV1ServiceCreateKnowledgeRequest; + private Recording.VoiceV2ConfigurationRecordingRequest voiceV2ConfigurationRecordingRequest; - public KnowledgeCreator( - final Knowledge.AssistantsV1ServiceCreateKnowledgeRequest assistantsV1ServiceCreateKnowledgeRequest - ) { - this.assistantsV1ServiceCreateKnowledgeRequest = - assistantsV1ServiceCreateKnowledgeRequest; - } + public RecordingCreator() {} - public KnowledgeCreator setAssistantsV1ServiceCreateKnowledgeRequest( - final Knowledge.AssistantsV1ServiceCreateKnowledgeRequest assistantsV1ServiceCreateKnowledgeRequest + public RecordingCreator setVoiceV2ConfigurationRecordingRequest( + final Recording.VoiceV2ConfigurationRecordingRequest voiceV2ConfigurationRecordingRequest ) { - this.assistantsV1ServiceCreateKnowledgeRequest = - assistantsV1ServiceCreateKnowledgeRequest; + this.voiceV2ConfigurationRecordingRequest = + voiceV2ConfigurationRecordingRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge"; + String path = "/v2/Configurations/Recording"; Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +58,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Knowledge creation failed: Unable to connect to server" + "Recording creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,20 +78,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Knowledge create(final TwilioRestClient client) { + public Recording create(final TwilioRestClient client) { Response response = makeRequest(client); - return Knowledge.fromJson( + return Recording.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Knowledge content = Knowledge.fromJson( + Recording content = Recording.fromJson( response.getStream(), client.getObjectMapper() ); @@ -109,10 +104,10 @@ public TwilioResponse createWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceCreateKnowledgeRequest != null) { + if (voiceV2ConfigurationRecordingRequest != null) { request.setBody( - Knowledge.toJson( - assistantsV1ServiceCreateKnowledgeRequest, + Recording.toJson( + voiceV2ConfigurationRecordingRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeDeleter.java b/src/main/java/com/twilio/rest/voice/v2/RecordingDeleter.java similarity index 81% rename from src/main/java/com/twilio/rest/assistants/v1/KnowledgeDeleter.java rename to src/main/java/com/twilio/rest/voice/v2/RecordingDeleter.java index ab45fc9776..630fd0b7b0 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeDeleter.java +++ b/src/main/java/com/twilio/rest/voice/v2/RecordingDeleter.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.twilio.base.Deleter; import com.twilio.base.TwilioResponse; @@ -28,24 +28,27 @@ import java.io.InputStream; import java.util.function.Predicate; -public class KnowledgeDeleter extends Deleter { +public class RecordingDeleter extends Deleter { - private String pathId; + private String pathIdOrUniqueName; - public KnowledgeDeleter(final String pathId) { - this.pathId = pathId; + public RecordingDeleter(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; + String path = "/v2/Configurations/Recording/{IdOrUniqueName}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; Request request = new Request( HttpMethod.DELETE, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); @@ -53,7 +56,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Knowledge delete failed: Unable to connect to server" + "Recording delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); diff --git a/src/main/java/com/twilio/rest/voice/v2/RecordingFetcher.java b/src/main/java/com/twilio/rest/voice/v2/RecordingFetcher.java new file mode 100644 index 0000000000..c58b28c87b --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/RecordingFetcher.java @@ -0,0 +1,99 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class RecordingFetcher extends Fetcher { + + private String pathIdOrUniqueName; + + public RecordingFetcher(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/Configurations/Recording/{IdOrUniqueName}"; + + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.VOICE.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "Recording fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public Recording fetch(final TwilioRestClient client) { + Response response = makeRequest(client); + return Recording.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + Recording content = Recording.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java b/src/main/java/com/twilio/rest/voice/v2/RecordingUpdater.java similarity index 67% rename from src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java rename to src/main/java/com/twilio/rest/voice/v2/RecordingUpdater.java index 006a6aea1d..3627bfb962 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantUpdater.java +++ b/src/main/java/com/twilio/rest/voice/v2/RecordingUpdater.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; @@ -29,31 +29,34 @@ import com.twilio.type.*; import java.io.InputStream; -public class AssistantUpdater extends Updater { +public class RecordingUpdater extends Updater { - private String pathId; - private Assistant.AssistantsV1ServiceUpdateAssistantRequest assistantsV1ServiceUpdateAssistantRequest; + private String pathIdOrUniqueName; + private Recording.VoiceV2ConfigurationRecordingRequest voiceV2ConfigurationRecordingRequest; - public AssistantUpdater(final String pathId) { - this.pathId = pathId; + public RecordingUpdater(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; } - public AssistantUpdater setAssistantsV1ServiceUpdateAssistantRequest( - final Assistant.AssistantsV1ServiceUpdateAssistantRequest assistantsV1ServiceUpdateAssistantRequest + public RecordingUpdater setVoiceV2ConfigurationRecordingRequest( + final Recording.VoiceV2ConfigurationRecordingRequest voiceV2ConfigurationRecordingRequest ) { - this.assistantsV1ServiceUpdateAssistantRequest = - assistantsV1ServiceUpdateAssistantRequest; + this.voiceV2ConfigurationRecordingRequest = + voiceV2ConfigurationRecordingRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}"; + String path = "/v2/Configurations/Recording/{IdOrUniqueName}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); Request request = new Request( HttpMethod.PUT, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +66,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Assistant update failed: Unable to connect to server" + "Recording update failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,20 +86,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Assistant update(final TwilioRestClient client) { + public Recording update(final TwilioRestClient client) { Response response = makeRequest(client); - return Assistant.fromJson( + return Recording.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse updateWithResponse( + public TwilioResponse updateWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Assistant content = Assistant.fromJson( + Recording content = Recording.fromJson( response.getStream(), client.getObjectMapper() ); @@ -109,10 +112,10 @@ public TwilioResponse updateWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceUpdateAssistantRequest != null) { + if (voiceV2ConfigurationRecordingRequest != null) { request.setBody( - Assistant.toJson( - assistantsV1ServiceUpdateAssistantRequest, + Recording.toJson( + voiceV2ConfigurationRecordingRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/voice/v2/Transcription.java b/src/main/java/com/twilio/rest/voice/v2/Transcription.java new file mode 100644 index 0000000000..bf42d47019 --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/Transcription.java @@ -0,0 +1,775 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.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.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.twilio.base.Resource; +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; +import java.util.Objects; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class Transcription extends Resource { + + public static TranscriptionCreator creator() { + return new TranscriptionCreator(); + } + + public static TranscriptionDeleter deleter( + final String pathIdOrUniqueName + ) { + return new TranscriptionDeleter(pathIdOrUniqueName); + } + + public static TranscriptionFetcher fetcher( + final String pathIdOrUniqueName + ) { + return new TranscriptionFetcher(pathIdOrUniqueName); + } + + public static TranscriptionUpdater updater( + final String pathIdOrUniqueName + ) { + return new TranscriptionUpdater(pathIdOrUniqueName); + } + + public enum ConfigurationType { + TRANSCRIPTION("Transcription"); + + private final String value; + + private ConfigurationType(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static ConfigurationType forValue(final String value) { + return Promoter.enumFromString(value, ConfigurationType.values()); + } + } + + public enum Type { + CUSTOMER("CUSTOMER"), + HUMAN_AGENT("HUMAN_AGENT"), + AI_AGENT("AI_AGENT"); + + private final String value; + + private Type(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Type forValue(final String value) { + return Promoter.enumFromString(value, Type.values()); + } + } + + public enum Method { + POST("POST"); + + private final String value; + + private Method(final String value) { + this.value = value; + } + + @JsonValue + public String toString() { + return value; + } + + @JsonCreator + public static Method forValue(final String value) { + return Promoter.enumFromString(value, Method.values()); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationTranscriptionStatusCallback.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationTranscriptionStatusCallback { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + @Getter + private final String url; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("method") + @Getter + private final Transcription.Method method; + + private VoiceV2ConfigurationTranscriptionStatusCallback( + Builder builder + ) { + this.url = builder.url; + this.method = builder.method; + } + + public static Builder builder() { + return new Builder(); + } + + public static VoiceV2ConfigurationTranscriptionStatusCallback fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationTranscriptionStatusCallback.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("url") + private String url; + + @JsonProperty("method") + private Transcription.Method method; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("url") + public Builder url(String url) { + this.url = url; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("method") + public Builder method(Transcription.Method method) { + this.method = method; + return this; + } + + public VoiceV2ConfigurationTranscriptionStatusCallback build() { + return new VoiceV2ConfigurationTranscriptionStatusCallback( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationTranscriptionStatusCallback other = + (VoiceV2ConfigurationTranscriptionStatusCallback) o; + return ( + Objects.equals(url, other.url) && + Objects.equals(method, other.method) + ); + } + + @Override + public int hashCode() { + return Objects.hash(url, method); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationTranscriptionParticipantDefault.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationTranscriptionParticipantDefault { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("audioChannelIndex") + @Getter + private final Integer audioChannelIndex; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + private final Transcription.Type type; + + private VoiceV2ConfigurationTranscriptionParticipantDefault( + Builder builder + ) { + this.audioChannelIndex = builder.audioChannelIndex; + this.type = builder.type; + } + + public static Builder builder( + final Integer audioChannelIndex, + final Transcription.Type type + ) { + return new Builder(audioChannelIndex, type); + } + + public static VoiceV2ConfigurationTranscriptionParticipantDefault fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationTranscriptionParticipantDefault.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("audioChannelIndex") + private Integer audioChannelIndex; + + @JsonProperty("type") + private Transcription.Type type; + + @JsonCreator + public Builder( + @JsonProperty( + "audioChannelIndex" + ) final Integer audioChannelIndex, + @JsonProperty("type") final Transcription.Type type + ) { + this.audioChannelIndex = audioChannelIndex; + this.type = type; + } + + public VoiceV2ConfigurationTranscriptionParticipantDefault build() { + return new VoiceV2ConfigurationTranscriptionParticipantDefault( + this + ); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationTranscriptionParticipantDefault other = + (VoiceV2ConfigurationTranscriptionParticipantDefault) o; + return ( + Objects.equals(audioChannelIndex, other.audioChannelIndex) && + Objects.equals(type, other.type) + ); + } + + @Override + public int hashCode() { + return Objects.hash(audioChannelIndex, type); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationTranscriptionRequest.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationTranscriptionRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + @Getter + private final String uniqueName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + private final String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration") + @Getter + private final VoiceV2ConfigurationTranscriptionConfiguration configuration; + + private VoiceV2ConfigurationTranscriptionRequest(Builder builder) { + this.uniqueName = builder.uniqueName; + this.description = builder.description; + this.configuration = builder.configuration; + } + + public static Builder builder( + final VoiceV2ConfigurationTranscriptionConfiguration configuration + ) { + return new Builder(configuration); + } + + public static VoiceV2ConfigurationTranscriptionRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationTranscriptionRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("unique_name") + private String uniqueName; + + @JsonProperty("description") + private String description; + + @JsonProperty("configuration") + private VoiceV2ConfigurationTranscriptionConfiguration configuration; + + @JsonCreator + public Builder( + @JsonProperty( + "configuration" + ) final VoiceV2ConfigurationTranscriptionConfiguration configuration + ) { + this.configuration = configuration; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("unique_name") + public Builder uniqueName(String uniqueName) { + this.uniqueName = uniqueName; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + public Builder description(String description) { + this.description = description; + return this; + } + + public VoiceV2ConfigurationTranscriptionRequest build() { + return new VoiceV2ConfigurationTranscriptionRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationTranscriptionRequest other = + (VoiceV2ConfigurationTranscriptionRequest) o; + return ( + Objects.equals(uniqueName, other.uniqueName) && + Objects.equals(description, other.description) && + Objects.equals(configuration, other.configuration) + ); + } + + @Override + public int hashCode() { + return Objects.hash(uniqueName, description, configuration); + } + } + + @JsonDeserialize( + builder = VoiceV2ConfigurationTranscriptionConfiguration.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV2ConfigurationTranscriptionConfiguration { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configurationType") + @Getter + private final Transcription.ConfigurationType configurationType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcriptionEngine") + @Getter + private final String transcriptionEngine; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("speechModel") + @Getter + private final String speechModel; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("language") + @Getter + private final String language; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcriptionStatusCallback") + @Getter + private final VoiceV2ConfigurationTranscriptionStatusCallback transcriptionStatusCallback; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationConfigurationId") + @Getter + private final String conversationConfigurationId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("participantDefaults") + @Getter + private final List participantDefaults; + + private VoiceV2ConfigurationTranscriptionConfiguration( + Builder builder + ) { + this.configurationType = builder.configurationType; + this.transcriptionEngine = builder.transcriptionEngine; + this.speechModel = builder.speechModel; + this.language = builder.language; + this.transcriptionStatusCallback = + builder.transcriptionStatusCallback; + this.conversationConfigurationId = + builder.conversationConfigurationId; + this.participantDefaults = builder.participantDefaults; + } + + public static Builder builder( + final Transcription.ConfigurationType configurationType, + final String transcriptionEngine, + final String language, + final List participantDefaults + ) { + return new Builder( + configurationType, + transcriptionEngine, + language, + participantDefaults + ); + } + + public static VoiceV2ConfigurationTranscriptionConfiguration fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV2ConfigurationTranscriptionConfiguration.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("configurationType") + private Transcription.ConfigurationType configurationType; + + @JsonProperty("transcriptionEngine") + private String transcriptionEngine; + + @JsonProperty("speechModel") + private String speechModel; + + @JsonProperty("language") + private String language; + + @JsonProperty("transcriptionStatusCallback") + private VoiceV2ConfigurationTranscriptionStatusCallback transcriptionStatusCallback; + + @JsonProperty("conversationConfigurationId") + private String conversationConfigurationId; + + @JsonProperty("participantDefaults") + private List participantDefaults; + + @JsonCreator + public Builder( + @JsonProperty( + "configurationType" + ) final Transcription.ConfigurationType configurationType, + @JsonProperty( + "transcriptionEngine" + ) final String transcriptionEngine, + @JsonProperty("language") final String language, + @JsonProperty( + "participantDefaults" + ) final List participantDefaults + ) { + this.configurationType = configurationType; + this.transcriptionEngine = transcriptionEngine; + this.language = language; + this.participantDefaults = participantDefaults; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("speechModel") + public Builder speechModel(String speechModel) { + this.speechModel = speechModel; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcriptionStatusCallback") + public Builder transcriptionStatusCallback( + VoiceV2ConfigurationTranscriptionStatusCallback transcriptionStatusCallback + ) { + this.transcriptionStatusCallback = transcriptionStatusCallback; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("conversationConfigurationId") + public Builder conversationConfigurationId( + String conversationConfigurationId + ) { + this.conversationConfigurationId = conversationConfigurationId; + return this; + } + + public VoiceV2ConfigurationTranscriptionConfiguration build() { + return new VoiceV2ConfigurationTranscriptionConfiguration(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV2ConfigurationTranscriptionConfiguration other = + (VoiceV2ConfigurationTranscriptionConfiguration) o; + return ( + Objects.equals(configurationType, other.configurationType) && + Objects.equals( + transcriptionEngine, + other.transcriptionEngine + ) && + Objects.equals(speechModel, other.speechModel) && + Objects.equals(language, other.language) && + Objects.equals( + transcriptionStatusCallback, + other.transcriptionStatusCallback + ) && + Objects.equals( + conversationConfigurationId, + other.conversationConfigurationId + ) && + Objects.equals(participantDefaults, other.participantDefaults) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationType, + transcriptionEngine, + speechModel, + language, + transcriptionStatusCallback, + conversationConfigurationId, + participantDefaults + ); + } + } + + /** + * Converts a JSON String into a Transcription object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return Transcription object represented by the provided JSON + */ + public static Transcription fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Transcription.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a Transcription object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return Transcription object represented by the provided JSON + */ + public static Transcription fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Transcription.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException 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); + } + } + + @Getter + private final String accountSid; + + @Getter + private final VoiceV2ConfigurationTranscriptionConfiguration configuration; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateCreated; + + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) + @Getter + private final ZonedDateTime dateUpdated; + + @Getter + private final String description; + + @Getter + private final String id; + + @Getter + private final String uniqueName; + + @JsonCreator + private Transcription( + @JsonProperty("account_sid") final String accountSid, + @JsonProperty( + "configuration" + ) final VoiceV2ConfigurationTranscriptionConfiguration configuration, + @JsonProperty("date_created") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateCreated, + @JsonProperty("date_updated") @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) @JsonSerialize( + using = com.twilio.converter.ISO8601Serializer.class + ) final ZonedDateTime dateUpdated, + @JsonProperty("description") final String description, + @JsonProperty("id") final String id, + @JsonProperty("unique_name") final String uniqueName + ) { + this.accountSid = accountSid; + this.configuration = configuration; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + this.description = description; + this.id = id; + this.uniqueName = uniqueName; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Transcription other = (Transcription) o; + return ( + Objects.equals(accountSid, other.accountSid) && + Objects.equals(configuration, other.configuration) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(description, other.description) && + Objects.equals(id, other.id) && + Objects.equals(uniqueName, other.uniqueName) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + accountSid, + configuration, + dateCreated, + dateUpdated, + description, + id, + uniqueName + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java b/src/main/java/com/twilio/rest/voice/v2/TranscriptionCreator.java similarity index 67% rename from src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java rename to src/main/java/com/twilio/rest/voice/v2/TranscriptionCreator.java index dc85f094b4..300de41ee2 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantCreator.java +++ b/src/main/java/com/twilio/rest/voice/v2/TranscriptionCreator.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -29,31 +29,26 @@ import com.twilio.type.*; import java.io.InputStream; -public class AssistantCreator extends Creator { +public class TranscriptionCreator extends Creator { - private Assistant.AssistantsV1ServiceCreateAssistantRequest assistantsV1ServiceCreateAssistantRequest; + private Transcription.VoiceV2ConfigurationTranscriptionRequest voiceV2ConfigurationTranscriptionRequest; - public AssistantCreator( - final Assistant.AssistantsV1ServiceCreateAssistantRequest assistantsV1ServiceCreateAssistantRequest - ) { - this.assistantsV1ServiceCreateAssistantRequest = - assistantsV1ServiceCreateAssistantRequest; - } + public TranscriptionCreator() {} - public AssistantCreator setAssistantsV1ServiceCreateAssistantRequest( - final Assistant.AssistantsV1ServiceCreateAssistantRequest assistantsV1ServiceCreateAssistantRequest + public TranscriptionCreator setVoiceV2ConfigurationTranscriptionRequest( + final Transcription.VoiceV2ConfigurationTranscriptionRequest voiceV2ConfigurationTranscriptionRequest ) { - this.assistantsV1ServiceCreateAssistantRequest = - assistantsV1ServiceCreateAssistantRequest; + this.voiceV2ConfigurationTranscriptionRequest = + voiceV2ConfigurationTranscriptionRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants"; + String path = "/v2/Configurations/Transcription"; Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +58,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Assistant creation failed: Unable to connect to server" + "Transcription creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,20 +78,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Assistant create(final TwilioRestClient client) { + public Transcription create(final TwilioRestClient client) { Response response = makeRequest(client); - return Assistant.fromJson( + return Transcription.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Assistant content = Assistant.fromJson( + Transcription content = Transcription.fromJson( response.getStream(), client.getObjectMapper() ); @@ -109,10 +104,10 @@ public TwilioResponse createWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceCreateAssistantRequest != null) { + if (voiceV2ConfigurationTranscriptionRequest != null) { request.setBody( - Assistant.toJson( - assistantsV1ServiceCreateAssistantRequest, + Transcription.toJson( + voiceV2ConfigurationTranscriptionRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/AssistantDeleter.java b/src/main/java/com/twilio/rest/voice/v2/TranscriptionDeleter.java similarity index 80% rename from src/main/java/com/twilio/rest/assistants/v1/AssistantDeleter.java rename to src/main/java/com/twilio/rest/voice/v2/TranscriptionDeleter.java index db415a8b47..fd3e26703d 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/AssistantDeleter.java +++ b/src/main/java/com/twilio/rest/voice/v2/TranscriptionDeleter.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.twilio.base.Deleter; import com.twilio.base.TwilioResponse; @@ -28,24 +28,27 @@ import java.io.InputStream; import java.util.function.Predicate; -public class AssistantDeleter extends Deleter { +public class TranscriptionDeleter extends Deleter { - private String pathId; + private String pathIdOrUniqueName; - public AssistantDeleter(final String pathId) { - this.pathId = pathId; + public TranscriptionDeleter(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{id}"; + String path = "/v2/Configurations/Transcription/{IdOrUniqueName}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; Request request = new Request( HttpMethod.DELETE, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); @@ -53,7 +56,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Assistant delete failed: Unable to connect to server" + "Transcription delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); diff --git a/src/main/java/com/twilio/rest/voice/v2/TranscriptionFetcher.java b/src/main/java/com/twilio/rest/voice/v2/TranscriptionFetcher.java new file mode 100644 index 0000000000..b94ccf76c6 --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/TranscriptionFetcher.java @@ -0,0 +1,99 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class TranscriptionFetcher extends Fetcher { + + private String pathIdOrUniqueName; + + public TranscriptionFetcher(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/Configurations/Transcription/{IdOrUniqueName}"; + + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.VOICE.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "Transcription fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public Transcription fetch(final TwilioRestClient client) { + Response response = makeRequest(client); + return Transcription.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + Transcription content = Transcription.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java b/src/main/java/com/twilio/rest/voice/v2/TranscriptionUpdater.java similarity index 65% rename from src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java rename to src/main/java/com/twilio/rest/voice/v2/TranscriptionUpdater.java index 040d4c9d2c..f6be3f1dab 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/KnowledgeUpdater.java +++ b/src/main/java/com/twilio/rest/voice/v2/TranscriptionUpdater.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.TwilioResponse; @@ -29,31 +29,34 @@ import com.twilio.type.*; import java.io.InputStream; -public class KnowledgeUpdater extends Updater { +public class TranscriptionUpdater extends Updater { - private String pathId; - private Knowledge.AssistantsV1ServiceUpdateKnowledgeRequest assistantsV1ServiceUpdateKnowledgeRequest; + private String pathIdOrUniqueName; + private Transcription.VoiceV2ConfigurationTranscriptionRequest voiceV2ConfigurationTranscriptionRequest; - public KnowledgeUpdater(final String pathId) { - this.pathId = pathId; + public TranscriptionUpdater(final String pathIdOrUniqueName) { + this.pathIdOrUniqueName = pathIdOrUniqueName; } - public KnowledgeUpdater setAssistantsV1ServiceUpdateKnowledgeRequest( - final Knowledge.AssistantsV1ServiceUpdateKnowledgeRequest assistantsV1ServiceUpdateKnowledgeRequest + public TranscriptionUpdater setVoiceV2ConfigurationTranscriptionRequest( + final Transcription.VoiceV2ConfigurationTranscriptionRequest voiceV2ConfigurationTranscriptionRequest ) { - this.assistantsV1ServiceUpdateKnowledgeRequest = - assistantsV1ServiceUpdateKnowledgeRequest; + this.voiceV2ConfigurationTranscriptionRequest = + voiceV2ConfigurationTranscriptionRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; + String path = "/v2/Configurations/Transcription/{IdOrUniqueName}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); Request request = new Request( HttpMethod.PUT, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +66,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Knowledge update failed: Unable to connect to server" + "Transcription update failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,20 +86,20 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Knowledge update(final TwilioRestClient client) { + public Transcription update(final TwilioRestClient client) { Response response = makeRequest(client); - return Knowledge.fromJson( + return Transcription.fromJson( response.getStream(), client.getObjectMapper() ); } @Override - public TwilioResponse updateWithResponse( + public TwilioResponse updateWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Knowledge content = Knowledge.fromJson( + Transcription content = Transcription.fromJson( response.getStream(), client.getObjectMapper() ); @@ -109,10 +112,10 @@ public TwilioResponse updateWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceUpdateKnowledgeRequest != null) { + if (voiceV2ConfigurationTranscriptionRequest != null) { request.setBody( - Knowledge.toJson( - assistantsV1ServiceUpdateKnowledgeRequest, + Transcription.toJson( + voiceV2ConfigurationTranscriptionRequest, objectMapper ) ); diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java b/src/main/java/com/twilio/rest/voice/v2/Type.java similarity index 56% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java rename to src/main/java/com/twilio/rest/voice/v2/Type.java index 7e35ca453e..a4e0f26433 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/Feedback.java +++ b/src/main/java/com/twilio/rest/voice/v2/Type.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.voice.v2; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -42,113 +42,106 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class Feedback extends Resource { +public class Type extends Resource { - public static FeedbackCreator creator( - final String pathId, - final Feedback.AssistantsV1ServiceCreateFeedbackRequest assistantsV1ServiceCreateFeedbackRequest + public static TypeDeleter deleter( + final String pathType, + final String pathIdOrUniqueName ) { - return new FeedbackCreator( - pathId, - assistantsV1ServiceCreateFeedbackRequest - ); + return new TypeDeleter(pathType, pathIdOrUniqueName); } - public static FeedbackReader reader(final String pathId) { - return new FeedbackReader(pathId); + public static TypeFetcher fetcher( + final String pathType, + final String pathIdOrUniqueName + ) { + return new TypeFetcher(pathType, pathIdOrUniqueName); + } + + public static TypeUpdater updater( + final String pathType, + final String pathIdOrUniqueName + ) { + return new TypeUpdater(pathType, pathIdOrUniqueName); } - @JsonDeserialize( - builder = AssistantsV1ServiceCreateFeedbackRequest.Builder.class - ) + @JsonDeserialize(builder = VoiceV2ConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString - public static class AssistantsV1ServiceCreateFeedbackRequest { + public static class VoiceV2ConfigurationRequest { @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("message_id") + @JsonProperty("unique_name") @Getter - private final String messageId; + private final String uniqueName; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("score") + @JsonProperty("description") @Getter - private final Float score; + private final String description; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("session_id") + @JsonProperty("configuration") @Getter - private final String sessionId; + private final Object configuration; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") - @Getter - private final String text; - - private AssistantsV1ServiceCreateFeedbackRequest(Builder builder) { - this.messageId = builder.messageId; - this.score = builder.score; - this.sessionId = builder.sessionId; - this.text = builder.text; + private VoiceV2ConfigurationRequest(Builder builder) { + this.uniqueName = builder.uniqueName; + this.description = builder.description; + this.configuration = builder.configuration; } - public static Builder builder(final String sessionId) { - return new Builder(sessionId); + public static Builder builder() { + return new Builder(); } - public static AssistantsV1ServiceCreateFeedbackRequest fromJson( + public static VoiceV2ConfigurationRequest fromJson( String jsonString, ObjectMapper mapper ) throws IOException { return mapper.readValue( jsonString, - AssistantsV1ServiceCreateFeedbackRequest.class + VoiceV2ConfigurationRequest.class ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonProperty("message_id") - private String messageId; + @JsonProperty("unique_name") + private String uniqueName; - @JsonProperty("score") - private Float score; + @JsonProperty("description") + private String description; - @JsonProperty("session_id") - private String sessionId; - - @JsonProperty("text") - private String text; - - @JsonCreator - public Builder(@JsonProperty("session_id") final String sessionId) { - this.sessionId = sessionId; - } + @JsonProperty("configuration") + private Object configuration; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("message_id") - public Builder messageId(String messageId) { - this.messageId = messageId; + @JsonProperty("unique_name") + public Builder uniqueName(String uniqueName) { + this.uniqueName = uniqueName; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("score") - public Builder score(Float score) { - this.score = score; + @JsonProperty("description") + public Builder description(String description) { + this.description = description; return this; } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("text") - public Builder text(String text) { - this.text = text; + @JsonProperty("configuration") + public Builder configuration(Object configuration) { + this.configuration = configuration; return this; } - public AssistantsV1ServiceCreateFeedbackRequest build() { - return new AssistantsV1ServiceCreateFeedbackRequest(this); + public VoiceV2ConfigurationRequest build() { + return new VoiceV2ConfigurationRequest(this); } } @@ -162,36 +155,34 @@ public boolean equals(final Object o) { return false; } - AssistantsV1ServiceCreateFeedbackRequest other = - (AssistantsV1ServiceCreateFeedbackRequest) o; + VoiceV2ConfigurationRequest other = (VoiceV2ConfigurationRequest) o; return ( - Objects.equals(messageId, other.messageId) && - Objects.equals(score, other.score) && - Objects.equals(sessionId, other.sessionId) && - Objects.equals(text, other.text) + Objects.equals(uniqueName, other.uniqueName) && + Objects.equals(description, other.description) && + Objects.equals(configuration, other.configuration) ); } @Override public int hashCode() { - return Objects.hash(messageId, score, sessionId, text); + return Objects.hash(uniqueName, description, configuration); } } /** - * Converts a JSON String into a Feedback object using the provided ObjectMapper. + * Converts a JSON String into a Type object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return Feedback object represented by the provided JSON + * @return Type object represented by the provided JSON */ - public static Feedback fromJson( + public static Type fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Feedback.class); + return objectMapper.readValue(json, Type.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -200,20 +191,20 @@ public static Feedback fromJson( } /** - * Converts a JSON InputStream into a Feedback object using the provided + * Converts a JSON InputStream into a Type object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return Feedback object represented by the provided JSON + * @return Type object represented by the provided JSON */ - public static Feedback fromJson( + public static Type fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, Feedback.class); + return objectMapper.readValue(json, Type.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -237,7 +228,7 @@ public static String toJson(Object object, ObjectMapper mapper) { private final String accountSid; @Getter - private final String assistantId; + private final Object configuration; @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter @@ -248,27 +239,18 @@ public static String toJson(Object object, ObjectMapper mapper) { private final ZonedDateTime dateUpdated; @Getter - private final String id; + private final String description; @Getter - private final String messageId; - - @Getter - private final Float score; - - @Getter - private final String sessionId; - - @Getter - private final String text; + private final String id; @Getter - private final String userSid; + private final String uniqueName; @JsonCreator - private Feedback( + private Type( @JsonProperty("account_sid") final String accountSid, - @JsonProperty("assistant_id") final String assistantId, + @JsonProperty("configuration") final Object configuration, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( @@ -279,23 +261,17 @@ private Feedback( ) @JsonSerialize( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, + @JsonProperty("description") final String description, @JsonProperty("id") final String id, - @JsonProperty("message_id") final String messageId, - @JsonProperty("score") final Float score, - @JsonProperty("session_id") final String sessionId, - @JsonProperty("text") final String text, - @JsonProperty("user_sid") final String userSid + @JsonProperty("unique_name") final String uniqueName ) { this.accountSid = accountSid; - this.assistantId = assistantId; + this.configuration = configuration; this.dateCreated = dateCreated; this.dateUpdated = dateUpdated; + this.description = description; this.id = id; - this.messageId = messageId; - this.score = score; - this.sessionId = sessionId; - this.text = text; - this.userSid = userSid; + this.uniqueName = uniqueName; } @Override @@ -308,18 +284,15 @@ public boolean equals(final Object o) { return false; } - Feedback other = (Feedback) o; + Type other = (Type) o; return ( Objects.equals(accountSid, other.accountSid) && - Objects.equals(assistantId, other.assistantId) && + Objects.equals(configuration, other.configuration) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(description, other.description) && Objects.equals(id, other.id) && - Objects.equals(messageId, other.messageId) && - Objects.equals(score, other.score) && - Objects.equals(sessionId, other.sessionId) && - Objects.equals(text, other.text) && - Objects.equals(userSid, other.userSid) + Objects.equals(uniqueName, other.uniqueName) ); } @@ -327,15 +300,12 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, - assistantId, + configuration, dateCreated, dateUpdated, + description, id, - messageId, - score, - sessionId, - text, - userSid + uniqueName ); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolDeleter.java b/src/main/java/com/twilio/rest/voice/v2/TypeDeleter.java similarity index 76% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolDeleter.java rename to src/main/java/com/twilio/rest/voice/v2/TypeDeleter.java index 554756229b..a6ce581f06 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsToolDeleter.java +++ b/src/main/java/com/twilio/rest/voice/v2/TypeDeleter.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.voice.v2; import com.twilio.base.Deleter; import com.twilio.base.TwilioResponse; @@ -28,34 +28,30 @@ import java.io.InputStream; import java.util.function.Predicate; -public class AssistantsToolDeleter extends Deleter { +public class TypeDeleter extends Deleter { - private String pathAssistantId; - private String pathId; + private String pathType; + private String pathIdOrUniqueName; - public AssistantsToolDeleter( - final String pathAssistantId, - final String pathId - ) { - this.pathAssistantId = pathAssistantId; - this.pathId = pathId; + public TypeDeleter(final String pathType, final String pathIdOrUniqueName) { + this.pathType = pathType; + this.pathIdOrUniqueName = pathIdOrUniqueName; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Assistants/{assistantId}/Tools/{id}"; + String path = "/v2/Configurations/{Type}/{IdOrUniqueName}"; - path = - path.replace( - "{" + "assistantId" + "}", - this.pathAssistantId.toString() - ); - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Type" + "}", this.pathType.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); Predicate deleteStatuses = i -> i != null && i >= 200 && i < 300; Request request = new Request( HttpMethod.DELETE, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); @@ -63,7 +59,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "AssistantsTool delete failed: Unable to connect to server" + "Type delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); diff --git a/src/main/java/com/twilio/rest/voice/v2/TypeFetcher.java b/src/main/java/com/twilio/rest/voice/v2/TypeFetcher.java new file mode 100644 index 0000000000..17bcdddf9d --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/TypeFetcher.java @@ -0,0 +1,99 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.twilio.base.Fetcher; +import com.twilio.base.TwilioResponse; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class TypeFetcher extends Fetcher { + + private String pathType; + private String pathIdOrUniqueName; + + public TypeFetcher(final String pathType, final String pathIdOrUniqueName) { + this.pathType = pathType; + this.pathIdOrUniqueName = pathIdOrUniqueName; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/Configurations/{Type}/{IdOrUniqueName}"; + + path = path.replace("{" + "Type" + "}", this.pathType.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); + + Request request = new Request( + HttpMethod.GET, + Domains.VOICE.toString(), + path + ); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "Type fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public Type fetch(final TwilioRestClient client) { + Response response = makeRequest(client); + return Type.fromJson(response.getStream(), client.getObjectMapper()); + } + + @Override + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + Type content = Type.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } +} diff --git a/src/main/java/com/twilio/rest/voice/v2/TypeUpdater.java b/src/main/java/com/twilio/rest/voice/v2/TypeUpdater.java new file mode 100644 index 0000000000..8561cbfbf1 --- /dev/null +++ b/src/main/java/com/twilio/rest/voice/v2/TypeUpdater.java @@ -0,0 +1,120 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio API definition for public-api voice + * Powers Twilio public-api voice + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.voice.v2; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.TwilioResponse; +import com.twilio.base.Updater; +import com.twilio.constant.EnumConstants; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; +import com.twilio.type.*; +import java.io.InputStream; + +public class TypeUpdater extends Updater { + + private String pathType; + private String pathIdOrUniqueName; + private Type.VoiceV2ConfigurationRequest voiceV2ConfigurationRequest; + + public TypeUpdater(final String pathType, final String pathIdOrUniqueName) { + this.pathType = pathType; + this.pathIdOrUniqueName = pathIdOrUniqueName; + } + + public TypeUpdater setVoiceV2ConfigurationRequest( + final Type.VoiceV2ConfigurationRequest voiceV2ConfigurationRequest + ) { + this.voiceV2ConfigurationRequest = voiceV2ConfigurationRequest; + return this; + } + + private Response makeRequest(final TwilioRestClient client) { + String path = "/v2/Configurations/{Type}/{IdOrUniqueName}"; + + path = path.replace("{" + "Type" + "}", this.pathType.toString()); + path = path.replace( + "{" + "IdOrUniqueName" + "}", + this.pathIdOrUniqueName.toString() + ); + + Request request = new Request( + HttpMethod.PUT, + Domains.VOICE.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); + + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "Type update failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + InputStream inputStream = response.getStream(); + RestException restException = RestException.fromJson( + inputStream, + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response; + } + + @Override + public Type update(final TwilioRestClient client) { + Response response = makeRequest(client); + return Type.fromJson(response.getStream(), client.getObjectMapper()); + } + + @Override + public TwilioResponse updateWithResponse( + final TwilioRestClient client + ) { + Response response = makeRequest(client); + Type content = Type.fromJson( + response.getStream(), + client.getObjectMapper() + ); + return new TwilioResponse<>( + content, + response.getStatusCode(), + response.getHeaders() + ); + } + + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (voiceV2ConfigurationRequest != null) { + request.setBody( + Type.toJson(voiceV2ConfigurationRequest, objectMapper) + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java b/src/main/java/com/twilio/rest/voice/v2/configuration/Default.java similarity index 58% rename from src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java rename to src/main/java/com/twilio/rest/voice/v2/configuration/Default.java index b252dcd470..793e887211 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/assistant/AssistantsTool.java +++ b/src/main/java/com/twilio/rest/voice/v2/configuration/Default.java @@ -4,18 +4,19 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1.assistant; +package com.twilio.rest.voice.v2.configuration; import com.fasterxml.jackson.annotation.JsonCreator; 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; @@ -23,6 +24,7 @@ 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.fasterxml.jackson.databind.annotation.JsonSerialize; import com.twilio.base.Resource; import com.twilio.base.Resource; @@ -34,45 +36,104 @@ import java.io.InputStream; import java.time.ZonedDateTime; import java.util.Objects; +import lombok.Builder; import lombok.Getter; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class AssistantsTool extends Resource { +public class Default extends Resource { - public static AssistantsToolCreator creator( - final String pathAssistantId, - final String pathId - ) { - return new AssistantsToolCreator(pathAssistantId, pathId); + public static DefaultCreator creator(final String pathType) { + return new DefaultCreator(pathType); } - public static AssistantsToolDeleter deleter( - final String pathAssistantId, - final String pathId - ) { - return new AssistantsToolDeleter(pathAssistantId, pathId); + public static DefaultFetcher fetcher(final String pathType) { + return new DefaultFetcher(pathType); } - public static AssistantsToolReader reader(final String pathAssistantId) { - return new AssistantsToolReader(pathAssistantId); + @JsonDeserialize(builder = DefaultConfigurationRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class DefaultConfigurationRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration_id") + @Getter + private final String configurationId; + + private DefaultConfigurationRequest(Builder builder) { + this.configurationId = builder.configurationId; + } + + public static Builder builder() { + return new Builder(); + } + + public static DefaultConfigurationRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + DefaultConfigurationRequest.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("configuration_id") + private String configurationId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("configuration_id") + public Builder configurationId(String configurationId) { + this.configurationId = configurationId; + return this; + } + + public DefaultConfigurationRequest build() { + return new DefaultConfigurationRequest(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + DefaultConfigurationRequest other = (DefaultConfigurationRequest) o; + return Objects.equals(configurationId, other.configurationId); + } + + @Override + public int hashCode() { + return Objects.hash(configurationId); + } } /** - * Converts a JSON String into a AssistantsTool object using the provided ObjectMapper. + * Converts a JSON String into a Default object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return AssistantsTool object represented by the provided JSON + * @return Default object represented by the provided JSON */ - public static AssistantsTool fromJson( + public static Default fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AssistantsTool.class); + return objectMapper.readValue(json, Default.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -81,20 +142,20 @@ public static AssistantsTool fromJson( } /** - * Converts a JSON InputStream into a AssistantsTool object using the provided + * Converts a JSON InputStream into a Default object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return AssistantsTool object represented by the provided JSON + * @return Default object represented by the provided JSON */ - public static AssistantsTool fromJson( + public static Default fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AssistantsTool.class); + return objectMapper.readValue(json, Default.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -117,6 +178,9 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String accountSid; + @Getter + private final Object configuration; + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @Getter private final ZonedDateTime dateCreated; @@ -128,30 +192,16 @@ public static String toJson(Object object, ObjectMapper mapper) { @Getter private final String description; - @Getter - private final Boolean enabled; - @Getter private final String id; @Getter - private final Object meta; - - @Getter - private final String name; - - @Getter - private final Boolean requiresAuth; - - @Getter - private final String type; - - @Getter - private final String url; + private final String uniqueName; @JsonCreator - private AssistantsTool( + private Default( @JsonProperty("account_sid") final String accountSid, + @JsonProperty("configuration") final Object configuration, @JsonProperty("date_created") @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize( @@ -163,25 +213,16 @@ private AssistantsTool( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, @JsonProperty("description") final String description, - @JsonProperty("enabled") final Boolean enabled, @JsonProperty("id") final String id, - @JsonProperty("meta") final Object meta, - @JsonProperty("name") final String name, - @JsonProperty("requires_auth") final Boolean requiresAuth, - @JsonProperty("type") final String type, - @JsonProperty("url") final String url + @JsonProperty("unique_name") final String uniqueName ) { this.accountSid = accountSid; + this.configuration = configuration; this.dateCreated = dateCreated; this.dateUpdated = dateUpdated; this.description = description; - this.enabled = enabled; this.id = id; - this.meta = meta; - this.name = name; - this.requiresAuth = requiresAuth; - this.type = type; - this.url = url; + this.uniqueName = uniqueName; } @Override @@ -194,19 +235,15 @@ public boolean equals(final Object o) { return false; } - AssistantsTool other = (AssistantsTool) o; + Default other = (Default) o; return ( Objects.equals(accountSid, other.accountSid) && + Objects.equals(configuration, other.configuration) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(description, other.description) && - Objects.equals(enabled, other.enabled) && Objects.equals(id, other.id) && - Objects.equals(meta, other.meta) && - Objects.equals(name, other.name) && - Objects.equals(requiresAuth, other.requiresAuth) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) + Objects.equals(uniqueName, other.uniqueName) ); } @@ -214,16 +251,12 @@ public boolean equals(final Object o) { public int hashCode() { return Objects.hash( accountSid, + configuration, dateCreated, dateUpdated, description, - enabled, id, - meta, - name, - requiresAuth, - type, - url + uniqueName ); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java b/src/main/java/com/twilio/rest/voice/v2/configuration/DefaultCreator.java similarity index 68% rename from src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java rename to src/main/java/com/twilio/rest/voice/v2/configuration/DefaultCreator.java index 7b8f27eb2c..a6dd0ce62a 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/ToolCreator.java +++ b/src/main/java/com/twilio/rest/voice/v2/configuration/DefaultCreator.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2.configuration; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -29,31 +29,30 @@ import com.twilio.type.*; import java.io.InputStream; -public class ToolCreator extends Creator { +public class DefaultCreator extends Creator { - private Tool.AssistantsV1ServiceCreateToolRequest assistantsV1ServiceCreateToolRequest; + private String pathType; + private Default.DefaultConfigurationRequest defaultConfigurationRequest; - public ToolCreator( - final Tool.AssistantsV1ServiceCreateToolRequest assistantsV1ServiceCreateToolRequest - ) { - this.assistantsV1ServiceCreateToolRequest = - assistantsV1ServiceCreateToolRequest; + public DefaultCreator(final String pathType) { + this.pathType = pathType; } - public ToolCreator setAssistantsV1ServiceCreateToolRequest( - final Tool.AssistantsV1ServiceCreateToolRequest assistantsV1ServiceCreateToolRequest + public DefaultCreator setDefaultConfigurationRequest( + final Default.DefaultConfigurationRequest defaultConfigurationRequest ) { - this.assistantsV1ServiceCreateToolRequest = - assistantsV1ServiceCreateToolRequest; + this.defaultConfigurationRequest = defaultConfigurationRequest; return this; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Tools"; + String path = "/v2/Configurations/{Type}/Default"; + + path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( HttpMethod.POST, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -63,7 +62,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Tool creation failed: Unable to connect to server" + "Default creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -83,17 +82,17 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Tool create(final TwilioRestClient client) { + public Default create(final TwilioRestClient client) { Response response = makeRequest(client); - return Tool.fromJson(response.getStream(), client.getObjectMapper()); + return Default.fromJson(response.getStream(), client.getObjectMapper()); } @Override - public TwilioResponse createWithResponse( + public TwilioResponse createWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Tool content = Tool.fromJson( + Default content = Default.fromJson( response.getStream(), client.getObjectMapper() ); @@ -106,9 +105,9 @@ public TwilioResponse createWithResponse( private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (assistantsV1ServiceCreateToolRequest != null) { + if (defaultConfigurationRequest != null) { request.setBody( - Tool.toJson(assistantsV1ServiceCreateToolRequest, objectMapper) + Default.toJson(defaultConfigurationRequest, objectMapper) ); } } diff --git a/src/main/java/com/twilio/rest/assistants/v1/SessionFetcher.java b/src/main/java/com/twilio/rest/voice/v2/configuration/DefaultFetcher.java similarity index 74% rename from src/main/java/com/twilio/rest/assistants/v1/SessionFetcher.java rename to src/main/java/com/twilio/rest/voice/v2/configuration/DefaultFetcher.java index 06b6f7fd7c..2be6b71db3 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/SessionFetcher.java +++ b/src/main/java/com/twilio/rest/voice/v2/configuration/DefaultFetcher.java @@ -4,15 +4,15 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v2.configuration; import com.twilio.base.Fetcher; import com.twilio.base.TwilioResponse; @@ -27,22 +27,22 @@ import com.twilio.type.*; import java.io.InputStream; -public class SessionFetcher extends Fetcher { +public class DefaultFetcher extends Fetcher { - private String pathId; + private String pathType; - public SessionFetcher(final String pathId) { - this.pathId = pathId; + public DefaultFetcher(final String pathType) { + this.pathType = pathType; } private Response makeRequest(final TwilioRestClient client) { - String path = "/v1/Sessions/{id}"; + String path = "/v2/Configurations/{Type}/Default"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Type" + "}", this.pathType.toString()); Request request = new Request( HttpMethod.GET, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); @@ -50,7 +50,7 @@ private Response makeRequest(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Session fetch failed: Unable to connect to server" + "Default fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); @@ -70,17 +70,17 @@ private Response makeRequest(final TwilioRestClient client) { } @Override - public Session fetch(final TwilioRestClient client) { + public Default fetch(final TwilioRestClient client) { Response response = makeRequest(client); - return Session.fromJson(response.getStream(), client.getObjectMapper()); + return Default.fromJson(response.getStream(), client.getObjectMapper()); } @Override - public TwilioResponse fetchWithResponse( + public TwilioResponse fetchWithResponse( final TwilioRestClient client ) { Response response = makeRequest(client); - Session content = Session.fromJson( + Default content = Default.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/voice/v3/Transcription.java b/src/main/java/com/twilio/rest/voice/v3/Transcription.java index 71e515e96e..9fbc96744c 100644 --- a/src/main/java/com/twilio/rest/voice/v3/Transcription.java +++ b/src/main/java/com/twilio/rest/voice/v3/Transcription.java @@ -146,7 +146,7 @@ public boolean equals(final Object o) { return false; } UpdateTranscriptionResponse other = (UpdateTranscriptionResponse) o; - return (true); + return true; } @Override @@ -200,8 +200,86 @@ public int hashCode() { @JsonIgnoreProperties(ignoreUnknown = true) public static class ListTranscriptionResponse extends Resource { + @Getter + private final String accountId; + + @Getter + private final ZonedDateTime audioStartedAt; + + @Getter + private final String conversationId; + + @Getter + private final ZonedDateTime createdAt; + + @Getter + private final Integer duration; + + @Getter + private final String id; + + @Getter + private final URI mediaUrl; + + @Getter + private final List participants; + + @Getter + private final VoiceV3TranscriptionResolvedConfiguration resolvedConfiguration; + + @Getter + private final String sourceId; + + @Getter + private final Transcription.Status status; + + @Getter + private final String transcriptionConfigurationId; + + @Getter + private final ZonedDateTime updatedAt; + + @Getter + private final URI url; + @JsonCreator - private ListTranscriptionResponse() {} + private ListTranscriptionResponse( + @JsonProperty("accountId") final String accountId, + @JsonProperty("audioStartedAt") final ZonedDateTime audioStartedAt, + @JsonProperty("conversationId") final String conversationId, + @JsonProperty("createdAt") final ZonedDateTime createdAt, + @JsonProperty("duration") final Integer duration, + @JsonProperty("id") final String id, + @JsonProperty("mediaUrl") final URI mediaUrl, + @JsonProperty( + "participants" + ) final List participants, + @JsonProperty( + "resolvedConfiguration" + ) final VoiceV3TranscriptionResolvedConfiguration resolvedConfiguration, + @JsonProperty("sourceId") final String sourceId, + @JsonProperty("status") final Transcription.Status status, + @JsonProperty( + "transcriptionConfigurationId" + ) final String transcriptionConfigurationId, + @JsonProperty("updatedAt") final ZonedDateTime updatedAt, + @JsonProperty("url") final URI url + ) { + this.accountId = accountId; + this.audioStartedAt = audioStartedAt; + this.conversationId = conversationId; + this.createdAt = createdAt; + this.duration = duration; + this.id = id; + this.mediaUrl = mediaUrl; + this.participants = participants; + this.resolvedConfiguration = resolvedConfiguration; + this.sourceId = sourceId; + this.status = status; + this.transcriptionConfigurationId = transcriptionConfigurationId; + this.updatedAt = updatedAt; + this.url = url; + } public static ListTranscriptionResponse fromJson( final InputStream json, @@ -230,12 +308,48 @@ public boolean equals(final Object o) { return false; } ListTranscriptionResponse other = (ListTranscriptionResponse) o; - return (true); + return ( + Objects.equals(accountId, other.accountId) && + Objects.equals(audioStartedAt, other.audioStartedAt) && + Objects.equals(conversationId, other.conversationId) && + Objects.equals(createdAt, other.createdAt) && + Objects.equals(duration, other.duration) && + Objects.equals(id, other.id) && + Objects.equals(mediaUrl, other.mediaUrl) && + Objects.equals(participants, other.participants) && + Objects.equals( + resolvedConfiguration, + other.resolvedConfiguration + ) && + Objects.equals(sourceId, other.sourceId) && + Objects.equals(status, other.status) && + Objects.equals( + transcriptionConfigurationId, + other.transcriptionConfigurationId + ) && + Objects.equals(updatedAt, other.updatedAt) && + Objects.equals(url, other.url) + ); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash( + accountId, + audioStartedAt, + conversationId, + createdAt, + duration, + id, + mediaUrl, + participants, + resolvedConfiguration, + sourceId, + status, + transcriptionConfigurationId, + updatedAt, + url + ); } } @@ -364,6 +478,10 @@ public static TranscriptionFetcher fetcher( return new TranscriptionFetcher(pathTranscriptionId); } + public static TranscriptionReader reader() { + return new TranscriptionReader(); + } + public enum Status { PENDING("PENDING"), RUNNING("RUNNING"), @@ -388,7 +506,8 @@ public static Status forValue(final String value) { } public enum InputSource { - SOURCE_ID("SOURCE_ID"); + SOURCE_ID("SOURCE_ID"), + MEDIA_URL("MEDIA_URL"); private final String value; @@ -470,6 +589,7 @@ public static Method forValue(final String value) { } @JsonDeserialize(builder = VoiceV3TranscriptionParticipant.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceV3TranscriptionParticipant { @@ -515,6 +635,7 @@ public static VoiceV3TranscriptionParticipant fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -594,6 +715,7 @@ public int hashCode() { @JsonDeserialize( builder = VoiceV3TranscriptionTranscriptionStatusCallback.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceV3TranscriptionTranscriptionStatusCallback { @@ -635,6 +757,7 @@ public static VoiceV3TranscriptionTranscriptionStatusCallback fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -703,6 +826,7 @@ public int hashCode() { @JsonDeserialize( builder = VoiceV3TranscriptionResolvedConfiguration.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceV3TranscriptionResolvedConfiguration { @@ -735,9 +859,7 @@ public static class VoiceV3TranscriptionResolvedConfiguration { @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participantDefaults") @Getter - private final List< - VoiceV3TranscriptionResolvedConfigurationParticipantDefaults - > participantDefaults; + private final List participantDefaults; private VoiceV3TranscriptionResolvedConfiguration(Builder builder) { this.transcriptionEngine = builder.transcriptionEngine; @@ -764,6 +886,7 @@ public static VoiceV3TranscriptionResolvedConfiguration fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -783,9 +906,7 @@ public static class Builder { private String conversationConfigurationId; @JsonProperty("participantDefaults") - private List< - VoiceV3TranscriptionResolvedConfigurationParticipantDefaults - > participantDefaults; + private List participantDefaults; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("transcriptionEngine") @@ -829,9 +950,7 @@ public Builder conversationConfigurationId( @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participantDefaults") public Builder participantDefaults( - List< - VoiceV3TranscriptionResolvedConfigurationParticipantDefaults - > participantDefaults + List participantDefaults ) { this.participantDefaults = participantDefaults; return this; @@ -887,16 +1006,15 @@ public int hashCode() { } @JsonDeserialize(builder = CreateV3TranscriptionsRequest.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class CreateV3TranscriptionsRequest { - @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("audioStartedAt") + @JsonProperty("transcriptionConfigurationId") @Getter - private final ZonedDateTime audioStartedAt; + private final String transcriptionConfigurationId; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("inputSource") @@ -904,9 +1022,9 @@ public static class CreateV3TranscriptionsRequest { private final Transcription.InputSource inputSource; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("mediaUrl") + @JsonProperty("sourceId") @Getter - private final URI mediaUrl; + private final String sourceId; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("participants") @@ -914,23 +1032,25 @@ public static class CreateV3TranscriptionsRequest { private final List participants; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("sourceId") + @JsonProperty("mediaUrl") @Getter - private final String sourceId; + private final URI mediaUrl; + @JsonDeserialize(using = com.twilio.converter.ISO8601Deserializer.class) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcriptionConfigurationId") + @JsonProperty("audioStartedAt") @Getter - private final String transcriptionConfigurationId; + private final ZonedDateTime audioStartedAt; private CreateV3TranscriptionsRequest(Builder builder) { - this.audioStartedAt = builder.audioStartedAt; - this.inputSource = builder.inputSource; - this.mediaUrl = builder.mediaUrl; - this.participants = builder.participants; - this.sourceId = builder.sourceId; this.transcriptionConfigurationId = builder.transcriptionConfigurationId; + this.inputSource = builder.inputSource; + this.sourceId = builder.sourceId; + this.participants = builder.participants; + this.mediaUrl = builder.mediaUrl; + this.audioStartedAt = builder.audioStartedAt; } public static Builder builder() { @@ -947,39 +1067,39 @@ public static CreateV3TranscriptionsRequest fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { - @JsonDeserialize( - using = com.twilio.converter.ISO8601Deserializer.class - ) - @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonProperty("audioStartedAt") - private ZonedDateTime audioStartedAt; + @JsonProperty("transcriptionConfigurationId") + private String transcriptionConfigurationId; @JsonProperty("inputSource") private Transcription.InputSource inputSource; - @JsonProperty("mediaUrl") - private URI mediaUrl; + @JsonProperty("sourceId") + private String sourceId; @JsonProperty("participants") private List participants; - @JsonProperty("sourceId") - private String sourceId; - - @JsonProperty("transcriptionConfigurationId") - private String transcriptionConfigurationId; + @JsonProperty("mediaUrl") + private URI mediaUrl; @JsonDeserialize( using = com.twilio.converter.ISO8601Deserializer.class ) @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("audioStartedAt") - public Builder audioStartedAt(ZonedDateTime audioStartedAt) { - this.audioStartedAt = audioStartedAt; + private ZonedDateTime audioStartedAt; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("transcriptionConfigurationId") + public Builder transcriptionConfigurationId( + String transcriptionConfigurationId + ) { + this.transcriptionConfigurationId = + transcriptionConfigurationId; return this; } @@ -991,9 +1111,9 @@ public Builder inputSource(Transcription.InputSource inputSource) { } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("mediaUrl") - public Builder mediaUrl(URI mediaUrl) { - this.mediaUrl = mediaUrl; + @JsonProperty("sourceId") + public Builder sourceId(String sourceId) { + this.sourceId = sourceId; return this; } @@ -1007,19 +1127,20 @@ public Builder participants( } @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("sourceId") - public Builder sourceId(String sourceId) { - this.sourceId = sourceId; + @JsonProperty("mediaUrl") + public Builder mediaUrl(URI mediaUrl) { + this.mediaUrl = mediaUrl; return this; } + @JsonDeserialize( + using = com.twilio.converter.ISO8601Deserializer.class + ) + @JsonSerialize(using = com.twilio.converter.ISO8601Serializer.class) @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("transcriptionConfigurationId") - public Builder transcriptionConfigurationId( - String transcriptionConfigurationId - ) { - this.transcriptionConfigurationId = - transcriptionConfigurationId; + @JsonProperty("audioStartedAt") + public Builder audioStartedAt(ZonedDateTime audioStartedAt) { + this.audioStartedAt = audioStartedAt; return this; } @@ -1041,27 +1162,27 @@ public boolean equals(final Object o) { CreateV3TranscriptionsRequest other = (CreateV3TranscriptionsRequest) o; return ( - Objects.equals(audioStartedAt, other.audioStartedAt) && - Objects.equals(inputSource, other.inputSource) && - Objects.equals(mediaUrl, other.mediaUrl) && - Objects.equals(participants, other.participants) && - Objects.equals(sourceId, other.sourceId) && Objects.equals( transcriptionConfigurationId, other.transcriptionConfigurationId - ) + ) && + Objects.equals(inputSource, other.inputSource) && + Objects.equals(sourceId, other.sourceId) && + Objects.equals(participants, other.participants) && + Objects.equals(mediaUrl, other.mediaUrl) && + Objects.equals(audioStartedAt, other.audioStartedAt) ); } @Override public int hashCode() { return Objects.hash( - audioStartedAt, + transcriptionConfigurationId, inputSource, - mediaUrl, - participants, sourceId, - transcriptionConfigurationId + participants, + mediaUrl, + audioStartedAt ); } } @@ -1069,6 +1190,7 @@ public int hashCode() { @JsonDeserialize( builder = VoiceV3TranscriptionResolvedConfigurationParticipantDefaults.Builder.class ) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceV3TranscriptionResolvedConfigurationParticipantDefaults { @@ -1107,6 +1229,7 @@ public static VoiceV3TranscriptionResolvedConfigurationParticipantDefaults fromJ ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1159,6 +1282,7 @@ public int hashCode() { } @JsonDeserialize(builder = VoiceV3TranscriptionTranscription.Builder.class) + @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) @ToString public static class VoiceV3TranscriptionTranscription { @@ -1287,6 +1411,7 @@ public static VoiceV3TranscriptionTranscription fromJson( ); } + @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class Builder { @@ -1485,6 +1610,128 @@ public int hashCode() { } } + @JsonDeserialize( + builder = VoiceV3TranscriptionTranscriptionListMeta.Builder.class + ) + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @ToString + public static class VoiceV3TranscriptionTranscriptionListMeta { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("key") + @Getter + private final String key; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("pageSize") + @Getter + private final Integer pageSize; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + @Getter + private final String previousToken; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + @Getter + private final String nextToken; + + private VoiceV3TranscriptionTranscriptionListMeta(Builder builder) { + this.key = builder.key; + this.pageSize = builder.pageSize; + this.previousToken = builder.previousToken; + this.nextToken = builder.nextToken; + } + + public static Builder builder( + final String key, + final Integer pageSize + ) { + return new Builder(key, pageSize); + } + + public static VoiceV3TranscriptionTranscriptionListMeta fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + VoiceV3TranscriptionTranscriptionListMeta.class + ); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @JsonProperty("key") + private String key; + + @JsonProperty("pageSize") + private Integer pageSize; + + @JsonProperty("previousToken") + private String previousToken; + + @JsonProperty("nextToken") + private String nextToken; + + @JsonCreator + public Builder( + @JsonProperty("key") final String key, + @JsonProperty("pageSize") final Integer pageSize + ) { + this.key = key; + this.pageSize = pageSize; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("previousToken") + public Builder previousToken(String previousToken) { + this.previousToken = previousToken; + return this; + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("nextToken") + public Builder nextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + public VoiceV3TranscriptionTranscriptionListMeta build() { + return new VoiceV3TranscriptionTranscriptionListMeta(this); + } + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + VoiceV3TranscriptionTranscriptionListMeta other = + (VoiceV3TranscriptionTranscriptionListMeta) o; + return ( + Objects.equals(key, other.key) && + Objects.equals(pageSize, other.pageSize) && + Objects.equals(previousToken, other.previousToken) && + Objects.equals(nextToken, other.nextToken) + ); + } + + @Override + public int hashCode() { + return Objects.hash(key, pageSize, previousToken, nextToken); + } + } + /** * Converts a JSON String into a Transcription object using the provided ObjectMapper. * diff --git a/src/main/java/com/twilio/rest/voice/v3/TranscriptionCreator.java b/src/main/java/com/twilio/rest/voice/v3/TranscriptionCreator.java index f7ca8e2926..163189f3b6 100644 --- a/src/main/java/com/twilio/rest/voice/v3/TranscriptionCreator.java +++ b/src/main/java/com/twilio/rest/voice/v3/TranscriptionCreator.java @@ -32,7 +32,8 @@ import java.io.InputStream; public class TranscriptionCreator - extends Creator { + extends Creator +{ private String idempotencyKey; private Transcription.CreateV3TranscriptionsRequest createV3TranscriptionsRequest; @@ -102,9 +103,9 @@ public Transcription.CreateTranscriptionResponse create( } @Override - public TwilioResponse< - Transcription.CreateTranscriptionResponse - > createWithResponse(final TwilioRestClient client) { + public TwilioResponse createWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Transcription.CreateTranscriptionResponse content = Transcription.CreateTranscriptionResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/voice/v3/TranscriptionFetcher.java b/src/main/java/com/twilio/rest/voice/v3/TranscriptionFetcher.java index 045619fef8..3c59822737 100644 --- a/src/main/java/com/twilio/rest/voice/v3/TranscriptionFetcher.java +++ b/src/main/java/com/twilio/rest/voice/v3/TranscriptionFetcher.java @@ -19,7 +19,6 @@ import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; -import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; @@ -29,7 +28,8 @@ import java.io.InputStream; public class TranscriptionFetcher - extends Fetcher { + extends Fetcher +{ private String pathTranscriptionId; @@ -40,11 +40,10 @@ public TranscriptionFetcher(final String pathTranscriptionId) { private Response makeRequest(final TwilioRestClient client) { String path = "/v3/Transcriptions/{transcriptionId}"; - path = - path.replace( - "{" + "transcriptionId" + "}", - this.pathTranscriptionId.toString() - ); + path = path.replace( + "{" + "transcriptionId" + "}", + this.pathTranscriptionId.toString() + ); Request request = new Request( HttpMethod.GET, @@ -60,16 +59,6 @@ private Response makeRequest(final TwilioRestClient client) { ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); - RestStandardException standardException = - RestStandardException.fromJson( - inputStream, - client.getObjectMapper() - ); - if ( - standardException != null && standardException.getType() != null - ) { - throw new ApiException(standardException); - } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -97,9 +86,9 @@ public Transcription.FetchTranscriptionResponse fetch( } @Override - public TwilioResponse< - Transcription.FetchTranscriptionResponse - > fetchWithResponse(final TwilioRestClient client) { + public TwilioResponse fetchWithResponse( + final TwilioRestClient client + ) { Response response = makeRequest(client); Transcription.FetchTranscriptionResponse content = Transcription.FetchTranscriptionResponse.fromJson( diff --git a/src/main/java/com/twilio/rest/assistants/v1/PolicyReader.java b/src/main/java/com/twilio/rest/voice/v3/TranscriptionReader.java similarity index 50% rename from src/main/java/com/twilio/rest/assistants/v1/PolicyReader.java rename to src/main/java/com/twilio/rest/voice/v3/TranscriptionReader.java index 070309d636..0bc0ac9e02 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/PolicyReader.java +++ b/src/main/java/com/twilio/rest/voice/v3/TranscriptionReader.java @@ -4,26 +4,28 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Assistants - * This is the public Twilio REST API. + * Twilio API definition for public-api voice + * Powers Twilio public-api voice * * NOTE: This class is auto generated by OpenAPI Generator. * https://openapi-generator.tech * Do not edit the class manually. */ -package com.twilio.rest.assistants.v1; +package com.twilio.rest.voice.v3; import com.twilio.base.Page; import com.twilio.base.Reader; import com.twilio.base.ResourceSet; import com.twilio.base.ResourceSetResponse; +import com.twilio.base.TokenPaginationPage; import com.twilio.base.TwilioResponse; import com.twilio.constant.EnumConstants.ParameterType; import com.twilio.converter.Serializer; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; +import com.twilio.exception.RestStandardException; import com.twilio.http.HttpMethod; import com.twilio.http.HttpUtility; import com.twilio.http.Request; @@ -32,42 +34,74 @@ import com.twilio.rest.Domains; import com.twilio.type.*; import java.io.InputStream; +import java.time.ZonedDateTime; -public class PolicyReader extends Reader { +public class TranscriptionReader + extends Reader +{ - private String toolId; - private String knowledgeId; + private ZonedDateTime createdAfter; + private ZonedDateTime createdBefore; + private String languageCode; + private String sourceId; + private Transcription.Status status; private Integer pageSize; + private String pageToken; - public PolicyReader() {} + public TranscriptionReader() {} - public PolicyReader setToolId(final String toolId) { - this.toolId = toolId; + public TranscriptionReader setCreatedAfter( + final ZonedDateTime createdAfter + ) { + this.createdAfter = createdAfter; return this; } - public PolicyReader setKnowledgeId(final String knowledgeId) { - this.knowledgeId = knowledgeId; + public TranscriptionReader setCreatedBefore( + final ZonedDateTime createdBefore + ) { + this.createdBefore = createdBefore; return this; } - public PolicyReader setPageSize(final Integer pageSize) { + public TranscriptionReader setLanguageCode(final String languageCode) { + this.languageCode = languageCode; + return this; + } + + public TranscriptionReader setSourceId(final String sourceId) { + this.sourceId = sourceId; + return this; + } + + public TranscriptionReader setStatus(final Transcription.Status status) { + this.status = status; + return this; + } + + public TranscriptionReader setPageSize(final Integer pageSize) { this.pageSize = pageSize; return this; } - public ResourceSetResponse readWithResponse( + public TranscriptionReader setPageToken(final String pageToken) { + this.pageToken = pageToken; + return this; + } + + public ResourceSetResponse readWithResponse( final TwilioRestClient client ) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); - Page page = Page.fromJson( - "policies", + Page page = Page.fromJson( + "transcriptions", response.getContent(), - Policy.class, + Transcription.ListTranscriptionResponse.class, client.getObjectMapper() ); - ResourceSet resourceSet = new ResourceSet<>(this, client, page); + ResourceSet resourceSet = + new ResourceSet<>(this, client, page); return new ResourceSetResponse<>( resourceSet, response.getStatusCode(), @@ -76,11 +110,11 @@ public ResourceSetResponse readWithResponse( } private Request buildFirstPageRequest(final TwilioRestClient client) { - String path = "/v1/Policies"; + String path = "/v3/Transcriptions"; Request request = new Request( HttpMethod.GET, - Domains.ASSISTANTS.toString(), + Domains.VOICE.toString(), path ); addQueryParams(request); @@ -88,24 +122,28 @@ private Request buildFirstPageRequest(final TwilioRestClient client) { } @Override - public ResourceSet read(final TwilioRestClient client) { + public ResourceSet read( + final TwilioRestClient client + ) { return new ResourceSet<>(this, client, firstPage(client)); } - public Page firstPage(final TwilioRestClient client) { + public Page firstPage( + final TwilioRestClient client + ) { Request request = buildFirstPageRequest(client); return pageForRequest(client, request); } - public TwilioResponse> firstPageWithResponse( - final TwilioRestClient client - ) { + public TwilioResponse< + Page + > firstPageWithResponse(final TwilioRestClient client) { Request request = buildFirstPageRequest(client); Response response = makeRequest(client, request); - Page page = Page.fromJson( - "policies", + Page page = Page.fromJson( + "transcriptions", response.getContent(), - Policy.class, + Transcription.ListTranscriptionResponse.class, client.getObjectMapper() ); return new TwilioResponse<>( @@ -122,10 +160,20 @@ private Response makeRequest( Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "Policy read failed: Unable to connect to server" + "Transcription read failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { InputStream inputStream = response.getStream(); + RestStandardException standardException = + RestStandardException.fromJson( + inputStream, + client.getObjectMapper() + ); + if ( + standardException != null && standardException.getType() != null + ) { + throw new ApiException(standardException); + } RestException restException = RestException.fromJson( inputStream, client.getObjectMapper() @@ -142,45 +190,55 @@ private Response makeRequest( return response; } - private Page pageForRequest( + private Page pageForRequest( final TwilioRestClient client, final Request request ) { Response response = makeRequest(client, request); - return Page.fromJson( - "policies", + return TokenPaginationPage.fromJson( + "transcriptions", response.getContent(), - Policy.class, + Transcription.ListTranscriptionResponse.class, client.getObjectMapper() ); } @Override - public Page previousPage( - final Page page, + public Page previousPage( + final Page page, final TwilioRestClient client ) { + String path = "/v3/Transcriptions"; + + path = path + page.previousQueryString(); Request request = new Request( HttpMethod.GET, - page.getPreviousPageUrl(Domains.API.toString()) + Domains.VOICE.toString(), + path ); + return pageForRequest(client, request); } @Override - public Page nextPage( - final Page page, + public Page nextPage( + final Page page, final TwilioRestClient client ) { + String path = "/v3/Transcriptions"; + + path = path + page.nextQueryString(); Request request = new Request( HttpMethod.GET, - page.getNextPageUrl(Domains.API.toString()) + Domains.VOICE.toString(), + path ); + return pageForRequest(client, request); } @Override - public Page getPage( + public Page getPage( final String targetUrl, final TwilioRestClient client ) { @@ -194,28 +252,64 @@ public Page getPage( } private void addQueryParams(final Request request) { - if (toolId != null) { - Serializer.toString(request, "ToolId", toolId, ParameterType.QUERY); + if (createdAfter != null) { + Serializer.toString( + request, + "createdAfter", + createdAfter, + ParameterType.QUERY + ); + } + + if (createdBefore != null) { + Serializer.toString( + request, + "createdBefore", + createdBefore, + ParameterType.QUERY + ); + } + + if (languageCode != null) { + Serializer.toString( + request, + "languageCode", + languageCode, + ParameterType.QUERY + ); } - if (knowledgeId != null) { + if (sourceId != null) { Serializer.toString( request, - "KnowledgeId", - knowledgeId, + "sourceId", + sourceId, ParameterType.QUERY ); } + if (status != null) { + Serializer.toString(request, "status", status, ParameterType.QUERY); + } + if (pageSize != null) { Serializer.toString( request, - "PageSize", + "pageSize", pageSize, ParameterType.QUERY ); } + if (pageToken != null) { + Serializer.toString( + request, + "pageToken", + pageToken, + ParameterType.QUERY + ); + } + if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } 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 ffd63208ed..1d5fcc345c 100644 --- a/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java +++ b/src/main/java/com/twilio/rest/wireless/v1/RatePlan.java @@ -208,9 +208,9 @@ private RatePlan( using = com.twilio.converter.ISO8601Serializer.class ) final ZonedDateTime dateUpdated, @JsonProperty("friendly_name") final String friendlyName, - @JsonProperty("international_roaming") final List< - String - > internationalRoaming, + @JsonProperty( + "international_roaming" + ) final List internationalRoaming, @JsonProperty( "international_roaming_data_limit" ) final Integer internationalRoamingDataLimit, diff --git a/src/main/java/com/twilio/twiml/voice/Assistant.java b/src/main/java/com/twilio/twiml/voice/Assistant.java deleted file mode 100644 index f74f3a658c..0000000000 --- a/src/main/java/com/twilio/twiml/voice/Assistant.java +++ /dev/null @@ -1,629 +0,0 @@ -/** - * This code was generated by - * \ / _ _ _| _ _ - * | (_)\/(_)(_|\/| |(/_ v1.0.0 - * / / - */ - -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 com.twilio.twiml.TwiML; -import com.twilio.twiml.TwiMLException; - -import java.util.HashMap; -import java.util.Map; - -/** - * TwiML wrapper for {@code } - */ -@JsonDeserialize(builder = Assistant.Builder.class) -public class Assistant extends TwiML { - private final String id; - private final String language; - private final String ttsLanguage; - private final String transcriptionLanguage; - private final String ttsProvider; - private final String voice; - private final String transcriptionProvider; - private final String speechModel; - private final Boolean profanityFilter; - private final Boolean dtmfDetection; - private final String welcomeGreeting; - private final Boolean partialPrompts; - private final String welcomeGreetingInterruptible; - private final String interruptible; - private final Boolean preemptible; - private final String hints; - private final String intelligenceService; - private final Boolean reportInputDuringAgentSpeech; - private final String elevenlabsTextNormalization; - private final String interruptSensitivity; - private final String debug; - - /** - * For XML Serialization/Deserialization - */ - private Assistant() { - this(new Builder()); - } - - /** - * Create a new {@code } element - */ - private Assistant(Builder b) { - super("Assistant", b); - this.id = b.id; - this.language = b.language; - this.ttsLanguage = b.ttsLanguage; - this.transcriptionLanguage = b.transcriptionLanguage; - this.ttsProvider = b.ttsProvider; - this.voice = b.voice; - this.transcriptionProvider = b.transcriptionProvider; - this.speechModel = b.speechModel; - this.profanityFilter = b.profanityFilter; - this.dtmfDetection = b.dtmfDetection; - this.welcomeGreeting = b.welcomeGreeting; - this.partialPrompts = b.partialPrompts; - this.welcomeGreetingInterruptible = b.welcomeGreetingInterruptible; - this.interruptible = b.interruptible; - this.preemptible = b.preemptible; - this.hints = b.hints; - this.intelligenceService = b.intelligenceService; - this.reportInputDuringAgentSpeech = b.reportInputDuringAgentSpeech; - this.elevenlabsTextNormalization = b.elevenlabsTextNormalization; - this.interruptSensitivity = b.interruptSensitivity; - this.debug = b.debug; - } - - /** - * Attributes to set on the generated XML element - * - * @return A Map of attribute keys to values - */ - protected Map getElementAttributes() { - // Preserve order of attributes - Map attrs = new HashMap<>(); - - if (this.getId() != null) { - attrs.put("id", this.getId()); - } - if (this.getLanguage() != null) { - attrs.put("language", this.getLanguage()); - } - if (this.getTtsLanguage() != null) { - attrs.put("ttsLanguage", this.getTtsLanguage()); - } - if (this.getTranscriptionLanguage() != null) { - attrs.put("transcriptionLanguage", this.getTranscriptionLanguage()); - } - if (this.getTtsProvider() != null) { - attrs.put("ttsProvider", this.getTtsProvider()); - } - if (this.getVoice() != null) { - attrs.put("voice", this.getVoice()); - } - if (this.getTranscriptionProvider() != null) { - attrs.put("transcriptionProvider", this.getTranscriptionProvider()); - } - if (this.getSpeechModel() != null) { - attrs.put("speechModel", this.getSpeechModel()); - } - if (this.isProfanityFilter() != null) { - attrs.put("profanityFilter", this.isProfanityFilter().toString()); - } - if (this.isDtmfDetection() != null) { - attrs.put("dtmfDetection", this.isDtmfDetection().toString()); - } - if (this.getWelcomeGreeting() != null) { - attrs.put("welcomeGreeting", this.getWelcomeGreeting()); - } - if (this.isPartialPrompts() != null) { - attrs.put("partialPrompts", this.isPartialPrompts().toString()); - } - if (this.getWelcomeGreetingInterruptible() != null) { - attrs.put("welcomeGreetingInterruptible", this.getWelcomeGreetingInterruptible()); - } - if (this.getInterruptible() != null) { - attrs.put("interruptible", this.getInterruptible()); - } - if (this.isPreemptible() != null) { - attrs.put("preemptible", this.isPreemptible().toString()); - } - if (this.getHints() != null) { - attrs.put("hints", this.getHints()); - } - if (this.getIntelligenceService() != null) { - attrs.put("intelligenceService", this.getIntelligenceService()); - } - if (this.isReportInputDuringAgentSpeech() != null) { - attrs.put("reportInputDuringAgentSpeech", this.isReportInputDuringAgentSpeech().toString()); - } - if (this.getElevenlabsTextNormalization() != null) { - attrs.put("elevenlabsTextNormalization", this.getElevenlabsTextNormalization()); - } - if (this.getInterruptSensitivity() != null) { - attrs.put("interruptSensitivity", this.getInterruptSensitivity()); - } - if (this.getDebug() != null) { - attrs.put("debug", this.getDebug()); - } - - return attrs; - } - - /** - * The assistant ID of the AI Assistant - * - * @return The assistant ID of the AI Assistant - */ - public String getId() { - return id; - } - - /** - * Language to be used for both text-to-speech and transcription - * - * @return Language to be used for both text-to-speech and transcription - */ - public String getLanguage() { - return language; - } - - /** - * Language to be used for text-to-speech - * - * @return Language to be used for text-to-speech - */ - public String getTtsLanguage() { - return ttsLanguage; - } - - /** - * Language to be used for transcription - * - * @return Language to be used for transcription - */ - public String getTranscriptionLanguage() { - return transcriptionLanguage; - } - - /** - * Provider to be used for text-to-speech - * - * @return Provider to be used for text-to-speech - */ - public String getTtsProvider() { - return ttsProvider; - } - - /** - * Voice to be used for text-to-speech - * - * @return Voice to be used for text-to-speech - */ - public String getVoice() { - return voice; - } - - /** - * Provider to be used for transcription - * - * @return Provider to be used for transcription - */ - public String getTranscriptionProvider() { - return transcriptionProvider; - } - - /** - * Speech model to be used for transcription - * - * @return Speech model to be used for transcription - */ - public String getSpeechModel() { - return speechModel; - } - - /** - * Whether profanities should be filtered out of the speech transcription - * - * @return Whether profanities should be filtered out of the speech - * transcription - */ - public Boolean isProfanityFilter() { - return profanityFilter; - } - - /** - * Whether DTMF tones should be detected and reported in speech transcription - * - * @return Whether DTMF tones should be detected and reported in speech - * transcription - */ - public Boolean isDtmfDetection() { - return dtmfDetection; - } - - /** - * The sentence to be played automatically when the session is connected - * - * @return The sentence to be played automatically when the session is connected - */ - public String getWelcomeGreeting() { - return welcomeGreeting; - } - - /** - * Whether partial prompts should be reported to WebSocket server before the - * caller finishes speaking - * - * @return Whether partial prompts should be reported to WebSocket server - * before the caller finishes speaking - */ - public Boolean isPartialPrompts() { - return partialPrompts; - } - - /** - * "Whether and how the input from a caller, such as speaking or DTMF can - * interrupt the welcome greeting - * - * @return "Whether and how the input from a caller, such as speaking or DTMF - * can interrupt the welcome greeting - */ - public String getWelcomeGreetingInterruptible() { - return welcomeGreetingInterruptible; - } - - /** - * Whether and how the input from a caller, such as speaking or DTMF can - * interrupt the play of text-to-speech - * - * @return Whether and how the input from a caller, such as speaking or DTMF - * can interrupt the play of text-to-speech - */ - public String getInterruptible() { - return interruptible; - } - - /** - * Whether subsequent text-to-speech or play media can interrupt the on-going - * play of text-to-speech or media - * - * @return Whether subsequent text-to-speech or play media can interrupt the - * on-going play of text-to-speech or media - */ - public Boolean isPreemptible() { - return preemptible; - } - - /** - * Phrases to help better accuracy in speech recognition of these pharases - * - * @return Phrases to help better accuracy in speech recognition of these - * pharases - */ - public String getHints() { - return hints; - } - - /** - * The Conversational Intelligence Service id or unique name to be used for the - * session - * - * @return The Conversational Intelligence Service id or unique name to be used - * for the session - */ - public String getIntelligenceService() { - return intelligenceService; - } - - /** - * Whether prompts should be reported to WebSocket server when text-to-speech - * playing and interrupt is disabled - * - * @return Whether prompts should be reported to WebSocket server when - * text-to-speech playing and interrupt is disabled - */ - public Boolean isReportInputDuringAgentSpeech() { - return reportInputDuringAgentSpeech; - } - - /** - * When using ElevenLabs as TTS provider, this parameter allows you to enable or - * disable its text normalization feature - * - * @return When using ElevenLabs as TTS provider, this parameter allows you to - * enable or disable its text normalization feature - */ - public String getElevenlabsTextNormalization() { - return elevenlabsTextNormalization; - } - - /** - * Set the sensitivity of the interrupt feature for speech. The value can be - * low, medium, or high - * - * @return Set the sensitivity of the interrupt feature for speech. The value - * can be low, medium, or high - */ - public String getInterruptSensitivity() { - return interruptSensitivity; - } - - /** - * Multiple debug options to be used for troubleshooting - * - * @return Multiple debug options to be used for troubleshooting - */ - public String getDebug() { - return debug; - } - - /** - * Create a new {@code } element - */ - @JsonPOJOBuilder(withPrefix = "") - public static class Builder extends TwiML.Builder { - /** - * Create and return a {@code } from an XML string - */ - public static Builder fromXml(final String xml) throws TwiMLException { - try { - return OBJECT_MAPPER.readValue(xml, Builder.class); - } catch (final JsonProcessingException jpe) { - throw new TwiMLException( - "Failed to deserialize a Assistant.Builder from the provided XML string: " + jpe.getMessage()); - } catch (final Exception e) { - throw new TwiMLException("Unhandled exception: " + e.getMessage()); - } - } - - private String id; - private String language; - private String ttsLanguage; - private String transcriptionLanguage; - private String ttsProvider; - private String voice; - private String transcriptionProvider; - private String speechModel; - private Boolean profanityFilter; - private Boolean dtmfDetection; - private String welcomeGreeting; - private Boolean partialPrompts; - private String welcomeGreetingInterruptible; - private String interruptible; - private Boolean preemptible; - private String hints; - private String intelligenceService; - private Boolean reportInputDuringAgentSpeech; - private String elevenlabsTextNormalization; - private String interruptSensitivity; - private String debug; - - /** - * The assistant ID of the AI Assistant - */ - @JacksonXmlProperty(isAttribute = true, localName = "id") - public Builder id(String id) { - this.id = id; - return this; - } - - /** - * Language to be used for both text-to-speech and transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "language") - public Builder language(String language) { - this.language = language; - return this; - } - - /** - * Language to be used for text-to-speech - */ - @JacksonXmlProperty(isAttribute = true, localName = "ttsLanguage") - public Builder ttsLanguage(String ttsLanguage) { - this.ttsLanguage = ttsLanguage; - return this; - } - - /** - * Language to be used for transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "transcriptionLanguage") - public Builder transcriptionLanguage(String transcriptionLanguage) { - this.transcriptionLanguage = transcriptionLanguage; - return this; - } - - /** - * Provider to be used for text-to-speech - */ - @JacksonXmlProperty(isAttribute = true, localName = "ttsProvider") - public Builder ttsProvider(String ttsProvider) { - this.ttsProvider = ttsProvider; - return this; - } - - /** - * Voice to be used for text-to-speech - */ - @JacksonXmlProperty(isAttribute = true, localName = "voice") - public Builder voice(String voice) { - this.voice = voice; - return this; - } - - /** - * Provider to be used for transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "transcriptionProvider") - public Builder transcriptionProvider(String transcriptionProvider) { - this.transcriptionProvider = transcriptionProvider; - return this; - } - - /** - * Speech model to be used for transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "speechModel") - public Builder speechModel(String speechModel) { - this.speechModel = speechModel; - return this; - } - - /** - * Whether profanities should be filtered out of the speech transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "profanityFilter") - public Builder profanityFilter(Boolean profanityFilter) { - this.profanityFilter = profanityFilter; - return this; - } - - /** - * Whether DTMF tones should be detected and reported in speech transcription - */ - @JacksonXmlProperty(isAttribute = true, localName = "dtmfDetection") - public Builder dtmfDetection(Boolean dtmfDetection) { - this.dtmfDetection = dtmfDetection; - return this; - } - - /** - * The sentence to be played automatically when the session is connected - */ - @JacksonXmlProperty(isAttribute = true, localName = "welcomeGreeting") - public Builder welcomeGreeting(String welcomeGreeting) { - this.welcomeGreeting = welcomeGreeting; - return this; - } - - /** - * Whether partial prompts should be reported to WebSocket server before the - * caller finishes speaking - */ - @JacksonXmlProperty(isAttribute = true, localName = "partialPrompts") - public Builder partialPrompts(Boolean partialPrompts) { - this.partialPrompts = partialPrompts; - return this; - } - - /** - * "Whether and how the input from a caller, such as speaking or DTMF can - * interrupt the welcome greeting - */ - @JacksonXmlProperty(isAttribute = true, localName = "welcomeGreetingInterruptible") - public Builder welcomeGreetingInterruptible(String welcomeGreetingInterruptible) { - this.welcomeGreetingInterruptible = welcomeGreetingInterruptible; - return this; - } - - /** - * Whether and how the input from a caller, such as speaking or DTMF can - * interrupt the play of text-to-speech - */ - @JacksonXmlProperty(isAttribute = true, localName = "interruptible") - public Builder interruptible(String interruptible) { - this.interruptible = interruptible; - return this; - } - - /** - * Whether subsequent text-to-speech or play media can interrupt the on-going - * play of text-to-speech or media - */ - @JacksonXmlProperty(isAttribute = true, localName = "preemptible") - public Builder preemptible(Boolean preemptible) { - this.preemptible = preemptible; - return this; - } - - /** - * Phrases to help better accuracy in speech recognition of these pharases - */ - @JacksonXmlProperty(isAttribute = true, localName = "hints") - public Builder hints(String hints) { - this.hints = hints; - return this; - } - - /** - * The Conversational Intelligence Service id or unique name to be used for the - * session - */ - @JacksonXmlProperty(isAttribute = true, localName = "intelligenceService") - public Builder intelligenceService(String intelligenceService) { - this.intelligenceService = intelligenceService; - return this; - } - - /** - * Whether prompts should be reported to WebSocket server when text-to-speech - * playing and interrupt is disabled - */ - @JacksonXmlProperty(isAttribute = true, localName = "reportInputDuringAgentSpeech") - public Builder reportInputDuringAgentSpeech(Boolean reportInputDuringAgentSpeech) { - this.reportInputDuringAgentSpeech = reportInputDuringAgentSpeech; - return this; - } - - /** - * When using ElevenLabs as TTS provider, this parameter allows you to enable or - * disable its text normalization feature - */ - @JacksonXmlProperty(isAttribute = true, localName = "elevenlabsTextNormalization") - public Builder elevenlabsTextNormalization(String elevenlabsTextNormalization) { - this.elevenlabsTextNormalization = elevenlabsTextNormalization; - return this; - } - - /** - * Set the sensitivity of the interrupt feature for speech. The value can be - * low, medium, or high - */ - @JacksonXmlProperty(isAttribute = true, localName = "interruptSensitivity") - public Builder interruptSensitivity(String interruptSensitivity) { - this.interruptSensitivity = interruptSensitivity; - return this; - } - - /** - * Multiple debug options to be used for troubleshooting - */ - @JacksonXmlProperty(isAttribute = true, localName = "debug") - public Builder debug(String debug) { - this.debug = debug; - return this; - } - - /** - * Add a child {@code } element - */ - @JacksonXmlProperty(isAttribute = false, localName = "Language") - public Builder language(Language language) { - this.children.add(language); - return this; - } - - /** - * Add a child {@code } element - */ - @JacksonXmlProperty(isAttribute = false, localName = "Parameter") - public Builder parameter(Parameter parameter) { - this.children.add(parameter); - return this; - } - - /** - * Create and return resulting {@code } element - */ - public Assistant build() { - return new Assistant(this); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/twilio/twiml/voice/Connect.java b/src/main/java/com/twilio/twiml/voice/Connect.java index cced72fad1..aa7661c511 100644 --- a/src/main/java/com/twilio/twiml/voice/Connect.java +++ b/src/main/java/com/twilio/twiml/voice/Connect.java @@ -183,15 +183,6 @@ public Builder conversationRelay(ConversationRelay conversationRelay) { return this; } - /** - * Add a child {@code } element - */ - @JacksonXmlProperty(isAttribute = false, localName = "Assistant") - public Builder assistant(Assistant assistant) { - this.children.add(assistant); - return this; - } - /** * Add a child {@code } element */ diff --git a/src/main/java/com/twilio/twiml/voice/Dial.java b/src/main/java/com/twilio/twiml/voice/Dial.java index 159d77559d..aa788719be 100644 --- a/src/main/java/com/twilio/twiml/voice/Dial.java +++ b/src/main/java/com/twilio/twiml/voice/Dial.java @@ -178,6 +178,7 @@ public String toString() { private final URI referUrl; private final HttpMethod referMethod; private final Dial.Events events; + private final String passports; private final String number; /** @@ -211,6 +212,7 @@ private Dial(Builder b) { this.referUrl = b.referUrl; this.referMethod = b.referMethod; this.events = b.events; + this.passports = b.passports; this.number = b.number; } @@ -289,6 +291,9 @@ protected Map getElementAttributes() { if (this.getEvents() != null) { attrs.put("events", this.getEvents().toString()); } + if (this.getPassports() != null) { + attrs.put("passports", this.getPassports()); + } return attrs; } @@ -484,6 +489,15 @@ public Dial.Events getEvents() { return events; } + /** + * Base64-encoded comma-separated identity passports (e.g. shaken, div) + * + * @return Base64-encoded comma-separated identity passports (e.g. shaken, div) + */ + public String getPassports() { + return passports; + } + /** * Phone number to dial * @@ -531,6 +545,7 @@ public static Builder fromXml(final String xml) throws TwiMLException { private URI referUrl; private HttpMethod referMethod; private Dial.Events events; + private String passports; private String number; /** @@ -753,6 +768,15 @@ public Builder events(Dial.Events events) { return this; } + /** + * Base64-encoded comma-separated identity passports (e.g. shaken, div) + */ + @JacksonXmlProperty(isAttribute = true, localName = "passports") + public Builder passports(String passports) { + this.passports = passports; + return this; + } + /** * Phone number to dial */ diff --git a/src/test/java/com/twilio/twiml/VoiceResponseTest.java b/src/test/java/com/twilio/twiml/VoiceResponseTest.java index 4b65d66af5..4b947deb5e 100644 --- a/src/test/java/com/twilio/twiml/VoiceResponseTest.java +++ b/src/test/java/com/twilio/twiml/VoiceResponseTest.java @@ -94,6 +94,7 @@ public void testElementWithChildren() { .referUrl(URI.create("https://example.com")) .referMethod(HttpMethod.GET) .events(Dial.Events.CALL_PROGRESS_EVENT) + .passports("passports") .build()); builder.echo(new Echo.Builder().build()); @@ -214,7 +215,7 @@ public void testElementWithChildren() { "" + "" + "" + - "number" + + "number" + "" + "name" + "" + @@ -352,6 +353,7 @@ public void testXmlChildrenDeserialization() { .referUrl(URI.create("https://example.com")) .referMethod(HttpMethod.GET) .events(Dial.Events.CALL_PROGRESS_EVENT) + .passports("passports") .build()); builder.echo(new Echo.Builder().build()); @@ -471,7 +473,7 @@ public void testXmlChildrenDeserialization() { Assert.assertEquals( VoiceResponse.Builder.fromXml("" + "" + - "number" + + "number" + "" + "name" + "" + diff --git a/src/test/java/com/twilio/twiml/voice/AssistantTest.java b/src/test/java/com/twilio/twiml/voice/AssistantTest.java deleted file mode 100644 index a1668374f9..0000000000 --- a/src/test/java/com/twilio/twiml/voice/AssistantTest.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * This code was generated by - * \ / _ _ _| _ _ - * | (_)\/(_)(_|\/| |(/_ v1.0.0 - * / / - */ - -package com.twilio.twiml.voice; - -import com.twilio.twiml.GenericNode; -import org.junit.Assert; -import org.junit.Test; - -/** - * Test class for {@link Assistant} - */ -public class AssistantTest { - @Test - public void testEmptyElement() { - Assistant elem = new Assistant.Builder().build(); - - Assert.assertEquals( - "" + - "", - elem.toXml() - ); - } - - @Test - public void testEmptyElementUrl() { - Assistant elem = new Assistant.Builder().build(); - - Assert.assertEquals("%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3CAssistant%2F%3E", elem.toUrl()); - } - - @Test - public void testElementWithParams() { - Assistant elem = new Assistant.Builder() - .id("id") - .language("language") - .ttsLanguage("tts_language") - .transcriptionLanguage("transcription_language") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .profanityFilter(true) - .dtmfDetection(true) - .welcomeGreeting("welcome_greeting") - .partialPrompts(true) - .welcomeGreetingInterruptible("welcome_greeting_interruptible") - .interruptible("interruptible") - .preemptible(true) - .hints("hints") - .intelligenceService("intelligence_service") - .reportInputDuringAgentSpeech(true) - .elevenlabsTextNormalization("elevenlabs_text_normalization") - .interruptSensitivity("interrupt_sensitivity") - .debug("debug") - .build(); - - Assert.assertEquals( - "" + - "", - elem.toXml() - ); - } - - @Test - public void testElementWithExtraAttributes() { - Assistant elem = new Assistant.Builder().option("foo", "bar").option("a", "b").build(); - - Assert.assertEquals( - "" + - "", - elem.toXml() - ); - } - - @Test - public void testElementWithChildren() { - Assistant.Builder builder = new Assistant.Builder(); - - builder.language(new Language.Builder() - .code("code") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .build()); - - builder.parameter(new Parameter.Builder().name("name").value("value").build()); - - Assistant elem = builder.build(); - - Assert.assertEquals( - "" + - "" + - "" + - "" + - "", - elem.toXml() - ); - } - - @Test - public void testElementWithTextNode() { - Assistant.Builder builder = new Assistant.Builder(); - - builder.addText("Hey no tags!"); - - Assistant elem = builder.build(); - - Assert.assertEquals( - "" + - "" + - "Hey no tags!" + - "", - elem.toXml() - ); - } - - @Test - public void testMixedContent() { - GenericNode.Builder child = new GenericNode.Builder("Child"); - child.addText("content"); - - Assistant.Builder builder = new Assistant.Builder(); - - builder.addText("before"); - builder.addChild(child.build()); - builder.addText("after"); - - Assert.assertEquals( - "" + - "" + - "before" + - "content" + - "after" + - "", - builder.build().toXml() - ); - } - - @Test - public void testElementWithGenericNode() { - GenericNode.Builder genericBuilder = new GenericNode.Builder("genericTag"); - genericBuilder.addText("Some text"); - GenericNode node = genericBuilder.build(); - - Assistant.Builder builder = new Assistant.Builder(); - Assistant elem = builder.addChild(node).build(); - - Assert.assertEquals( - "" + - "" + - "" + - "Some text" + - "" + - "", - elem.toXml() - ); - } - - @Test - public void testElementWithGenericNodeAttributes() { - GenericNode.Builder genericBuilder = new GenericNode.Builder("genericTag"); - GenericNode node = genericBuilder.option("key", "value").addText("someText").build(); - - Assistant.Builder builder = new Assistant.Builder(); - Assistant elem = builder.addChild(node).build(); - - Assert.assertEquals( - "" + - "" + - "" + - "someText" + - "" + - "", - elem.toXml() - ); - } - - @Test - public void testXmlAttributesDeserialization() { - final Assistant elem = new Assistant.Builder() - .id("id") - .language("language") - .ttsLanguage("tts_language") - .transcriptionLanguage("transcription_language") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .profanityFilter(true) - .dtmfDetection(true) - .welcomeGreeting("welcome_greeting") - .partialPrompts(true) - .welcomeGreetingInterruptible("welcome_greeting_interruptible") - .interruptible("interruptible") - .preemptible(true) - .hints("hints") - .intelligenceService("intelligence_service") - .reportInputDuringAgentSpeech(true) - .elevenlabsTextNormalization("elevenlabs_text_normalization") - .interruptSensitivity("interrupt_sensitivity") - .debug("debug") - .build(); - - Assert.assertEquals( - Assistant.Builder.fromXml("").build().toXml(), - elem.toXml() - ); - } - - @Test - public void testXmlChildrenDeserialization() { - final Assistant.Builder builder = new Assistant.Builder(); - - builder.language(new Language.Builder() - .code("code") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .build()); - - builder.parameter(new Parameter.Builder().name("name").value("value").build()); - - final Assistant elem = builder.build(); - - Assert.assertEquals( - Assistant.Builder.fromXml("" + - "" + - "" + - "").build().toXml(), - elem.toXml() - ); - } - - @Test - public void testXmlEmptyChildrenDeserialization() { - final Assistant.Builder builder = new Assistant.Builder(); - - builder.language(new Language.Builder().build()); - - builder.parameter(new Parameter.Builder().build()); - - final Assistant elem = builder.build(); - - Assert.assertEquals( - Assistant.Builder.fromXml("" + - "" + - "" + - "").build().toXml(), - elem.toXml() - ); - } -} \ No newline at end of file diff --git a/src/test/java/com/twilio/twiml/voice/ConnectTest.java b/src/test/java/com/twilio/twiml/voice/ConnectTest.java index 169d109a8f..a13ad07b22 100644 --- a/src/test/java/com/twilio/twiml/voice/ConnectTest.java +++ b/src/test/java/com/twilio/twiml/voice/ConnectTest.java @@ -131,30 +131,6 @@ public void testElementWithChildren() { .events("events") .build()); - builder.assistant(new Assistant.Builder() - .id("id") - .language("language") - .ttsLanguage("tts_language") - .transcriptionLanguage("transcription_language") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .profanityFilter(true) - .dtmfDetection(true) - .welcomeGreeting("welcome_greeting") - .partialPrompts(true) - .welcomeGreetingInterruptible("welcome_greeting_interruptible") - .interruptible("interruptible") - .preemptible(true) - .hints("hints") - .intelligenceService("intelligence_service") - .reportInputDuringAgentSpeech(true) - .elevenlabsTextNormalization("elevenlabs_text_normalization") - .interruptSensitivity("interrupt_sensitivity") - .debug("debug") - .build()); - builder.aiSession(new AiSession.Builder() .aiConnector("ai_connector") .aiSessionConfiguration("ai_session_configuration") @@ -176,7 +152,6 @@ public void testElementWithChildren() { "" + "" + "" + - "" + "" + "" + "", @@ -343,30 +318,6 @@ public void testXmlChildrenDeserialization() { .events("events") .build()); - builder.assistant(new Assistant.Builder() - .id("id") - .language("language") - .ttsLanguage("tts_language") - .transcriptionLanguage("transcription_language") - .ttsProvider("tts_provider") - .voice("voice") - .transcriptionProvider("transcription_provider") - .speechModel("speech_model") - .profanityFilter(true) - .dtmfDetection(true) - .welcomeGreeting("welcome_greeting") - .partialPrompts(true) - .welcomeGreetingInterruptible("welcome_greeting_interruptible") - .interruptible("interruptible") - .preemptible(true) - .hints("hints") - .intelligenceService("intelligence_service") - .reportInputDuringAgentSpeech(true) - .elevenlabsTextNormalization("elevenlabs_text_normalization") - .interruptSensitivity("interrupt_sensitivity") - .debug("debug") - .build()); - builder.aiSession(new AiSession.Builder() .aiConnector("ai_connector") .aiSessionConfiguration("ai_session_configuration") @@ -387,7 +338,6 @@ public void testXmlChildrenDeserialization() { "" + "" + "" + - "" + "" + "" + "").build().toXml(), @@ -407,8 +357,6 @@ public void testXmlEmptyChildrenDeserialization() { builder.conversationRelay(new ConversationRelay.Builder().build()); - builder.assistant(new Assistant.Builder().build()); - builder.aiSession(new AiSession.Builder().build()); builder.conversationRelaySession(new ConversationRelaySession.Builder().build()); @@ -421,7 +369,6 @@ public void testXmlEmptyChildrenDeserialization() { "" + "" + "" + - "" + "" + "" + "").build().toXml(), diff --git a/src/test/java/com/twilio/twiml/voice/DialTest.java b/src/test/java/com/twilio/twiml/voice/DialTest.java index caf8e2394f..feaa4604dc 100644 --- a/src/test/java/com/twilio/twiml/voice/DialTest.java +++ b/src/test/java/com/twilio/twiml/voice/DialTest.java @@ -60,11 +60,12 @@ public void testElementWithParams() { .referUrl(URI.create("https://example.com")) .referMethod(HttpMethod.GET) .events(Dial.Events.CALL_PROGRESS_EVENT) + .passports("passports") .build(); Assert.assertEquals( "" + - "number", + "number", elem.toXml() ); } @@ -295,10 +296,11 @@ public void testXmlAttributesDeserialization() { .referUrl(URI.create("https://example.com")) .referMethod(HttpMethod.GET) .events(Dial.Events.CALL_PROGRESS_EVENT) + .passports("passports") .build(); Assert.assertEquals( - Dial.Builder.fromXml("number").build().toXml(), + Dial.Builder.fromXml("number").build().toXml(), elem.toXml() ); } From 7292bd7b86e948999161028a54425d31656b734f Mon Sep 17 00:00:00 2001 From: Twilio DX Date: Wed, 26 Aug 2026 14:01:46 +0530 Subject: [PATCH 2/7] [Librarian] Regenerated @ f443c9dfa233e41d0e61c9ed6ca2b162467a08b5 3e707bb96c6f47c65f8fdd9264d2a5340093b8ac --- CHANGES.md | 4 ++++ pom.xml | 4 ++-- src/main/java/com/twilio/Twilio.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4c9900441a..37763750d9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,10 @@ twilio-java changelog ===================== +[2026-08-26] Version 13.0.0 +--------------------------- + + [2026-08-26] Version 12.2.0 --------------------------- **Library - Fix** diff --git a/pom.xml b/pom.xml index 5b586a4d35..57bf0190d0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ twilio jar twilio - 12.1.1 + 13.0.0 Twilio Java Helper Library https://www.twilio.com @@ -19,7 +19,7 @@ git@github.com:twilio/twilio-java.git scm:git:git@github.com:twilio/twilio-java.git scm:git:git@github.com:twilio/twilio-java.git - 12.1.1 + 13.0.0 diff --git a/src/main/java/com/twilio/Twilio.java b/src/main/java/com/twilio/Twilio.java index 521f36f097..10e4a68856 100644 --- a/src/main/java/com/twilio/Twilio.java +++ b/src/main/java/com/twilio/Twilio.java @@ -41,7 +41,7 @@ */ public class Twilio { - public static final String VERSION = "12.1.1"; + public static final String VERSION = "13.0.0"; public static final String JAVA_VERSION = System.getProperty("java.version"); public static final String OS_NAME = System.getProperty("os.name"); public static final String OS_ARCH = System.getProperty("os.arch"); From 5e494c50a190cddc560788d29f13c08bb40be659 Mon Sep 17 00:00:00 2001 From: Twilio DX Date: Wed, 26 Aug 2026 14:35:19 +0530 Subject: [PATCH 3/7] [Librarian] Regenerated @ f443c9dfa233e41d0e61c9ed6ca2b162467a08b5 3e707bb96c6f47c65f8fdd9264d2a5340093b8ac --- CHANGES.md | 5 +++++ UPGRADE.md | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 37763750d9..7bf0d75de6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,11 @@ twilio-java changelog --------------------------- +[2026-08-26] Version 13.0.0 +--------------------------- +**Library - Fix** +- [PR #826](https://github.com/twilio/twilio-oai-generator/pull/826): added forward compatibility for twilio-java nested response (#826) Thanks to [@sbansla](https://github.com/sbansla)! + [2026-08-26] Version 12.2.0 --------------------------- **Library - Fix** diff --git a/UPGRADE.md b/UPGRADE.md index 2c1bb57318..dbd30c3bf6 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,6 +2,27 @@ _`MAJOR` version bumps will have upgrade notes posted here._ +[2026-08-26] 12.x.x to 13.x.x +----------------------------- +### Overview +##### Twilio Java Helper Library's major version 13.0.0 includes a fix to PascalCase generation for enum and model names containing numbers. + +##### Breaking Changes + +###### 1. Enum and model names +Type names that contained numbers (e.g., from API version identifiers) previously had those numbers silently dropped. They are now included in the PascalCase output. + +Examples: +- `ConversationsVConversationGroupingType` → `ConversationsV2ConversationGroupingType` +- `Action.Status` → `Action.ConversationsV2ActionStatus` + +Who is impacted: +Users who reference generated enum or model types by name in their code where those types contain numbers in the API schema name. + +##### Migration +Update enum references. + + [2026-04-21] 11.x.x to 12.x.x ----------------------------- ### Overview From ad1b5a1cc625b935d7abcce9947b065ec0dca2bb Mon Sep 17 00:00:00 2001 From: Twilio DX Date: Wed, 26 Aug 2026 14:39:33 +0530 Subject: [PATCH 4/7] update version --- CHANGES.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7bf0d75de6..10bb605ddf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,6 @@ twilio-java changelog ===================== -[2026-08-26] Version 13.0.0 ---------------------------- - [2026-08-26] Version 13.0.0 --------------------------- From df61b3e16b485ed8f1c0bf29c9a67374f64c2636 Mon Sep 17 00:00:00 2001 From: sburman Date: Wed, 26 Aug 2026 14:51:35 +0530 Subject: [PATCH 5/7] add mock test file for messaging v2 --- CHANGES.md | 3 +- ...hannelsSenderForwardCompatibilityTest.java | 260 ++++++++++++++++++ 2 files changed, 262 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/twilio/rest/messaging/v2/ChannelsSenderForwardCompatibilityTest.java diff --git a/CHANGES.md b/CHANGES.md index 10bb605ddf..42b09d7bd7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,8 @@ twilio-java changelog [2026-08-26] Version 13.0.0 --------------------------- **Library - Fix** -- [PR #826](https://github.com/twilio/twilio-oai-generator/pull/826): added forward compatibility for twilio-java nested response (#826) Thanks to [@sbansla](https://github.com/sbansla)! +- [PR #826](https://github.com/twilio/twilio-oai-generator/pull/826): added forward compatibility for twilio-java nested response (#826) Thanks to [@sbansla](https://github.com/sbansla)!\ +- Fixed deserialization failure when API responses contain unknown fields in nested objects. [2026-08-26] Version 12.2.0 --------------------------- diff --git a/src/test/java/com/twilio/rest/messaging/v2/ChannelsSenderForwardCompatibilityTest.java b/src/test/java/com/twilio/rest/messaging/v2/ChannelsSenderForwardCompatibilityTest.java new file mode 100644 index 0000000000..e8c7992ae8 --- /dev/null +++ b/src/test/java/com/twilio/rest/messaging/v2/ChannelsSenderForwardCompatibilityTest.java @@ -0,0 +1,260 @@ +package com.twilio.rest.messaging.v2; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +public class ChannelsSenderForwardCompatibilityTest { + + private ObjectMapper objectMapper; + + @Before + public void setUp() { + objectMapper = new ObjectMapper(); + } + + @Test + public void testTopLevelUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"unknown_top_level_field\": \"should be ignored\"," + + "\"another_new_field\": 12345" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertEquals("XE1234567890abcdef1234567890abcdef", sender.getSid()); + assertEquals(ChannelsSender.Status.ONLINE, sender.getStatus()); + assertEquals("whatsapp:+15017122661", sender.getSenderId()); + } + + @Test + public void testNestedProfileGenericResponseUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"profile\": {" + + " \"name\": \"Test Business\"," + + " \"about\": \"Test about\"," + + " \"pending_display_name\": \"New Name Pending Approval\"," + + " \"some_future_field\": true" + + "}" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getProfile()); + assertEquals("Test Business", sender.getProfile().getName()); + assertEquals("Test about", sender.getProfile().getAbout()); + } + + @Test + public void testNestedConfigurationUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"configuration\": {" + + " \"waba_id\": \"12345678912345\"," + + " \"verification_method\": \"sms\"," + + " \"new_config_option\": \"future value\"" + + "}" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getConfiguration()); + assertEquals("12345678912345", sender.getConfiguration().getWabaId()); + assertEquals(ChannelsSender.VerificationMethod.SMS, sender.getConfiguration().getVerificationMethod()); + } + + @Test + public void testNestedWebhookUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"webhook\": {" + + " \"callback_url\": \"https://example.com/callback\"," + + " \"callback_method\": \"POST\"," + + " \"new_webhook_field\": \"retry_policy_v2\"" + + "}" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getWebhook()); + assertEquals("https://example.com/callback", sender.getWebhook().getCallbackUrl()); + assertEquals(ChannelsSender.CallbackMethod.POST, sender.getWebhook().getCallbackMethod()); + } + + @Test + public void testNestedPropertiesUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"properties\": {" + + " \"quality_rating\": \"HIGH\"," + + " \"messaging_limit\": \"10K Customers/24hr\"," + + " \"throughput_limit\": \"1000 msg/sec\"" + + "}" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getProperties()); + assertEquals("HIGH", sender.getProperties().getQualityRating()); + assertEquals("10K Customers/24hr", sender.getProperties().getMessagingLimit()); + } + + @Test + public void testNestedComplianceUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"compliance\": {" + + " \"registration_sid\": \"BUxxx\"," + + " \"new_compliance_field\": \"audit_status_v2\"," + + " \"countries\": [{" + + " \"country\": \"US\"," + + " \"registration_sid\": \"BUyyy\"," + + " \"status\": \"ONLINE\"," + + " \"new_country_field\": \"region_code\"," + + " \"carriers\": [{" + + " \"name\": \"Verizon\"," + + " \"status\": \"APPROVED\"," + + " \"new_carrier_field\": \"mcc_mnc\"" + + " }]" + + " }]" + + "}" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getCompliance()); + assertEquals("BUxxx", sender.getCompliance().getRegistrationSid()); + assertNotNull(sender.getCompliance().getCountries()); + assertEquals(1, sender.getCompliance().getCountries().size()); + assertEquals("US", sender.getCompliance().getCountries().get(0).getCountry()); + assertEquals(1, sender.getCompliance().getCountries().get(0).getCarriers().size()); + assertEquals("Verizon", sender.getCompliance().getCountries().get(0).getCarriers().get(0).getName()); + } + + @Test + public void testNestedOfflineReasonsUnknownFieldsIgnored() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"OFFLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"offline_reasons\": [{" + + " \"code\": \"30008\"," + + " \"message\": \"No delivery\"," + + " \"more_info\": \"https://www.twilio.com/docs/api/errors/30008\"," + + " \"severity\": \"critical\"," + + " \"new_reason_field\": 42" + + "}]" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertNotNull(sender.getOfflineReasons()); + assertEquals(1, sender.getOfflineReasons().size()); + assertEquals("30008", sender.getOfflineReasons().get(0).getCode()); + assertEquals("No delivery", sender.getOfflineReasons().get(0).getMessage()); + } + + @Test + public void testFullResponseWithMultipleUnknownFields() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"ONLINE\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"friendly_name\": \"My Sender\"," + + "\"new_top_level_field\": \"v2_feature\"," + + "\"configuration\": {" + + " \"waba_id\": \"12345678912345\"," + + " \"verification_method\": \"sms\"," + + " \"new_config_flag\": true" + + "}," + + "\"webhook\": {" + + " \"callback_url\": \"https://example.com/callback\"," + + " \"callback_method\": \"POST\"," + + " \"retry_config\": {\"max_retries\": 3}" + + "}," + + "\"profile\": {" + + " \"name\": \"Test Business\"," + + " \"about\": \"About text\"," + + " \"pending_display_name\": \"New Pending Name\"," + + " \"display_name_status\": \"PENDING_APPROVAL\"," + + " \"websites\": [{\"website\": \"https://example.com\", \"label\": \"Site\", \"verified\": true}]," + + " \"emails\": [{\"email\": \"test@example.com\", \"label\": \"Email\", \"primary\": true}]," + + " \"phone_numbers\": [{\"phone_number\": \"+15017122661\", \"label\": \"Phone\", \"type\": \"mobile\"}]" + + "}," + + "\"properties\": {" + + " \"quality_rating\": \"HIGH\"," + + " \"messaging_limit\": \"10K Customers/24hr\"," + + " \"health_score\": 95" + + "}," + + "\"url\": \"https://messaging.twilio.com/v2/Channels/Senders/XE1234567890abcdef1234567890abcdef\"" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertEquals("XE1234567890abcdef1234567890abcdef", sender.getSid()); + assertEquals(ChannelsSender.Status.ONLINE, sender.getStatus()); + assertEquals("whatsapp:+15017122661", sender.getSenderId()); + assertNotNull(sender.getConfiguration()); + assertEquals("12345678912345", sender.getConfiguration().getWabaId()); + assertNotNull(sender.getWebhook()); + assertEquals("https://example.com/callback", sender.getWebhook().getCallbackUrl()); + assertNotNull(sender.getProfile()); + assertEquals("Test Business", sender.getProfile().getName()); + assertNotNull(sender.getProperties()); + assertEquals("HIGH", sender.getProperties().getQualityRating()); + } + + @Test + public void testNullNestedObjectsStillWork() throws Exception { + String json = "{" + + "\"sid\": \"XE1234567890abcdef1234567890abcdef\"," + + "\"status\": \"CREATING\"," + + "\"sender_id\": \"whatsapp:+15017122661\"," + + "\"configuration\": null," + + "\"webhook\": null," + + "\"profile\": null," + + "\"properties\": null," + + "\"compliance\": null," + + "\"offline_reasons\": null," + + "\"future_field\": \"should not cause issues\"" + + "}"; + + ChannelsSender sender = ChannelsSender.fromJson(json, objectMapper); + + assertNotNull(sender); + assertEquals("XE1234567890abcdef1234567890abcdef", sender.getSid()); + assertEquals(ChannelsSender.Status.CREATING, sender.getStatus()); + assertNull(sender.getConfiguration()); + assertNull(sender.getWebhook()); + assertNull(sender.getProfile()); + assertNull(sender.getProperties()); + assertNull(sender.getCompliance()); + assertNull(sender.getOfflineReasons()); + } +} From b1d0f07cd5da1b6ad6a2e630f365e70da9c20df2 Mon Sep 17 00:00:00 2001 From: sbansla <104902068+sbansla@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:00:11 +0530 Subject: [PATCH 6/7] updated change log with mentioned breaking changes --- CHANGES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 42b09d7bd7..ae7948b496 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,8 +5,10 @@ twilio-java changelog [2026-08-26] Version 13.0.0 --------------------------- **Library - Fix** -- [PR #826](https://github.com/twilio/twilio-oai-generator/pull/826): added forward compatibility for twilio-java nested response (#826) Thanks to [@sbansla](https://github.com/sbansla)!\ -- Fixed deserialization failure when API responses contain unknown fields in nested objects. +- [PR #826](https://github.com/twilio/twilio-oai-generator/pull/826): Fixed deserialization failure when API responses contain unknown fields in nested objects. Thanks to [@sbansla](https://github.com/sbansla)! + +**Library - Breaking Changes** +- Renamed nested model classes in Conversations v2 and Messaging v2 APIs to correct class name generation. Affected resources: `Action`, `Communication`, `Configuration`, `Conversation`, `Operation`, `Participant` (conversations/v2) and `ChannelsSender` (messaging/v2). **(breaking change)** [2026-08-26] Version 12.2.0 --------------------------- From 732da48242a1e9cfe9a7a99fcd7362f31b3f3860 Mon Sep 17 00:00:00 2001 From: sbansla <104902068+sbansla@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:05:52 +0530 Subject: [PATCH 7/7] wrote upgrade guide --- UPGRADE.md | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index dbd30c3bf6..52c77b3329 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -5,22 +5,47 @@ _`MAJOR` version bumps will have upgrade notes posted here._ [2026-08-26] 12.x.x to 13.x.x ----------------------------- ### Overview -##### Twilio Java Helper Library's major version 13.0.0 includes a fix to PascalCase generation for enum and model names containing numbers. +##### Twilio Java Helper Library's major version 13.0.0 includes: +1. A fix to ensure nested response models gracefully handle unknown fields (forward compatibility). +2. A fix to class name generation for nested models and enums whose schema names contain numbers (e.g., API version identifiers like `v2`). ##### Breaking Changes -###### 1. Enum and model names -Type names that contained numbers (e.g., from API version identifiers) previously had those numbers silently dropped. They are now included in the PascalCase output. +###### 1. Nested model and enum class names corrected +Type names derived from schema names containing numbers (e.g., `conversations.v2.action_status`) previously had those numbers silently dropped. They are now correctly included. -Examples: -- `ConversationsVConversationGroupingType` → `ConversationsV2ConversationGroupingType` -- `Action.Status` → `Action.ConversationsV2ActionStatus` +**Who is impacted:** +Users who reference generated nested enum or model types by name in their code for the following resources: +- `com.twilio.rest.conversations.v2.Action` +- `com.twilio.rest.conversations.v2.Communication` +- `com.twilio.rest.conversations.v2.Configuration` +- `com.twilio.rest.conversations.v2.Conversation` +- `com.twilio.rest.conversations.v2.Operation` +- `com.twilio.rest.conversations.v2.Participant` +- `com.twilio.rest.messaging.v2.ChannelsSender` -Who is impacted: -Users who reference generated enum or model types by name in their code where those types contain numbers in the API schema name. +**Example of renamed type (generator fix):** + +| 12.x.x | 13.x.x | +|---------|---------| +| `Conversation.ConversationsVConversationGroupingType` | `Conversation.ConversationsV2ConversationGroupingType` | ##### Migration -Update enum references. + +Find and replace the old type names with the corrected names. If you use any nested enum or model class from the affected resources above, update the class reference. + +```java +// 12.x.x +Conversation.ConversationsVConversationGroupingType type = Conversation.ConversationsVConversationGroupingType.OPEN; + +// 13.x.x +Conversation.ConversationsV2ConversationGroupingType type = Conversation.ConversationsV2ConversationGroupingType.OPEN; +``` + +##### Non-Breaking Fix + +###### Forward compatibility for nested response models +All nested response model Builder classes now include `@JsonIgnoreProperties(ignoreUnknown = true)`. This prevents `UnrecognizedPropertyException` when the API returns new fields that are not yet defined in the SDK. No code changes required — this fix is transparent to existing users. [2026-04-21] 11.x.x to 12.x.x